Lieb-Schultz-Mattis anomalies as obstructions to gauging (non-on-site) symmetries

We study 't Hooft anomalies of global symmetries in 1+1d lattice Hamiltonian systems. We consider anomalies in internal and lattice translation symmetries. We derive a microscopic formula for the"anomaly cocycle"using topological defects implementing twisted boundary conditions. The anomaly takes value in the cohomology group $H^3(G,U(1)) \times H^2(G,U(1))$. The first factor captures the anomaly in the internal symmetry group $G$, and the second factor corresponds to a generalized Lieb-Schultz-Mattis anomaly involving $G$ and lattice translation. We present a systematic procedure to gauge internal symmetries (that may not act on-site) on the lattice. We show that the anomaly cocycle is the obstruction to gauging the internal symmetry while preserving the lattice translation symmetry. As an application, we construct anomaly-free chiral lattice gauge theories. We demonstrate a one-to-one correspondence between (locality-preserving) symmetry operators and topological defects, which is essential for the results we prove. We also discuss the generalization to fermionic theories. Finally, we construct non-invertible lattice translation symmetries by gauging internal symmetries with a Lieb-Schultz-Mattis anomaly.


Introduction
Global symmetry, and its generalizations, can impose powerful constraints on the dynamics of strongly coupled quantum systems, both in the continuum and on the lattice. The prime example in the continuum is the 't Hooft anomaly matching condition [2], and one of the earliest examples on the lattice is the Lieb-Schultz-Mattis (LSM) theorem [3]. Building upon recent progress, we establish a direct connection between such constraints on the lattice and in the continuum. Specifically, we consider the following three types of constraints and will phrase them in a unified framework.
I. 't Hooft anomalies: 't Hooft anomaly of a global symmetry is defined as the obstruction to gauging the symmetry; see [4] for a recent review. The powerful constraint on the dynamics arises from the 't Hooft anomaly matching condition stating that the anomaly is invariant under the renormalization group (RG) flow [2]. In particular, it implies that a theory with an 't Hooft anomaly cannot flow to the trivial theory in the infrared (IR), which has no anomaly. Some of the early applications of anomaly matching appeared in the study of strongly coupled supersymmetric field theories [5]. Recently, 't Hooft anomalies of generalized symmetries [6][7][8][9][10]4] have constrained the dynamics of strongly coupled gauge theories in 3+1 [11] and 1+1 dimensions [12].
II. The boundary of SPTs: On the lattice, there exist similar constraints arising from "anomalies" of global symmetries. However, the definition of anomalies on the lattice differs from the continuum. The anomaly on the lattice is usually defined through the "bulkboundary correspondence" 1 stating that anomalous theories correspond to boundaries of symmetry-protected topological (SPT) phases [17][18][19]. 2 A symmetry-protected topological (SPT) phase is a gapped phase with a symmetry where the non-triviality of the phase only depends on the symmetry [21][22][23][24]. More specifically, a non-trivial SPT has a unique gapped ground state that can be deformed into a trivial product state by a local Hamiltonian evolution that necessarily breaks the symmetry. Important examples of SPT phases are 2+1d and 3+1d topological insulators 3 [27][28][29], and odd-spin Haldane chain [30][31][32].
The lattice analog of 't Hooft anomaly matching condition is the fact that SPT phases have non-trivial symmetry-protected edge modes (see e.g. [33,34]). For instance, topological insulators have gapless edges protected by time-reversal and U(1) symmetries. Generally, the boundary of an SPT is either gapless, breaks the symmetry spontaneously, or has topological order.
III. LSM anomalies: A related powerful constraint on the lattice is the Lieb-Schultz-Mattis theorem [3,35] and its higher-dimensional generalizations [36,37]. The original LSM theorem states that translation-invariant 1+1d quantum spin chains with SO(3) symmetry, and half-integer spins per site, cannot have a unique gapped ground state; see [38] for a review. The LSM theorem has been further generalized to any translation-invariant system such that the internal symmetry acts projectively on each site [39][40][41][42]. For generalizations to fermionic systems see [43][44][45][46]; for other generalizations see [47,48].
Recently, it has been argued that the LSM-type theorems should be thought of as a consequence of a mixed anomaly between the internal symmetry and lattice translation [49][50][51][52][53][54][55][56][57][58]. For instance, the condition of having a projective representation of the internal symmetry per site was claimed to be an anomaly. We will refer to such conditions leading to generalized LSM theorems as LSM anomalies.
The relation between I, II, and III: There are two types of arguments in the literature relating LSM-type theorems with notions of anomalies described in I and II above. Related to the bulk-boundary correspondence, it has been argued that theories with LSM anomalies live on the boundary of crystalline SPT phases [49, 59-61, 53, 62] protected by the translation and an internal symmetry. Therefore, the consequence of LSM-type theorems was phrased as the existence of anomalous edge modes of crystalline SPTs.
In a second line of reasoning, [50,52,57] argued that LSM anomalies lead to mixed 't Hooft anomalies between two internal symmetries after taking the continuum limit. 4 Note that lattice translation by one site usually becomes trivial in the continuum limit since the lattice spacing goes to zero in that limit. However, in some cases, such as when the result of the LSM theorem applies, lattice translation by one site becomes an internal symmetry in the continuum.
Building on [57], we provide a third perspective on the connection between the LSM 4 See also [63] for a discussion of the anomalies of the low-energy continuum theory in 2+1d. theorem and 't Hooft anomalies. We prove that when there is an LSM anomaly, there is an obstruction to gauging the internal symmetry on the lattice while preserving the translation symmetry. This obstruction is the standard definition of 't Hooft anomaly.
In summary, recent developments have shown that various "lattice anomalies", defined in II and III, become 't Hooft anomalies after taking the continuum limit. However, so far there has not been a direct argument relating the definition of lattice anomalies to 't Hooft anomalies. In this work, we show that even lattice anomalies are obstructions to gauging, thereby identifying lattice anomalies as 't Hooft anomalies.
We consider 1+1d lattice Hamiltonian systems and study anomalies in internal symmetries as well as LSM anomalies involving lattice translation. We introduce a procedure for gauging internal symmetries that may not act on-site on the lattice. Moreover, we present a simple formula to compute the anomaly locally and identify the anomaly as the obstruction to gauging. We demonstrate these results using topological defects that implement symmetry twists in space and establish a one-to-one correspondence between (locality-preserving) global symmetries and topological defects.
We mostly focus on bosonic systems and discuss the fermionic case in Section 4.4. Although we do not discuss it here, our method can capture anomalies involving other spatial symmetries, such as reflection and time-reversal symmetry.
This work is mainly inspired by the recent work of Cheng and Seiberg [57], where they compute lattice anomalies as anomalous phases arising from coupling the theory to background gauge fields. Here, we take one step further and quantify these anomalies. Moreover, our method for computing the anomaly is local and, therefore, insensitive to lattice details, such as the number of sites and boundary conditions. We quantify the anomaly as a U(1)-valued function F , which is subject to some conditions and identifications. We refer to F as the anomaly cocycle for its relation to group cohomology [64,65]. We provide a systematic method to locally compute the anomaly cocycle on the lattice. 5 Our method does not assume prior knowledge of group cohomology; however, our result can be nicely phrased in this language, as we explain in the main text. Specifically, we identify the anomaly as an element of H 3 (G, U (1)) × H 2 (G, U (1)) ∼ = H 3 (G × Z, U (1)).
For the case of internal symmetries, our result is consistent with the proposed classification of 2+1d SPTs [21] and 1+1d 't Hooft anomalies in the continuum [69,19]. 6 For LSM anomalies, our result matches with the prediction from the conjectural "crystalline equivalence principle" of [59]. According to this conjecture, one can treat the lattice translation symmetry as an internal Z symmetry to classify possible anomalies. Now we comment on the relation between our method and previous works on the computation of the anomaly cocycle on the lattice. For the case of internal symmetries in 1+1d, methods for computing the H 3 anomaly on the lattice were given in [33,1,78]. 7 Chen, Liu, and Wen [33] provided a method to compute the anomaly when the symmetry is presented by a matrix product unitary operator [82]. Else and Nayak [1] computed the anomaly by considering truncated symmetry operators acting on subregions with boundaries. Their method applies to unitary symmetries that are representable as finite-depth quantum circuits (see, e.g., [83,84] for the definition of finite-depth circuits). Finally, Kawagoe and Levin [78] introduced a method to compute the anomaly of arbitrary internal symmetries, including antiunitary symmetries. In their approach, they first choose a Hamiltonian that spontaneously breaks the symmetry, and then find the anomaly via the fusion of domain walls.
None of the methods mentioned above apply to LSM anomalies involving lattice translation. Our way of computing the anomaly is advantageous since it captures LSM anomalies. We find the LSM anomaly valued in H 2 (G, U (1)) for arbitrary internal symmetry G, which does not necessarily act on-site. Therefore, our results further generalize the LSM theorem beyond on-site symmetries [39][40][41][42]. Our results apply to locality-preserving symmetries, which are not necessarily finite-depth circuits.
Finally, let us point out that there are extensions of the original LSM theorem concerning translation-invariant systems with only a U(1) symmetry instead of the SO(3) symmetry. In particular, [85] found that certain translation-invariant spin chains cannot have a unique gapped ground state if the U(1) charge per unit cell is fractional, see also [86]. More specifically, [85] studied the XXZ chain with a non-zero magnetic field. Such extensions are not associated with the standard notion of 't Hooft anomaly, that is, the obstruction to gauging. Instead, [57] phrase them as anomalies in the system with a fixed charge. Our formalism does not apply to such cases. This is mainly because U(1) does not have a genuine projective representation. Thus the notion of having a fractional U(1) charge per unit cell is an extra constraint (known as the filling constraint) rather than being a property of the microscopic system. See [87] for interesting results in systems with a continuously tunable filling.
We will summarize our results below, starting with a short overview of topological defects. 7 A method to compute the H 3 anomaly was developed long ago in the context of algebraic quantum field theory [79][80][81]. Although stated in a different language, this method is the same as the one in [1]. We thank Yuji Tachikawa for pointing out these references to us.

Topological defects
The 't Hooft anomaly is a microscopic property of the theory, independent of lattice details. To compute it locally, it is useful to consider symmetry defects that impose a symmetry action across space instead of symmetry operators that impose a symmetry action across time. Symmetries are traditionally defined by unitary operators that commute with the Hamiltonian. However, not every unitary operator that commutes with the Hamiltonian qualifies as a global symmetry. One further requires that the symmetry operator maps local operators to local operators. To manifest this locality property, it will be extremely useful to consider symmetry defects implementing symmetry twists in space.
Consider a 1+1d theory with a global symmetry. We can either put the system on a chain with periodic boundary conditions or impose twisted boundary conditions with respect to various elements of the symmetry group. For internal symmetries, twisted boundary conditions can be imposed locally by inserting symmetry defects. Defects generally correspond to the modification of the system locally near some point in space. Symmetry defects are, however, topological in the sense that we can move them locally without changing the physics. The crucial point is that we can capture all aspects of symmetries by the corresponding topological defects. 8 For example, consider the transfers-field Ising model Hamiltonian The model has a global Z 2 symmetry that flips the spins, denoted by η. The symmetry operator is given by U η = j σ x j , which imposes a twist in time when inserted inside correlation functions. On the other hand, the symmetry defect inserted on link (0, 1) is given by the defect Hamiltonian and implements a twist in space.
Topological defects capture all the properties of a global symmetry and its anomaly. For instance, the fact that U η generates a Z 2 symmetry translates to a Z 2 fusion rule for the defect, i.e., η × η = 1. This means that the insertion of two defects is trivial. Consider two defects at links (0, 1) and link (j, j +1); we can annihilate/create these defects by conjugating the Hamiltonian with the unitary operator σ x 1 σ x 2 . . . σ x j .
In Section 2.4, we show that any internal symmetry G can be represented by topological defects corresponding to a local modification of the Hamiltonian (and possibly the Hilbert space). We denote the defect Hamiltonian for the insertion of a symmetry defect for g ∈ G on link (j, j + 1) by The group multiplication of symmetry operators corresponds to the fusion of these defects. Consider two defects g ∈ G and h ∈ G on links (j − 1, j) and (j, j + 1), and denote the corresponding defect Hamiltonian by H (j−1,j);(j,j+1) g;h . These topological defects obey a G fusion rule in the sense that there exist local unitary (fusion) operators (1.5)

Microscopic formula for the anomaly
As we will argue in Section 3, the 't Hooft anomaly is given by the relation which in equation is (1.7) Here, F (g 1 , g 2 , g 3 ) is just a phase and it is independent of j due to the translation symmetry T that satisfies T λ j (g, h) T −1 = λ j+1 (g, h). In Section 3.1, we discuss the general case that applies to systems without translation symmetry. We identify the anomaly as the function F : G × G × G → U (1) that is subject to the following two essential conditions: I. Cocycle condition: F satisfies a modified cocycle/pentagon equation This is the analog of the Wess-Zumino consistency conditions appearing in the classification of perturbative anomalies in the continuum.
II. Phase ambiguity: Fusion operators λ j (g, h), defined by equation (1.5), have phase ambiguity that propagate into F and lead to the identification . These phase ambiguities correspond to local counterterms in the continuum that can be added into the action to cancel some anomalous phases.

2.
Modding out by j-independent phase ambiguities, which do not spoil the condition T λ j (g, h) T −1 = λ j+1 (g, h), we get the cohomology classes of ω and α denoted by If we further mod out by j-dependent phases, we completely trivialize α and are left with only [ω]. 3.

[α]
∈ H 2 (G, U (1)) is the (generalized) LSM anomaly, which is given by (1.12) 5. Without a translation symmetry ω and α might be j-dependent. However, the cohomology class [ω] is always j-independent and thus meaningful in systems without translation symmetry.
6. According to the Künneth formula ) as an element of the third group cohomology of Z × G. This is consistent with the crystalline equivalence principle [59] stating that the translation symmetry can be treated as an internal Z symmetry to classify anomalies.

Anomaly as the obstruction to gauging
At least in the continuum, it is well-known that twisted boundary conditions for a symmetry G correspond to coupling the theory to flat background G gauge fields. The spatial component of the gauge field determines the twist in space or, equivalently, the insertion of a topological defect. Therefore, we can view the insertion of topological defects as coupling the system to background gauge fields and view the unitary fusion operators in equation (1.4) as gauge transformations. 9 We will make the connection between topological defects and gauge fields even more concrete by explicitly gauging the symmetry on the lattice using topological defects. We develop a systematic way to gauge arbitrary internal symmetries without assuming that the symmetry is on-site or going to a presentation where the symmetry is on-site. This allows us to identify the anomaly cocycle as an obstruction to gauging even on the lattice.
More precisely, we will show that [ω] ∈ H 3 (G, U (1)) is the complete obstruction to gauging G on the lattice. Therefore, it justifies calling [ω] the 't Hooft anomaly in G. This observation proves that the classification of 1+1d anomalies on the lattice and continuum are the same. In addition, we show that the (generalized) LSM anomaly [α] ∈ H 2 (G, U (1)) is the obstruction to gauging G while preserving the lattice translation symmetry. Before ending this subsection, let us briefly sketch our gauging procedure and explain how the anomaly comes about as the obstruction.
To perform the gauging, we will first enlarge the Hilbert space by adding all possible G-defects on all links. This corresponds to making the gauge fields dynamical [6]. The next step is to impose Gauss's law locally at all sites. Roughly speaking, Gauss's law at site j is given by the following projection operator Without a translation symmetry, we can redefine the fusion operators by j-dependent phases to eliminate the 2-cocycle α. Thus we establish that [ω] is the complete obstruction to gauging G.
With a translation symmetry, however, we cannot redefine the fusion operators with j-dependent phases, as that would violate the relation T P j T −1 = P j+1 . Breaking such a relation means that T is not gauge invariant, and we lose the translation symmetry by one site. Therefore, if we insist on preserving the translation symmetry, the obstruction to gauging G is given by both [ω] and [α]. Therefore, we identify the LSM anomaly [α] as the mixed 't Hooft anomaly between G and the translation symmetry.

Anomaly matching on the lattice
The 't Hooft anomaly matching states that the anomaly of the Ultraviolet (UV) physics should match with the anomaly of the Infrared (IR) low-energy physics. In the continuum, this follows from the fact that the 't Hooft anomaly is invariant under continuous deformations, and in particular, under the renormalization group (RG) flow. Therefore, a theory with an 't Hooft anomaly in the UV cannot flow to a trivial theory in the IR since the trivial theory has no anomaly.
There are usually three options for the low-energy physics when there is a non-trivial 't Hooft anomaly. Either we have a gapless theory, ground state degeneracy, or topological order. However, there is no topological order in 1+1d. We will prove an 't Hooft anomaly matching on the lattice by showing the following. We will show that a 1+1d lattice Hamiltonian model with a non-trivial 't Hooft anomaly, i.e., [ω] ̸ = 1 or [α] ̸ = 1, cannot have a unique gapped ground state. This statement generalizes the LSM theorem and can be viewed as a lattice version of the 't Hooft anomaly matching conditions.

Anomaly matching in the continuum
Now we discuss the 't Hooft anomaly matching between the UV lattice model and the IR theory in the continuum. As usual, there is a homomorphism from the symmetry of the UV into the symmetry group in the IR. However, the generator of the translation symmetry, T , either becomes trivial in the continuum or becomes an internal symmetry of the IR. See [57] for a detailed discussion and examples. Therefore to discuss this homomorphism, we only need to consider the internal symmetries of the IR.
If we denote the internal global symmetry of the IR theory by G IR , we get a homomor- (1.14) This homomorphism captures the continuum limit of translation by one site, which is an internal symmetry in the continuum. Specifically, we consider translation by one site and then take the continuum limit. If, on the other hand, we consider translations by n sites and take the number of lattice sites L to infinity such that n/L is constant, we find translations of the continuum theory. 10 We claim that the UV anomaly is given by the pullback of the IR anomaly via the homomorphism f . If we denote the 't Hooft anomaly of the IR theory by ) is a precise mathematical statement of the anomaly matching. In particular, it implies that when the UV anomaly is non-trivial, the IR anomaly [ω IR ] must also be non-trivial. Moreover, as emphasized in [57], the LSM anomaly [α] becomes a mixed 't Hooft anomaly between the symmetry G and the emanant symmetry of the IR. The emanant symmetry is the symmetry generated by the continuum limit of translation by one site.

Outline
In Section 2, we discuss the connection between symmetry operators and topological defects. In particular, we prove a one-to-one correspondence between locality-preserving global symmetries and topological defects in 1+1d lattice Hamiltonian systems. This correspondence will be essential for the results we prove in Section 3. Section 3.1 presents our microscopic formula for 't Hooft anomalies and discusses its relation to the group cohomology classification of anomalies. Moving on to Section 3.2, we introduce a method to gauge non-on-site internal symmetries on the lattice. We identify the anomaly as the obstruction to this gauging procedure. In Section 3.3, we argue that when the anomaly is non-trivial, there is no symmetric deformation to a gapped phase with a unique ground state. Section 4 contains several examples illustrating our general results. In Section 4.1, we discuss LSM anomalies for on-site symmetries, particularly the spin-half Heisenberg chain example. In Section 4.2, we study the XYZ chain and its Z 2 × Z 2 symmetry, which has an LSM anomaly. We construct a non-invertible lattice translation symmetry by gauging the Z 2 × Z 2 symmetry of the XYZ model. In Section 4.3, we consider the modified Villain theory that exhibits anomalous U(1) chiral symmetries on the lattice. We use this theory to construct Abelian chiral gauge theories on the lattice. In Section 4.4, we discuss the fermionic generalization of the results from Section 3 and demonstrate it by considering the example of a chain of N free Majorana fermions.
Finally, Appendix A provides a single formula to extract the 't Hooft anomaly in internal Z 2 symmetries. In Appendix B, we compare our results with Else-Nayak [1]. We show that our formula of the H 3 anomaly matches Else-Nayak in cases where their method is applicable. In Appendix C, we construct topological defects for antiunitary symmetries.

Symmetry operators vs. topological defects
In this section, we discuss the precise relation between topological defects and global symmetries of 1+1d lattice Hamiltonians. In particular, we construct topological defects from internal symmetry operators and, conversely, construct symmetry operators from topological defects. More generally, we show a one-to-one correspondence between topological defects and locality-preserving symmetry operators, which include lattice translation and antiunitary symmetries.

Symmetry operators
Symmetries of quantum systems are traditionally defined by unitary operators that act on the Hilbert space and commute with the Hamiltonian. This is a complete characterization of symmetries in quantum mechanics. In lattice models with spatial dimensions, there is a notion of locality and one requires symmetries to act locally. More precisely, the symmetry operator must map local operators into local operators. 11 The simplest way to satisfy the locality requirement is to consider symmetries that act on-site. Consider a system with a tensor product Hilbert space H = j H j where H j is the Hilbert space at site j. An on-site symmetry operator takes the form where U j is a unitary operator that acts non-trivially only on site j. Such an operator respects locality since it maps a local operator O j supported on site j to U O j U −1 = U j O j U −1 j , which is also supported on site j. The operators O j and U j O j U −1 j are considered local operators since they are supported on a single site.
More generally, we require symmetries to act locally in the following sense. For a symmetry operator U , there should exist an integer k -independent of the number of lattice sitessuch that U maps operators supported on l consecutive sites to operators that have support on at most l + k consecutive sites. 12 According to this definition reflection across site J acts locally, with k = 0, since it maps an operator supported on site j to an operator supported on site J −j. However, the reflection symmetry is not locality preserving. A unitary operator is said to be locality preserving if it maps a local operator around site j to a local operator which also has support around site j. 13 In this work, we consider local Hamiltonian systems in the sense that the Hamiltonian is written as a sum of local terms. Specifically, we assume the Hamiltonian is written as where H j is a local operator with support on at most sites j, j + 1, · · · , j + l, for some integer l independent of the system size. We assume the Hilbert space is constructed as a 11 In the continuum such an operator is called a line operator. Its locality is manifest if it is defined by a local action U (γ) = e −i γ L[ϕ] , such as Wilson lines in gauge theories. 12 In the case of a tensor product Hilbert space it is enough to check this condition only for l = 1. In other cases like gauge theories with Gauss's constraints, the gauge invariant operators supported on a single site do not necessarily generate all local operators. 13 Locality-preserving unitary operators acting on lattices are called quantum cellular automata (QCAs).
tensor product of local factors plus additional local constraints. For instance, there are local Gauss's law constraints in gauge theories. The list of local operators in such theories is given by operators that commute with local constraints. The locality is encoded in the algebra of local operators instead of the Hilbert space. More precisely, there exists a well-defined algebra of local operators such that each operator has a support consisting of a finite number of lattice sites. Operators with disjoint support necessarily commute with each other. 14 It is the locality requirement that makes global symmetries powerful. The goal of this section is to give an alternative definition of global symmetries that makes the locality property manifest. This alternative definition is the notion of topological defects.

Topological defects
Symmetry operators when inserted inside correlation functions impose a symmetry action across a point in time, whereas symmetry defects impose a symmetry twist across space. Symmetry operators/defects are said to be topological in the sense that the correlation functions are independent of their exact location [88,6]. Let us explain this terminology in the continuum setting, where it is more natural.
In the continuum, one can insert symmetry operators/defects on arbitrary loops, i.e. codimension-one submanifolds, inside the 1+1d spacetime. The correlation functions only depend on the topology of the loop and are insensitive to local deformations of the loop. More precisely, consider the symmetry operator U (γ) supported on the loop γ. One can deform the loop γ slightly and the correlation functions do not change unless we cross a local operator insertion O(x). In that case, swiping γ across the local operator insertion at x implements the symmetry action on that local operator. Therefore, we have the following relation characterizing the symmetry through the correlation functions of topological operators/defects: Here, deforming the loop γ into γ ′ implements the symmetry action: In a lattice Hamiltonian system, there are two important cases. When γ is located at a fixed time and extends in space, U (γ) is the unitary operator that commutes with the Hamiltonian. However, when γ is located at a point in space and extends in time, it defines a topological defect. As we will show later, topological defects are still related to symmetry operators even in non-relativistic lattice Hamiltonian systems.
Since symmetry defects impose symmetry twists across the space, their insertion corresponds to twisted boundary conditions on a closed lattice. Consider a 1+1d system with an internal Z 2 symmetry. We can put the system on a closed chain with a periodic boundary condition or anti-periodic boundary condition for the Z 2 symmetry. Imposing an antiperiodic boundary condition usually corresponds to changing the sign of a single term in the Hamiltonian. This local modification of the Hamiltonian near a single site is an example of a topological defect.
For example, consider the transfers-field Ising model (TFIM) Hamiltonian This model has a Z 2 spin-flip symmetry that we denote by η. It is generated by the unitary operator U η = j σ x j that flips all the spins, i.e. U η conjugates σ z j to −σ z j for all j. We can introduce a Z 2 twist at link (0, 1) by acting with the symmetry only on sites j ≥ 1. By doing such, we find the twisted/defect Hamiltonian By identifying σ L = σ 0 , we find the model with an anti-periodic boundary condition on the chain with L sites.
Note that by doing a change of basis (i.e. a similarity transformation), we can move the location of the defect from link (0, 1) to any other link of the chain. For instance, by conjugating the Hamiltonian with σ x 1 or σ x 0 we can move the defect, respectively, to the right or left Therefore, the defect can be moved locally (i.e. with a local unitary operator) without costing any energy. Because of this property, we say that η is a topological defect. 15 Mathematically speaking, the twisted boundary condition corresponds to the non-trivial Z 2 bundle over the circle, and moving the topological defect is a gauge transformation.
The important property of topological defects is that we can use them to reconstruct the symmetry operators. To do such, let us begin with the untwisted Hamiltonian H on a periodic chain. Conjugating H with σ x 1 creates a pair of defects on links (L, 1) and (1,2) H (L,1);(1,2) Now we can apply the movement operators σ x 2 , σ x 3 , . . . , σ x L−1 respectively to move the defect on link (1, 2) along the chain to link (L − 1, L). Finally, we apply σ x L to annihilate the two defects on links (L − 1, L) and (L, 1), and return to the untwisted Hamiltonian. Putting everything together, we find that the product of all these unitaries conjugates H back to itself and thus is a symmetry operator. Indeed this unitary operator is the original Z 2 symmetry operator U η .
The Ising chain and its Z 2 symmetry explain the basic idea behind the relation between topological defects and symmetry operator. We will now define the notion of topological defects more abstractly and later show the relation between topological defects and symmetry operators in general.

General definition of topological defects
Generally, a defect corresponds to a modification of the theory only near some region. Physically, it corresponds to modifying a material locally by adding impurities, removing atoms, etc. In this work, we are interested in defects that are localized near a point in space. 16 We model such defects by modifying the Hamiltonian and the Hilbert space only in a local neighborhood of some sites. We refer to such a modified Hamiltonian and Hilbert space as the defect Hamiltonian and the defect Hilbert space.
Consider a general 1+1d lattice Hamiltonian system. We represent a defect by a list of defect Hamiltonians and defect Hilbert spaces representing the insertion of the defect on various links of the chain. For the system with a defect D on link (j, j + 1), we denote the defect Hilbert space and defect Hamiltonian as H only differ by the original Hilbert space H and Hamiltonian H near link (j, j + 1). 17 16 From the space point of view they may be called point defects, but correspond to line defects in spacetime. 17 More precisely, the algebra of local operators supported on sites J ≤ j − k/2 and J ≥ j + k/2 of the system with and without the defect are isomorphic for a fixed integer k related to the width of the defect defined below. This isomorphism identifies the local terms in the Hamiltonians H (j,j+1) D with those in H on sites J ≤ j − k/2 and J ≥ j + k/2.
We say that a defect is topological if moving it does not change the physics. More precisely, the defect D is topological if there exist local unitary operators U j D : H The movement operator U j D is local in the sense that it has support on at most k + 1 sites near site j. More precisely, we assume U J D has support on sites J − k/2 ≤ j ≤ J + (k + 1)/2. Moreover, k ≥ 0 is independent of the system size, and the smallest such integer is denoted as the width of the defect. In the Ising example, we have Importantly, the presentation of the defect in terms of defect Hamiltonians and defect Hilbert spaces is not unique. One can conjugate the defect Hamiltonians by local unitary operators O (j,j+1) D to find another presentation of the defect (2.10) The support of the local operator O (j,j+1) D determines the width of the defect in the new presentation. The movement operators in the new presentation are given by In other words, we say that two defects D and D ′ are equivalent if the corresponding defect Hamiltonians are related by local unitary operators. In practice, we fix a particular presentation of the defects and keep in mind that physically meaningful quantities should be independent of this choice.

Fusion of topological defects
By applying a sequence of movement operators, one can move topological defects arbitrarily around the chain. In particular, consider a system with two topological defects that are far away from each other. Using the movement operator, we can bring one of the defects next to the other one, thus defining a fusion between topological defects. In particular, for a symmetry G, inserting two symmetry twists associated with group elements g ∈ G and h ∈ G is equivalent to a single gh ∈ G twist. In general, the fusion of symmetry defects corresponds to the group structure of symmetry transformations.
However, the fusion operation between arbitrary topological defects is not always grouplike. In particular, while the fusion operation is associative, it is not necessarily invertible. In this work, we will only consider invertible topological defects with a group-like fusion rule. But let us point out that there exist non-invertible topological defects even in the transverse-field Ising model [89,90]. 18 For general construction of 1+1d lattice systems with non-invertible topological defects see [94][95][96][97].
To describe the fusion operation concretely, we want to consider a system with two defects located at nearby links. However, we do not want to introduce a new ambiguity in defining the defect Hamiltonian for two defects. In other words, starting from single-defect Hamiltonians, we want to unambiguously construct the defect Hamiltonian for the system with two defects. We will now argue that this is possible if the distance between the defects is larger than the width of each defect.
Consider two topological defects g and h of width at most k. The key property is that (2.12) In this case, it is unambiguous to insert the defects at links (j, j +1) and (j +k, j +k +1). We first insert them very far away from each other, say at links (−J, −J + 1) and (J, J + 1) for J ≫ |j|+k. This is unambiguous since the defects are localized. We denote the corresponding defect Hamiltonian as H . Now we apply the movement operators to bring them on links (j, j + 1) and (j + k, j + k + 1). There can be an ambiguity in doing such if the two movement operators do not commute with each other. However, since the defects have width k the two movement operators commute with each other and thereby there is no ambiguity in defining H From now on we assume that all the defects have width k = 1 such that we can always insert them, unambiguously, on adjacent links. However, everything that follows can be generalized to the case of k > 1. We consider general invertible topological defects whose fusion rule is governed by a group G and label the defects by the group elements g, h, k, · · · ∈ G. We construct the defect Hamiltonian for the system with two defects g and h on links (j − 1, j) and (j, j + 1) and denote it as (2.14) Fusion operators: The fusion is implemented by unitary operators λ j (g, h) : H , which are represented by the following spacetime diagram 19 The local unitaries λ j (g, h) are called fusion operators and they satisfy The movement operators of equation (2.9), are special cases of the fusion operators in the sense that U j g = λ j (g, 1). Here, the identity element 1 ∈ G corresponds to the trivial defect.

Simple defects:
The fusion operators satisfying (2.16) are well-defined up to phases. This is because we assume there is no non-trivial local unitary operator that commutes with defect Hamiltonians. If this had not been the case, we could have diagonalized the defect Hamiltonian with respect to such local unitaries and thereby decompose the defect into simpler ones. In such cases, the defect is said to be a non-simple, or reducible, defect. We will only consider simple topological defects in this work. Since the defects are invertible, the assumption that the defects are simple is equivalent to assuming that no local operator commutes with the untwisted Hamiltonian, i.e. the trivial defect is simple. 20 Changing the presentation of the defects, given by (2.10), transforms the fusion operator (2.17) 19 We always use the notation ' →' to denote conjugation, i.e. U : O → U OU −1 . 20 This restriction is equivalent to the absence of 1-form symmetries. However, a 1-form symmetry can be eliminated by a local deformation, which can be chosen to be invariant under a 0-form symmetry that has no mixed anomaly with the 1-form symmetry. Relatedly, we only consider 0-form symmetries that are free of mixed anomalies with any 1-form symmetry. See e.g. [12,98] for a discussion of anomalies between 0-form and 1-form symmetries.
It is important to work with a fixed presentation of the defect Hamiltonians. At the end of the day, the only physically meaningful quantities are those independent of the defect's presentation and the phase ambiguities mentioned above.
Let us summarize the key properties of invertible topological defects (of width k = 1): 1) There is a list of defect Hamiltonians H (j,j+1) g for every g ∈ G and link (j, j + 1).
2) There exist fusion operators λ j (g, h) : H Internal symmetries vs. spatial symmetries So far, we have described the most general notion of invertible topological defects whose fusion is governed by a group G. To ensure that these topological defects correspond to internal symmetries, as opposed to spatial symmetries such as translation and reflection, we need to consider a further constraint on these defects. Let us first recall the definition of internal symmetries.
Global symmetries map local operators to local operators. If the symmetry is internal, it should map local operators supported around site j to local operators that are also supported near site j. This criterion, however, is not sharp enough to distinguish between approximately internal symmetries, such as translation by one site, and true internal symmetries. A sharper definition is as follows.
We say that a symmetry U is internal if for all integers n, U n maps a local operator near site j to a local operator near site j. More precisely, U generates an internal symmetry if there exists a non-negative integer k independent of n such that U n maps an operator supported on sites J 1 < j < J 2 to an operator that has support on at most sites J 1 − k < j < J 2 + k. Here, k is independent of the system size, and we refer to the smallest such integer as the width of the symmetry. 21 The case of k = 0, corresponds to an on-site symmetry (which may or may not act projectively on local Hilbert spaces at each site).
Below, we will argue that a topological defect of width k corresponds to a symmetry operator of width at most 2k and vice versa. Therefore, a topological defect D corresponds to an internal symmetry if there is an integer k such that the width of D n is at most k for all n ∈ Z.

Defects → operators
Here we will construct symmetry operators from invertible topological defects.
We start with the untwisted Hamiltonian H for the periodic chain with L sites. We first conjugate the untwisted Hamiltonian with (λ 1 (g −1 , g)) −1 to create a pair of g −1 and g defects on links (L, 1) and (1,2). Then we apply the movement operator λ L−1 (g, 1) · · · λ 3 (g, 1) λ 2 (g, 1) to bring the defect g around the chain to the other side of the defect g −1 . Finally, we fuse the two defects to get back the untwisted Hamiltonian. In summary, we find the line operator which commutes with the untwisted Hamiltonian H. Diagrammatically, we have We now argue that the symmetry operator U g constructed above is unique up to a phase, and does not depend on various choices that were made in defining it. First of all, changing the presentation of the defect, as described in equation (2.17), does not affect U g . Secondly, we show that U g does not depend on the choice of origin. In other words, we want to show that U g , up to a phase, is equal to We first note that we have the following relation Here, α 1 (g −1 , g) is a local unitary operator that commutes with the Hamiltonian, therefore by our assumption, it should be just a U (1) phase.
Using the relation above, we can commute λ 1 pass through λ 2 in the right-hand side of equation (2.18). Moreover, assuming that the defect has width k = 1, we can commute λ 1 pass through other terms and bring it to the right of λ L . Finally, we define which is also a phase similar to α 1 . This allows us to commute λ 1 through λ L to get (2.24) Therefore, we see that changing the origin in the definition of U g multiplies it by a phase. Thus the topological defect determines U g up to a phase. Now we show U g has the same width as the defect.
Assume that the defect g has width k, so that λ J (g, h) has support on, at most, sites J − k/2 ≤ j ≤ J + (k + 1)/2. We show that in this case the width of the unitary symmetry operator U g , constructed above, is at most k. Recall that a symmetry operator has width k, if it maps an operator O [J 1 ,J 2 ] that has support on sites J 1 ≤ j ≤ J 2 into an operator that has support on, at most, sites We notice that most of the terms in (2.18), besides those that are near sites J 1 and Here, ⌊x⌋ is the greatest integer less than or equal to x. Using the assumption that the defect has width k, we find that the above unitary operator has support only on sites We conclude that the width of the symmetry operator U g is at most k.

Operators → defects
Now we establish the more difficult side of the correspondence. Namely, we construct an invertible topological defect of width at most 2k from a unitary symmetry operator U g of width k.
The basic idea is to truncate the symmetry operator U g to an operator that implements the symmetry in only half of the chain. More precisely, we want to find a unitary operator U ≤J g such that for a local operator O j supported on site j we have If such a truncated symmetry operator 22 exists, we claim that a defect Hamiltonian is given by conjugating the untwisted Hamiltonian by this operator. Namely, Below, we first demonstrate that this equation does indeed define a localized defect, which is topological. Next, we will discuss the existence and construction of the truncated symmetry operator.
Before going to the next discussion, we want to emphasize that we only consider systems with a finite, but large, number of sites. For instance, in a more precise version of equation (2.27), we consider a truncated symmetry operator U J,J ′ g that acts on a finite region between sites J ′ and J, where J ′ ≪ J − 2k. In that case, by conjugating the untwisted Hamiltonian with this truncated operator we in fact create a pair of topological defects. The additional defect is the inverse defect g −1 and is localized around site J ′ . However, since the defects are localized, we can only focus on the region around J to find the expression for a single defect. In what follows, in order to simplify the discussion, we will not specify the details of the system far away from the region of interest.
Proof of locality: To see that H (J,J+1) g defines a defect that is localized near link (J, J + 1), we need to show that it differs from the untwisted Hamiltonian only near that link. Equivalently, we need to show that the difference, H (J,J+1) g − H, is a local operator supported near link (J, J + 1). The untwisted Hamiltonian is written as a sum of local terms, i.e.
where H j has support on at most sites j, j + 1, · · · , j + l for some integer l. We claim that H Since the truncated symmetry operator commutes with operators supported on sites j > J + k, we find that the second term in the equation above vanishes. Therefore H (J,J+1) g − H has support on at most sites j ≤ J + k + l. Using the fact that U g commutes with the untwisted Hamiltonian we find is also a truncated symmetry operator that, because of (2.26), has support at most on sites J > J − k. Therefore we find that the operator (2.31) is at most supported on sites j > J − k − l. Thus we have proven that (2.27) defines a localized defect.
Proof of the topological property: To show that the defect is topological we construct the movement operators as This operator is local and has support on at most sites J − k ≤ j ≤ J + k. This can be shown by using (2.26) and noting that the operator commutes with any local operator O j supported on site j > J + k or j > J − k. Thus we find that the defect has a width of at most 2k.
Above, we constructed a defect from the truncated symmetry operator. But does the truncated symmetry operator always exist? If we insist on keeping the Hilbert space of the defect the same as the untwisted Hilbert space, then such a truncated symmetry operator might not exist in general. However, a truncated symmetry operator always exists if we add local ancillas representing the defect degrees of freedom. Such a truncated operator is constructed in the context of quantum cellular automata (QCA) [101] (see also [84]). We review this construction below and use it to construct a defect Hamiltonian and defect Hilbert space. Moreover, we comment on when the truncated symmetry exists without having to add ancillas.

Construction of the truncated symmetry
To construct a truncated symmetry operator, first, we add a decoupled copy B of the original system A that has trivial dynamics. Namely, we consider the extended Hilbert space and HamiltonianH = H ⊗ H andH = H ⊗ 1 . (2.33) The first factor describes the original system A, and the second factor is system B.
Next, we extend the original symmetry operator U g tõ where U A = U g ⊗ 1 is the original symmetry operator acting on system A, and U B = 1 ⊗ U g .
We will show below thatŨ g can be truncated by using the swap operator which exchanges system A and B. The swap operator itself can be truncated since it is written as a product of local unitaries. The local swap operator s j is supported on site j and satisfies Using the swap operator, we rewrite the extended symmetry operator as This operator can be truncated to the unitary operator which we now show is indeed a truncated symmetry in the sense of equation (2.26).
Using the fact that the symmetry operator U g has width k we find Therefore,Ũ ≤J g satisfy the truncated condition of equation (2.26).
Defect Hilbert space: As shown above, we can construct a defect Hamiltonian of width at most 2k as (2.41) However, the underlying Hilbert space H ⊗ H is too large. To find the true defect Hilbert space, we need to get rid of the decoupled degrees of freedom associated with system B. To do such, we project system B into one of its states. We choose a product state |0⟩ ∈ H, where |0⟩⟨0| = j π j and π j is a hermitian projection operator at site j. 23 The projector into this state is given by (2.42) 23 A product state exists in theories with a tenor product Hilbert space. In systems with additional local constraints, we can still consider such a product state by relaxing the local constraints of system B.
For the system without a defect, imposing 1 ⊗ Π = 1 decouples system B and gives us back the original system. Now for the system with the defect, we consider the projection operator Note that Π (J,J+1) commutes with the defect Hamiltonian H (J,J+1) g and is still written as a product of local commuting projectors. We define the defect Hilbert space H (J,J+1) g as the Π (J,J+1) = 1 subspace of H ⊗ H. 24 We emphasize that the defect Hilbert space only differs from the untwisted Hilbert space around site J. This is because the algebra of local operators away from site J is isomorphic for both the system with and without the defect. An isomorphism is given by the unitary operatorŨ ≤J g . In summary, we have constructed the defect Hamiltonian and defect Hilbert space To make sure there are no remaining decoupled degrees of freedom, we should check that there is no local operator commuting with H (J,J+1) g and the constraint Π (J,J+1) . A defect satisfying this condition is called a simple defect. If such a local operator exists, by conjugating it with U ≤J g , we find a local operator that commutes with both H ⊗ 1 and 1 ⊗ Π. However, such an operator cannot exist because we are assuming that the original Hamiltonian does not commute with any local operator (see the paragraph about simple defects in Section 2.2). 25 Let us consider an example that demonstrates the generality of the construction above. Below, we construct a topological defect for the lattice translation symmetry. This is an important example since the translation symmetry (in bosonic theories) can never be truncated in the original Hilbert space and we necessarily need to construct a non-trivial defect Hilbert space. In Appendix C, we discuss the case of antiunitary symmetries. 24 The defect system is a local lattice system since Π (J,J+1) is a product of local commuting projectors. In other words, there is a local operator algebra generated by operators that commute with the local constraints U ≤J g (1⊗π j )(Ũ ≤J g ) −1 = 1. These local constraints are the analog of Gauss's law constraints in gauge theories. 25 More generally, even if there were local operators that commute with the Hamiltonian, we assume there is a symmetric deformation of the Hamiltonian that eliminates such operators. This assumption is equivalent to the absence of mixed anomalies between G and any 1-form symmetry.
Topological defect for translation: Take the lattice translation operator T acting as (2.46) We consider a translation invariant Hamiltonian, and without loss of generality, we assume that it has the following form Here, H 0 j and H 1 j are local operators supported on site j, where T H 0,1 j T −1 = H 0,1 j+1 . We double the system and extend the translation operator toT = T ⊗ T −1 . Note that the translation symmetry has width k = 1. Following our general construction, we truncate this symmetry operator to find The subscript + here indicates that we are considering the translation to the right.
The action of the truncated symmetry on local operators is given bỹ (2.50) Using these relations, we find the defect Hamiltonian (2.51) The defect Hilbert space is given by considering the projection operator This is almost the same as the untwisted system, except it has one extra site between sites J + 1 and J + 2.
Similarly, we can consider a defect for the inverse translation symmetry T − = T −1 . The corresponding truncated symmetry operator acts as The projection operator is (2.56) Imposing Π (J,J+1) = 1, effectively, projects out system B completely and also the site J of the original system. More precisely, it also exchanges the site J + 1 of the two systems. We undo the latter by conjugation with the local unitary s J+1 . In the end, we find the defect Hamiltonian In summary, we find that the defect for translation symmetries T and T −1 correspond, respectively, to adding an extra site and removing one site of the chain. These topological defects are inverse of each other and fuse to the trivial defect.
Finite-depth quantum circuits: The problem of whether a symmetry operator of finite width can be truncated or not is a well-known problem in the context of QCA. This problem is completely settled in 1+1d systems with a Hilbert space that is a tensor product of finitedimensional local Hilbert spaces [102]. In that case, a symmetry operator of finite width is truncatable, i.e. it is a finite-depth quantum circuit, if it corresponds to an internal symmetry.
In particular, the translation symmetry operator cannot be truncated. 26 Another example where the symmetry operator might not be truncatable, is when the Hilbert space does not have a tensor product structure. For instance, in gauge theories, the Hilbert space is given by imposing local Gauss's law constraints. The simplest example is the 1+1d lattice Z 2 gauge theory. The Hamiltonian is identically zero. The Hilbert space is given by a tensor product of local two-dimensional Hilbert spaces with the Gauss's law constraints σ z j σ z j+1 = 1 for all j . Because of Gauss's law constraint, the truncated symmetry operator is not gauge invariant and does not act on the untwisted Hilbert space. However, we can create a defect at link (J, J + 1) by changing Gauss's law at that link to σ z J σ z J+1 = −1. We want to point out that this defect is not simple since there exists a local operator σ z j that commutes with the Hamiltonian. An open question is whether, with the extra assumption of simplicity, all internal symmetry operators are truncatable in 1+1d even in systems without a tensor product Hilbert space.
We end this section by remarking that the truncatability of symmetry operators has also been discussed in the context of continuum field theory. In particular, the authors of [103] define global symmetry as splittable if the corresponding symmetry operator can be truncated. Note that even when the symmetry operator is not splittable, there still exist movement operators that move the defect in space and map one defect Hilbert space to another one. We conclude that any global symmetry has a generalized split property, where the movement operator is considered a generalization of the truncated symmetry operator.

Anomalies and gauging on the lattice
In this section, we derive our formula for 1+1d 't Hooft anomalies on the lattice. We introduce a method for gauging arbitrary internal symmetries on the lattice and show the anomaly is the obstruction to gauging. By imposing spatial symmetries, we find mixed anomalies that capture the obstruction to gauging while preserving the spatial symmetries. In particular, we compute the LSM anomaly capturing the mixed anomaly between an internal symmetry and lattice translation.

The anomaly
We compute the anomaly locally using the unitary fusion operators, defined in equation (2.15), which describes the fusion of topological defects. The basic idea is to perform Fmoves that probe the associativity of the fusion operation. 27 We consider three defects g 1 , g 2 , g 3 on three consecutive links and fuse them in two different orders. The result must differ by a phase F j (g 1 , g 2 , g 2 ) ∈ U (1) that captures the anomaly (as we show later) and is given by The spacetime diagram on the left and right-hand sides correspond to unitary local operators conjugating the Hamiltonian of three defects g 1 , g 2 , g 3 to the one with a single defect g 1 g 2 g 3 on link (j, j + 1). Therefore their ratio, F j (g 1 , g 2 , g 3 ), commutes with the defect Hamiltonian H (j,j+1) g 1 g 2 g 3 . Since we assume the defects are simple, 28 there is no non-trivial local operator commuting with the defect Hamiltonian. Thereby, we find that F j (g 1 , g 2 , g 3 ) is just a phase factor.
The F-moves define a map F j : G×G×G → U (1), which in terms of the fusion operators is written as (3.2) Since the fusion operators are well-defined up to a phase, F j has some ambiguities that we discuss below. Moreover, the map F j satisfies a modified pentagon identity. These two facts are the defining properties of the map F j , which we show to be the 't Hooft anomaly.
I. Modified pentagon identity: We insert four defects g 1 , g 2 , g 3 , g 4 on consecutive links and consider the fusion operators that fuse them in two different orders: g 1 × (g 2 × (g 3 × g 4 )) and ((g 1 × g 2 ) × g 3 ) × g 4 . F-moves relate these fusion operators in two different ways, which leads to a constraint on the map F j .

(3.5)
This is the lattice version of the pentagon equation in the continuum where the term on the right-hand side is absent.
II. Phase ambiguity: Consider a phase redefinition of the fusion operators given by a map γ j : G × G → U (1), which changes Such a phase ambiguity leads to the identification (3.7)

Relation to group cohomology
We denote the equivalence class of the map F j under the identification (3.7) by [F j ]. In the next subsection, we will show that [F j ] is the obstruction to gauging G and thus is the 't Hooft anomaly in G. Before doing that, we want to show that our result is consistent with the proposed group cohomology classification of anomalies. Specifically, we identify [F j ] as an element of H 3 (G, U (1)). Moreover, imposing additional (spatial) symmetries restricts the possible phase ambiguities in (3.6). As a result, we find less identification on F j and thus more possibilities for the anomaly, specifically the mixed 't Hooft anomaly between G and the additional imposed symmetry. In particular, imposing lattice translation symmetry identifies [F j ] as an element of H 3 (G, U (1)) × H 2 (G, U (1)).
Anomaly cocycles: We decompose F j : G × G × G → U (1) into the 3-cocycle ω j and 2-cocycle α j , 29 which are denoted by Below, we rewrite equations (3.5) and (3.7) in terms of these cocycles and phrase them in the language of group cohomology. See [21] for a physicist review of group cohomology theory.

(3.11)
In terms of these maps, the identification (3.7) is equivalent to the following identifications. We find that ω j is well-defined up to . (3.12) The extra term on the right-hand side is known as a coboundary/exact term and is denoted by (δ 2 γ j 2 )(g 1 , g 2 , g 3 ). This identifies the equivalence class of ω j , denoted by [ω j ], as an element of H 3 (G, U (1)). For the 2-cocycle α j we find which is equivalent to [α j ] ∈ H 2 (G, U (1)) when γ j 2 = γ j−1 2 . Putting everything together we find the constraints and identifications Depending on whether we impose a lattice translation symmetry or not we find the following classification for the anomaly: a. No translation symmetry: If we do not impose any other symmetry besides G, the phase redefinitions given by γ j are arbitrary. As a result, by doing the phase redefinition the identification (3.15) becomes for all j. Here we have used the fact that δ 2 α j = ω j /ω j−1 and α j (g, 1) = 1. This means that when there are no other symmetries we can completely eliminate the 2-cocycle α j . Thus, the anomaly involving only G is given by [ω] ≡ [ω 0 ] ∈ H 3 (G, U (1)).
b. With translation symmetry: Imposing a lattice translation symmetry T satisfying T λ j T −1 = λ j+1 , restricts the phase redefinitions and the cocycles to be j independent. Therefore, we can drop the superscript j on these cocycles and find the constraints and identifications ω ∼ ω (δ 2 γ 2 ) and α ∼ α (δ 1 γ 1 ) . (3.19) This means that the anomaly involving G and the translation symmetry is given by We end the discussion here by remarking that for continuous symmetries, the cocycles that appeared above are restricted and should satisfy some continuity constraints. Since anomalies in the continuous case are conjecturally classified by the Borel cohomology group [21], a conjecture is that one only uses Borel measurable cocycles.
Our working assumption, which may or may not lead to Borel measurable cocycles, is the following. Consider a connected Lie group G and divide the group manifold of G into a finite number of patches. We assume that there exists a choice of patches such that the defect Hilbert spaces inside each patch are constant and the defect Hamiltonian is a continuous function of the group parameters inside each patch. For the case of G = U (1) that is discussed in Section 4.3, we choose a fundamental domain [0, 2π) to parametrize the group elements. This is equivalent to covering U (1) by two patches where the defect Hamiltonian is continuous inside each patch.

Gauging (non-on-site) symmetries
Here, we describe a method for gauging internal symmetries, which may not be on-site, using topological defects. We show that the anomalies discussed above are the only obstructions to this gauging procedure. Our method generalizes the standard gauging of on-site symmetries and consists of two steps: adding dynamical gauge "fields" and imposing Gauss's law. In the first step, we enlarge the Hilbert space by adding all possible defects on links. In the second step, we impose Gauss's law constraints on sites and find that it is consistent to do so only if the anomaly vanishes.

1) Adding dynamical gauge fields:
Consider an internal symmetry G and sum over the insertion of G topological defects on each link. Concretely, consider a periodic chain with L sites and extend its Hilbert space H to H ≡ g 1 ,...,g L ∈G H g 1 ;g 2 ;...;g L ∼ g 1 ,...,g L ∈G where H g 1 ;g 2 ;...;g L is the defect Hilbert space for the system with g j defect on link (j, j + 1). When G is a discrete group, this corresponds to adding |G|-dimensional Hilbert spaces on links, and for continuous symmetries we add scalar fields on links for each generator of G. We extend the Hamiltonian H to H ≡ g 1 ,...,g L ∈G H g 1 ;g 2 ;...;g L ⊗ Π g 1 ,g 2 ,...,g L , where H g 1 ;g 2 ;...;g L is the defect Hamiltonian for the system with g j defect on link (j, j + 1), and Π g 1 ,g 2 ,...,g L is the projection operator into H g 1 ;g 2 ;...;g L .
For simplicity, we consider the case where G is discrete and each defect Hilbert space is an identical copy of the untwisted Hilbert space. In that case, we find the extended Hilbert space and Hamiltonian Here, |g 1 , . . . , g L ⟩⟨g 1 , . . . , g L | links = L j=1 |g j ⟩⟨g j | (j,j+1) where |g j ⟩⟨g j | (j,j+1) is a projection operator acting on link (j, j + 1) that fixes the value of the defect on that link to be g j ∈ G.
2) Imposing Gauss's law: Now we extend the fusion operators λ J (g, h) into which acts non-trivially only on sites J and J +1 and links (J −1, J) and (J, J +1). Crucially, the extended fusion operator λ J (g, h) commutes with the extended Hamiltonian H. This follows from the defining property of the fusion operators, that is λ J (g j−1 , g j ) H g 1 ;...;g L = H g 1 ;...;g j−2 ;1;g j−1 g j ;g j+1 ;...;g L λ J (g j−1 , g j ) . (3.25) We note that λ J (g, h) is similar to a gauge transformation, except that it is not unitary.
We construct unitary operators out of the fusion operators by considering which acts unitarily on both the degrees of freedom on sites and links. The unitary operators G j (g) generate a local G symmetry of the extended Hamiltonian since we have for g, h ∈ G. The global part of this symmetry is Finally, to gauge this local symmetry we need to impose the Gauss's law constraints G j (g) = 1 at all sites. The Gauss's law constraint at site j is given by where P j is a local projection operator.
All in all, the gauged theory is described by the lattice Hamiltonian H and Hilbert space H that is subject to the Gauss's law constraints (3.29). However, it is consistent to impose Gauss's law constraints if they commute with each other at different sites. As we will show below, this is the case if and only if F j (g 1 , g 2 , g 3 ) = 1 for all g 1 , g 2 , g 3 ∈ G.
Since we are assuming that the defects have a width of k = 1, the Gauss's law constraints that are at least two sites apart necessarily commute with each other. Hence, we only need to check whether P j commutes with P j−1 or not, which is equivalent to The two equations above are related by a unitary operator implementing the fusion g ′ 1 ×(g ′ 2 ×g ′ 3 ) on the top. Now we use F-moves to simplify the equation on the right. First, we use the following to eliminate the "bubbles" Next, we perform F-moves on both sides of the equation to get (3.32) Finally, by applying two additional F-moves on the right-hand side, we simplify the equation further and find that . (3.33) By setting g ′ 1 = 1, g ′ 2 = g 1 , and g ′ 3 = g 2 g 3 the equation above reduces to F j (g 1 , g 2 , g 3 ) = 1. This is because F j (1, g, h) = F j (g, 1, h) = 1, which follows from λ j (1, g) = 1.
In summary, we find that Gauss's law constraints commute with each other at different sites if and only if F j = 1. However, even if F j is not trivial, we might be able to trivialize it using the phase redefinition of the fusion operators reflected in the identification (3.7). Therefore, we justify that [F j ] is the 't Hooft anomaly since it is the obstruction to gauging.
As mentioned before, when we allow arbitrary phase redefinition, the anomaly [F j ] is identified with the cohomology class [ω] ∈ H 3 (G, U (1)). By imposing additional symmetries, we have less freedom in phase redefinitions. For instance, by imposing a lattice translation symmetry T , we only allow for j-independent phase redefinition that respect the relation T λ j T −1 = λ j+1 . The latter relation leads to the condition T P j T −1 = P j+1 , that is the statement that the translation operator is gauge invariant. Therefore, the (generalized) LSM anomaly [α] ∈ H 2 (G, U (1)), which we find by restricting to j-independent phase redefinitions, is the obstruction to gauging G while preserving the translation symmetry. Thus, we justify that the LSM anomaly is the mixed 't Hooft anomaly between G and lattice translation symmetry.
Throughout the discussion in this section, we assumed that the defects have width k = 1. The discussion can be generalized for k > 1 to compute the H 3 and LSM anomalies involving T l for any l ≥ k. To do such, we simply insert the defects so they are always l sites apart. In this way, we can compute the LSM anomaly involving subgroups of translation generated by T l . Consider the subgroups generated by T k and T k+1 . These two subgroups generate all the translations; therefore, knowing the anomaly for these two subgroups is enough to determine the anomaly in the full translation symmetry group Z. Therefore, our method can be generalized to compute the anomaly for defects of arbitrary finite width.
Relatedly, we can consider defects for lattice translations and "almost" compute a 3cocycle in Z×G. 30 As mentioned before, defects for lattice translations correspond to adding or removing a site. Removing k sites is a topological defect of width k, and adding k sites is a defect of width 1. Thus we can consider defects for adding an arbitrary number of sites. This way, we compute a 3-cocycle in the semi-group G × Z ≥0 . By doing the computation, we find that this 3-cocycle is equal to However, knowing the 3-cocycle for non-negative integers is as good as knowing the full 3-cocycle.

Anomaly matching
Here, we show a version of 't Hooft anomaly matching on the lattice. The idea is that the anomaly of the microscopic theory should match with the anomaly of the low-energy degrees of freedom. Specifically, we show that a theory with a non-trivial anomaly cannot have a unique gapped ground state. Below, we do not attempt to provide a rigorous proof and only outline an idea for one.
Since the anomaly takes discrete values, it cannot change under continuous deformations. This is because the anomaly is an element of the group cohomology H 3 (G, U (1)) × H 2 (G, U (1)), which is a discrete group. Therefore, the discussion here leads to a stronger statement: a theory with a non-trivial anomaly does not have a symmetric deformation to a gapped phase with a unique ground state.
To show that [F j ] ̸ = 1 forbids a unique gapped ground state, we first show the following lemma: If the untwisted Hamiltonian has a unique gapped ground state, then the defect Hamiltonians must also have a unique gapped ground state. We assume that the system with a single defect has d > 1 ground states, and show that the system without a defect cannot have a unique gapped ground state. We begin with the untwisted Hamiltonian and conjugate it with (λ 1 (g, g −1 )) −1 to create a pair of g and g −1 defects around site 1. Using the movement operators, we move them far away from each other. Then, we cut the system into two halves, each containing a single defect, and consider the reduced density matrices for the ground state in each region. The fact that each region has d > 1 ground states is in contradiction with the split property of the ground state |Ω⟩ of the untwisted system. The split property, proven in [105], states that |Ω⟩ can be approximated by its reduced density matrices in each half of the chain. 31 This property follows from the area law of entanglement entropy, which holds for the ground states of gapped Hamiltonians in 1+1d [108]. 32 We denote the ground state of the defect Hamiltonian H (j,j+1) g by Ω (j,j+1) g and call it a defect state. Crucially, the defect states only differ from each other around the location of the defect. In other words, the expectation value of a local operator inserted far away from the defect should be the same for two different defect states. This follows from the split property of the ground state |Ω⟩, which allows us to construct the ground state Ω (j−k,j−k+1);(j,j+1) g;h of the system with two defects, that are separated by k ≫ 1 sites, from the ground state of the system with one defect. We take k to be much larger than the correlation length of the system which specifies the characteristic width of the defect in defect states. 31 The split property was used in [40,41] to prove a generalized LSM theorem rigorously for on-site symmetries. See also [106,107] for rigorous results on the classification of 1+1d and 2+1d SPTs. 32 We thank Nati Seiberg and Shu-Heng Shao for related discussions.
By acting with the fusion operators, we map these ground states to each other and find λ j (g, h)λ j−1 (g, 1) · · · λ j−k+1 (g, 1) Ω for some phase factors φ j (g, h) ∈ U (1). Here, we take k to be large enough such that the split property guarantees the phase φ j (g, h) is independent of other defects inserted k sites away from the interval [j − k, j]. The idea is to compute the anomaly in terms of these phases and show that it is trivial in cohomology. Consider the defect state Ω (j−2k,j−2k+1);(j−k,j−k+1);(j,j+1) g 1 ;g 2 ;g 3 and apply F-moves to find This implies that the anomaly ω j is trivial in cohomology. Now let us consider the case with a lattice translation symmetry. We impose a translation symmetry T and choose the defect states such that (3.37) This implies the phases that appear in equation (3.35) are j-independent, i.e. φ j = φ j+k . Therefore, we find that the anomaly (α j (g 1 , g 2 )) k is trivial in cohomology. Repeating the same argument for k +1 we find that both (α) k and (α) k+1 are trivial, and therefore the LSM anomaly [α] must be trivial. This is a generalized LSM theorem stating that a non-trivial generalized LSM anomaly [α] ∈ H 2 (G, U (1)) forbids a unique gapped ground state.

The continuum limit and emanant symmetries
Here, following [57], we explain how the anomaly of the UV lattice system is matched with the continuum theory in the IR. We give a geometric argument that F-move, and therefore F j (g 1 , g 2 , g 3 ), captures the anomaly in the continuum theory. For lattice translation symmetry, the anomaly is matched by an emanant symmetry in the IR as explained in [57]. The emanant symmetry is an internal symmetry of the IR theory that is generated by the continuum limit of the lattice translation by one site.
The basic idea is the following relation between topological defects and background gauge fields. Coupling a quantum field theory to flat background gauge fields for an internal symmetry G corresponds to inserting G-symmetry defects across various cycles in both the time direction and space [6]. Given a configuration of topological defects, we can compute the holonomy of the gauge fields as follows. Note that the holonomies around various 1-cycles capture all the gauge invariant information of flat background gauge fields. For a 1-cycle γ, each time it intersects with a g-symmetry defect, it contributes a g-holonomy. Thus the total holonomy is given by the product of the group elements associated with the defects that the 1-cycle intersects. This determines a flat G connection given a network of topological defects inserted in the spacetime manifolds. The opposite procedure, however, is not unique and this is where anomalies appear.
An internal symmetry G is anomaly free if one can unambiguously assign a configuration of topological defects for a given flat G connection (see e.g. [6]). To describe a G connection, we divide the spacetime manifold into different patches and assign G transition functions across different patches. We insert topological defects on the interface between different patches that match the transition functions. In this way, we have coupled the theory to flat background gauge fields. However, dividing the manifold into patches is not unique and different choices are related by gauge transformations. Any two configurations that describe the same flat G connection are related by a sequence of F-moves (3.1). Another ambiguity in describing flat connections in terms of topological defects is the phase ambiguity associated with junctions in the triple intersection of topological defects, i.e. the fusion operators. Therefore, the theory is anomaly-free if one can redefine the fusion operators' phases such that F j = 1.
The argument above explains why the anomaly F j involving an internal symmetry G matches with the IR theory in the continuum. This is because the phases F j have a discrete classification and thereby cannot change under taking the continuum limit. The argument applies to mixed anomalies between G and any other symmetry H, such as lattice translations. We note that imposing H restricts the possible phase redefinition of the junction operators. We require that the configuration of G-defects transform covariantly with respect to H. Phase redefinition of the junctions corresponds to local counterterms in the continuum. A mixed anomaly between G and H arises if one cannot trivialize the anomalous phase F j by adding counterterms that respect the symmetry H. When H is a translation symmetry, the mixed anomaly is captured by a 2-cocycle [α] ∈ H 2 (G, U (1)).

Examples and other spacetime symmetries
Here, we will study four examples demonstrating the general results in the previous sections. In Section 4.4, we generalize our results to the case of fermionic theories and consider a fermionic example.

LSM for on-site symmetries -the Heisenberg chain
Here we consider internal symmetries that act, either linearly or projectively, on-site. Specifically, we consider systems with a G internal symmetry such that the symmetry operators are written as where U j g is a unitary operator that acts nontrivially only on site j. Moreover, these local operators form a representation of G in the sense that The symmetry is realized linearly on-site if there exists a phase redefinition of the operators U j g such that U j g U j h = U j gh . Otherwise, the symmetry is realized projectively on-site. We also assume that there exists a translation symmetry T satisfying This condition implies that the internal symmetry G commutes with the translation symmetry, i.e. T U g = U g T . Later, we comment on the case where this is not the case.
Heisenberg chain: An example is the anti-ferromagnetic spin-half Heisenberg chain, which appears in the original LSM theorem. The Hilbert space is a tensor product of spin-1 2 degrees of freedom per each site of the chain. The Hamiltonian is where ⃗ σ j = (σ x j , σ y j , σ z j ) are the Pauli matrices acting on site j. This model has an internal SO(3) symmetry that is realized projectively on-site. Each symmetry operator is written as a product of local factors where ⃗ θ = (θ x , θ y , θ z ) parametrizes the SO(3) transformations. The spin-half degrees of freedom on each site form a projective representation of SO(3). The system also has a translation symmetry T satisfying (4.6) We now show that in such systems, there is no anomaly in the internal symmetry but there is a generalized LSM anomaly. The case where the internal symmetry commutes with translation symmetry has been considered in [41].

The anomaly
Since the symmetry operators are written as a product of local factors, the fusion operators are given as This relation is independent of the Hamiltonian. Now, recall that the anomaly is given by the relation (4.8) Using this we find U j g 1 U j g 2 = F j (g 1 , g 2 , g 3 )U j g 1 g 2 . We find that F j (g 1 , g 2 , g 3 ) is independent of g 3 , therefore ω j (g 1 , g 2 , g 3 ) = 1 and hence there is no anomaly involving only G. Furthermore, because of the translation symmetry F j (g 1 , g 2 , g 3 ) is j-independent. Therefore α(g 1 , g 2 ) = F j (g 1 , g 2 , 1) where Thus we see that the LSM anomaly [α] ∈ H 2 (G, U (1)) determines the projective representation of the symmetry on each site.
Dipole-type symmetries: Above, we only considered the cases where the internal symmetry commutes with lattice translation. Let us now consider the case that there is a semidirect product structure between the internal and translation symmetry. In such cases, there exists an automorphism ϕ : G → G such that An example of this is the dipole symmetry [109].
We claim that even in such cases the projective phases above correspond to an anomaly. We note that α j is no longer j-independent. Instead, we have the relation α j (g 1 , g 2 ) = α j+1 (ϕ(g 1 ), ϕ(g 2 )) . (4.11) In such cases, [α 1 ] can be identified as the anomaly in the following sense. We can gauge G while preserving the translation symmetry only if [α 1 ] = 1.
We note that preserving the translation symmetry means that after gauging G the translation operator T must be gauge invariant and hence commutes with the Gauss's law constraints. Moreover, the relation (4.10), leads to the fact that T P j T −1 = P j+1 . Thus we preserve the translation symmetry if we only consider j-independent phase redefinitions of the fusion operators that do not violate the relation (4.10). Therefore, we see that F j can be trivialized by j-independent phase redefinitions if and only if [α 1 ] = 1. Therefore [α 1 ] ∈ H 2 (G, U (1)) is the anomaly involving G and lattice translation.

Non-invertible lattice translation -a gauged XYZ chain
As shown above, if an internal symmetry G is realized projectively on-site, it can be gauged, but it has a mixed anomaly with the lattice translation symmetry. What happens to the translation symmetry if we gauge the internal symmetry with an LSM anomaly? As we have argued, gauging the internal symmetry necessarily violates the original translation symmetry since it is no longer gauge invariant. We claim that the translation symmetry does not disappear completely after gauging G; instead, it appears as a non-invertible lattice translation symmetry. Here we demonstrate this in the case of the XYZ chain. We left the discussion of the more general cases elsewhere.

The XYZ chain
Consider a deformation of the Heisenberg chain such that it preserves the Z 2 × Z 2 subgroup of the SO(3) symmetry. The Hamiltonian is for coupling constants J x , J y , J z ∈ R. There is a Z X 2 × Z Y 2 symmetry generated by We note that the Z X 2 × Z Y 2 has an LSM anomaly since it is realized projectively on-site. The projective phase can be seen from the commutation relation σ x j σ y j = −σ y j σ x j . The fusion operators are given by , (4.14) where Using the formula for the anomaly, we find the anomaly cocycles: The phases given by α cannot be trivialized by j-independent phase redefinitions and thus is a true mixed anomaly between Z X 2 × Z Y 2 and lattice translation. However, we can trivialize it by using j-dependent phases at the expense of violating the translation symmetry.
Now we perform the gauging explicitly, following the procedure outlined in Section 3.2.
Adding gauge fields: First, we extend the system by adding dynamical gauge fields on links. We put the system on a periodic chain with an even number of sites L to ensure that the phase redefinition denoted above is well-defined, i.e. λ j+L = λ j . We add two qubits on each link associated with the Z X 2 and Z Y 2 symmetries, and denote them by Here ϵ = 1 (and ν = 1) corresponds to a non-trivial Z X 2 (and Z Y 2 ) defect on link (j, j +1). We define the corresponding Pauli operators by X x j,j+1 , X y j,j+1 , X z j,j+1 and Y x j,j+1 , Y y j,j+1 , Y z j,j+1 . 33 The extended Hamiltonian is given by where L = 2L. To see this, we note that the defect Hamiltonian for a Z X 2 defect on link (j, j +1) corresponds to changing the sign of the terms σ y j σ y j+1 and σ z j σ z j+1 in the Hamiltonian. Similarly, for the Z Y 2 defect we change the sign of σ x j σ x j+1 and σ z j σ z j+1 .
Gauss's law: Next, we find the Gauss's law constraints. Using equation (3.26), we find (4.20) The term that acts on sites can be simplified to (−1) j(ν 1 ϵ+ϵ 2 ν+ϵν) (−1) ϵ(ν 1 −ν) (σ x j ) ϵ (σ y j ) ν . Therefore, we find In summary, the generators of the local Z X 2 × Z Y 2 symmetry of the extended Hamiltonian (4.19) are given by: (4.21) The terms with explicit j-dependence correspond to the j-dependent phase redefinition defined above. Their purpose is to make these local symmetries commute with each other at different sites. Finally, the Gauss's law at site j is given by G j (X) = 1 and G j (Y ) = 1.
After gauging and imposing Gauss's law constraints, the lattice translation symmetry T is violated since it is not gauge invariant, i.e. T G j T −1 ̸ = G j+1 . However, translation by two sites is preserved since Gauge fixing: It is useful to perform local unitary transformations to find a presentation where the Hilbert space is a tensor product of local factors with no Gauss's constraints. First, we use the unitary operators G j (Y ) to rotate the spins at sites such that σ x j = 1 for all j. Next, we use G j (X) to set Y x j−1,j = 1 for even j, and set X z j,j+1 = 1 for odd j. Doing these transformations amount to the following choice of gauge: Note that with this choice, the only remaining degrees of freedom reside on even links. Therefore, we define and view the lattice as a chain withL = L/2 sites.
Using the gauge (4.22) and Gauss's law constraints G j (X) = G j (Y ) = 1, we write the old variables in terms of the new variables (4.24) In this presentation, the Hamiltonian (4.19) of the gauged theory is where the Hilbert space consists of two qubits per site that are acted upon by ⃗ µ l and ⃗ τ l .

Non-invertible translation symmetry
As mentioned above, the original lattice translation operator T is violated since it is not gauge invariant. However, it appears as a non-invertible lattice translation symmetry. The continuum version of this phenomenon is discussed in [110,111]. To find this non-invertible symmetry, it is useful to first discuss another symmetry of the system. Gauging the Z X 2 × Z Y symmetry, leads to a dual ZX 2 × ZỸ 2 symmetry generated by the Wilson line operators The translation symmetry T is not gauge invariant since it does not preserve Gauss's law constraints. We notice that violations of Gauss's law correspond to the insertion of the dual symmetry defects. Specifically, the defects G 2l (X) = −1 and G 2l (Y ) = −1, respectively, correspond to ZX 2 and ZỸ 2 symmetry twists at site l of the new chain. This is because X z 2l,2l+1 X z 2l+1,2l+2 = µ z l and Y z 2l,2l+1 Y z 2l+1,2l+2 = τ z l µ x l µ x l+1 are the movement operators for these defects, and at the same time, generate the ZX 2 × ZỸ 2 symmetry. Therefore, the translation symmetry T can be extended to an operator that acts on an extended Hilbert space with four sectors corresponding to the various ZX 2 × ZỸ 2 twists. This is the hallmark of non-invertible symmetries; see [112] for a discussion in the continuum, and see [113] for an alternative perspective. Putting the theory on a closed chain and projecting onto the untwisted sector we find a non-invertible translationT satisfying the algebrã Another way to see the non-invertible symmetry in this model is the following. By setting J z = 0, we identify the system after gauging as the stack of two transverse-field Ising models. The ⃗ µ l and ⃗ τ l degrees of freedom, respectively, correspond to Ising models with magnetic field strengths given by J y /J x and J x /J y . The Hamiltonian (4.25) is self-dual under gauging ZX 2 × ZỸ 2 since gauging inverts the coupling constants J y /J x and J x /J y , which can be undone by swapping ⃗ µ l with ⃗ τ l . Because of the self-duality under gauging, the model has a non-invertible symmetry generated by the corresponding "duality defect" [88,8].
Finally, the non-invertible symmetryT acts on operators as (4.28) The action above is only a formal, but practically useful, expression on infinite chains. On a closed chain,T annihilate any state which is not invariant under the ZX 2 × ZỸ 2 symmetry. The commutation relations betweenT and ZX 2 × ZỸ 2 invariant operators are given bỹ

Lattice chiral gauge theories -the modified Villain model
Here we discuss the modified Villain model of compact boson theory [114][115][116], which realizes anomalous chiral U (1) L and U (1) R symmetries of the compact boson theory on the lattice. We study the Hamiltonian description of this model that was presented in [57,117]. At the end of this section, we explain how to construct Abelian chiral gauge theories on the lattice using the modified Villain theory.

The modified Villain XY-model
The Hilbert space consists of non-compact fields ϕ j at site j, and Z-valued gauge fields n j,j+1 on link (j, j + 1). We also have the conjugate momenta p j and compact electric-fields E j,j+1 that satisfy the commutation relations The Hamiltonian is where the physical Hilbert space is given by imposing Gauss's law constraints One interesting feature of this model is its exact T-duality exchanging the degrees of freedom on sites with the degrees of freedom on links. The T-duality transformation maps gaugeinvariant operators into gauge-invariant operators and hence respects Gauss's laws. However, the duality transformation does not commute with the gauge transformation generated by G j . It only maps the gauge-invariant states |ψ⟩, with G j |ψ⟩ = |ψ⟩, to themselves. But it does not preserve other eigenvalues of G j .
We note that other eigenvalues of G j correspond to the insertion of winding-symmetry defects at site j. Moreover, since the duality transformation exchanges the momentum and winding symmetry, it should also exchange the corresponding topological defects. We slightly change the presentation of the model to make the T-duality more manifest.

Alternative presentation
In a slight rewriting of the model, we make the electric fields E j,j+1 non-compact and impose their compactness by extra Gauss's-law type constraint that is e 2πin j,j+1 = 1. We emphasize that this rewriting does not change the system. We interpret the new Gauss's law as coming from "magnetic" Z gauge transformations. This formulation has the advantage that different eigenvalues of the new Gauss's law correspond to the insertion of momentum-symmetry defects. We will see that in this formulation, T-duality manifestly exchanges the momentum and winding defects. In particular, the Hilbert space without any defect (i.e. the gauge invariant Hilbert space), is mapped into itself under the action of T-duality.
In the new presentation, we have a chain with non-compact fields ϕ j andφ j,j+1 respectively at site j and link (j, j + 1). The conjugate momenta are p j andp j,j+1 that satisfy the commutation relations The Hamiltonian is 34 (4.35) We have electric Gauss's law constraints at sites and magnetic ones on links: where g j ≡ −p j +φ j,j+1 −φ j−1,j 2π andg j,j+1 ≡ −p j,j+1 , and Defects: The eigenspaces G j = e iηw andG j,j+1 = e iηm , respectively, correspond to insertion of winding-symmetry and momentum-symmetry defects. The defects are topological since the unitary operators e −iηmg j and e −iηwg j,j+1 move them by one site. These unitary operators permute different eigenspaces of G j andG j,j+1 while commuting with the Hamiltonian. More precisely, we define a (η m , η w ) ∈ U (1) m × U (1) w defect at link (j, j + 1) by modifying the Gauss's law tõ . (4.38) In this presentation, the insertion of defects corresponds to a modification of the Hilbert space instead of the Hamiltonian, i.e.
Charge conjugation symmetry: Besides U (1) m ×U (1) w symmetry, there is also a charge conjugation symmetry C that anti-commutes with the momentum and winding charges. To find the defect, we conjugate the Hamiltonian and Gauss's law operators by the truncated charge conjugation operator C ≤J = C J C J−1 C J−2 · · · acting as for j > J . (4.47) We now consider topological defects for (U (1) m × U (1) w ) ⋊ Z C 2 . We parametrize the symmetry group by (η m , η w , ϵ) with the "multiplication" rule with the identification η m ∼ η m + 2π and η w ∼ η w + 2π, and where ϵ, ϵ ′ = ±1.

Fermionic theories -N Majorana fermions
Here we discuss anomalies of fermionic theories. In such theories, there is a Z F 2 fermionparity symmetry, or more precisely, a Z F 2 automorphism of the operator algebra. Usually, this automorphism is an inner automorphism and is denoted by (−1) F . The notion of locality in fermionic theories differs from bosonic ones since two fermionic operators with disjoint support anti-commute with each other. Below, we consider systems with a lattice translation symmetry that we denote by Z T , and an internal symmetry group G. We denote the bosonic "part" of the symmetry by G b = G/Z F 2 . Following the ideas from [59] and [68], we claim that there are three 'layers' of anomalies in 1+1d fermionic systems: 1. The first layer is classified by and is measured by the number of Majorana zero modes modulo 2 localized on the defects. It is sometimes referred to as the Arf layer since it corresponds to the 0+1d anomaly of (−1) F whose bulk 1+1d SPT realization is given by the Arf invariant of 2-dimensional spin manifolds.

The second later is classified by
. This layer captures the mixedanomaly between G b ×Z T and Z F 2 , which has a term valued in H 2 (G b , Z F 2 ) capturing the mixed anomaly between G b and Z F 2 , and another term valued in H 1 (G b , Z 2 ) capturing the cubic mixed-anomaly between all three symmetries. The latter is a fermionic generalization of the LSM anomaly. This anomaly is given by the fermion parity of the fusion operators. Let us define the fermion parity of the fusion operators by K(g 1 , g 2 ) = ±1, where (−1) F λ j (g 1 , g 2 )(−1) F = K(g 1 , g 2 )λ j (g 1 , g 2 ) . (4.56) Acting with (−1) F on equation (3.2), we find that K satisfies a modified cocycle condition K(g 2 , g 3 )K(g 1 , g 2 g 3 ) K(g 1 g 2 , g 3 )K(g 1 , g 2 ) = K(g 1 , 1) . (4.57) Moreover, by conjugating the defect Hamiltonian H (j,j+1) g by a local unitary operator of fermion parity γ(g) = ±1, we find the identification 37 (4.59) These leads to standard cocycle conditions for β(g 1 , g 2 ) ≡ K(g 1 , g 2 ) K(g 1 , 1) and f (g) ≡ K(g, 1) . (4.60) Here, f : G → Z 2 is a group homomorphism that measures whether the movement operator for a g-defect is bosonic or fermionic. We note that by conjugating defect Hamiltonian by fermionic local operators the 2-cocycle β is shifted by an exact term.
To get the anomaly we mod out the cocycles by the freedom of redefining the defect Hamiltonians by local unitaries and find the cohomology classes Here, [β] is a mixed anomaly between G b and Z F 2 . The homomorphism f is a fermionic generalization of LSM anomaly that involves translation, G b , and Z F 2 . 3. The third layer is just the bosonic layer that has been discussed in length before. It is classified by Putting everything together the anomaly in G b × Z T × Z F 2 is classified by (4.62) Forgetting the translation symmetry, this classification is compatible with [128]. See [45], for a discussion of fermionic LSM anomalies for on-site internal symmetries. As a concrete 37 Without a translation symmetry we have K j (g 2 , g 3 )K j (g 1 , g 2 g 3 ) K j (g 1 g 2 , g 3 )K j−1 (g 1 , g 2 ) = K j−1 (g 1 , 1) and K j (g 1 , g 2 ) ∼ K j (g 1 , g 2 ) γ j−1 (g 1 )γ j (g 2 ) γ j (g 1 g 2 ) .
(4. 58) example, below we consider the chain of N free Majorana fermions.

Free Majorana fermions
Consider a chain of N flavor of free Majorana fermions with the Hamiltonian where {ψ a j , ψ b j ′ } = 2δ j,j ′ δ a,b , and a is a flavor index. The model has a Z T lattice translation symmetry T acting as T : ψ a j → ψ a j+1 . (4.64) There is also a global O(N ) symmetry that rotates ψ a j at a given site among each other, i.e.
for an N × N orthonormal matrix R. Here, Z F 2 ∈ O(N ) is generated by the central element (−1) F = U −1 that acts as ψ a j → −ψ a j . The bosonic symmetry group is given by the quotient We note that every element of O(N ) is a product of at most N "reflections". Therefore, we can generate the O(N ) global symmetry by reflections. Reflection along the plane perpendicular to a vector ⃗ v ∈ R N , up to an overall sign, is generated by the unitary operator More precisely, where L is the number of sites. Therefore, up to the action of (−1) F , the global O(N ) symmetry is generated by U ⃗ v . In another words, the quotient symmetry for n ≤ N . Here, R ∈ O(N ) correspond to an N × N matrix given by the product of n reflections along the planes perpendicular to the vectors ⃗ v k for k = 1, 2, · · · , n. This system also has reflection and time-reversal symmetries that we do not discuss here; see [43,46,129] for a discussion. 38 We can construct the defects by conjugating the system with the truncated symmetry operator. However, since the symmetry is a product of "local" factors, the fusion operators take the simple form

Anomalies
Now let us find the anomalies involving the O(N ) × Z T symmetry. Specifically, we discuss the three layers of anomaly involving O(N )/Z F 2 × Z T .
First layer: The first layer corresponds to the number of Majorana zero modes on the symmetry defects. For the internal symmetry G b = O(N )/Z F 2 , the defect Hilbert space is the same as the original Hilbert space since the symmetry is written as a product of local terms. Therefore, there are no extra degrees of freedom and no Majorana zero modes on the internal symmetry defects. Therefore, there is no H 1 (G b , Z Arf 2 ) anomaly. The other anomaly is classified by H 1 (Z T , Z Arf 2 ) ∼ = Z 2 . This counts the number of Majorana zero modes per site which is equal to the number of flavors N (mod 2). To see this, we note that at each site we have a Clifford algebra of rank N which has a center for odd N . When N is odd, the central element, ψ 1 j ψ 2 j · · · ψ N j , is the Majorana zero mode at site j. Therefore, there is an anomaly involving fermion parity Z F 2 and lattice translation when N is odd.
Second layer: The anomaly in the second layer corresponds to the fermion parity of the fusion operators. We find that when n is odd and the internal symmetry is a product of an odd number of reflections (i.e. det(R) = −1), then the fusion operator is fermionic and otherwise it is bosonic -see equation (4.69). This means that K(R 1 , R 2 ) = det(R 1 ) in equation (4.56). Therefore, β = 1 and f (R) = det(R). Thus, we conclude that there is no anomaly involving O(N )/Z F 2 and Z F 2 . However, there is a cubic mixed anomaly involving O(N )/Z F 2 , Z F 2 , and lattice translation which is given by det(R). This anomaly gets trivialized if we consider the SO(N ) subgroup of O(N ).
Third layer: The third layer is the bosonic layer of the anomaly we discussed earlier.
Since the internal symmetry acts "on-site", this anomaly is captured by the projectivity of the action of the symmetry on each site. We note that the Clifford algebra at site j generates the group Pin + (N ) which is a double cover of O(N ). Specifically, the faithful symmetry group is O(N ) = Pin + (N )/{±1}. When N ≥ 3, Pin + (N ) is a non-trivial Z 2 extension of O(N ) and therefore the symmetry is realized projectively per site. This leads to an LSM-type anomaly for the O(N ) × Z T symmetry when N ≥ 3.
We note that our anomaly detection method is local; hence, we do not specify the chain details, such as the number of sites and the boundary conditions. Relatedly, we do not specify the Hilbert space of the theory and instead focus on the algebra of local operators. However, for a finite chain, we construct the Hilbert space as an irreducible representation of the operator algebra. In some cases, the operator algebra has a center which leads to different irreducible representations. The eigenvalue of a central element should be viewed as a theta parameter. Alternatively, one can sum over such theta parameters (which corresponds to gauging a (−1)-form symmetry). For instance, in a system with an odd number of Majorana fermions, there is a central element given by the product of all Majorana operators. This central element leads to a Z 2 valued theta parameter which is odd under the fermion parity automorphism (−1) F . Thus, the theta parameter breaks Z F 2 . Alternatively, we can consider a larger Hilbert space by summing over the two values of the theta parameter and restoring the Z F 2 global symmetry. For a detailed discussion of such issues see [43,46].

Gauging and bosonization
As discussed above, the O(N ) internal symmetry has no pure anomaly and can be gauged. However, there can be a mixed anomaly involving O(N ) and lattice translation. Therefore, the original lattice translation symmetry is violated upon gauging anomalous subgroups of O(N ). However, the lattice translation symmetry in such cases appears as a non-invertible symmetry in the theory after gauging. For instance, consider the Z 2 symmetry generated by a single O(N ) reflection. Gauging such a symmetry must violate the original translation symmetry.
Here, we consider the case of N = 1 and gauge the (−1) F symmetry following our gauging procedure. We add Z 2 gauge variables on links represented by Pauli matrices σ x j,j+1 , σ y j,j+1 , σ z j,j+1 , and find the extended Hamiltoniañ Using the fusion operators (4.69), we find the Gauss's law constraints σ z j−1,j ψ j σ z j,j+1 = 1 . (4.71) However, due to the anomaly, these Gauss's law constraints do not commute with each other at different sites. However, we modify Gauss's law constraints such that they commute with each other at the expense of violating the translation symmetry. To do such, we first need to make the fusion operators bosonic.
The trick is to add a Majorana fermion χ j at each site, and then project them out by considering the constraints iχ 2l χ 2l+1 = 1 . We assume the anti-commutation relation {ψ j , χ j ′ } = 0 and {χ j , χ j ′ } = 2δ j,j ′ . The Majorana fermions χ j have trivial bulk dynamics and define an invertible fermionic theory known as the Kitaev chain [131]. This invertible theory serves as a choice of discrete torsion for gauging Using the added Majorana fermions, we find the modified Gauss's law constraints 39 G j ≡ iσ z j−1,j ψ j χ j σ z j,j+1 = 1 and iχ 2l χ 2l+1 = σ x 2l,2l+1 . (4.73) These local constraints commute with each other. However, they break lattice translation symmetry by one site and only preserve translations by an even number of sites. Below, we do gauge fixing and simplify the gauged theory.
By performing gauge transformations, we rotate the Majorana fermions such that iψ 2l−1 ψ 2l = −1 . We identify this as the familiar transverse-field Ising model on a chain with half the number of sites compared to the Majorana chain. We have done the microscopic version of the bosonization on the lattice. This prescription is more general than the Jordan-Wigner transformation and can be applied to any fermionic lattice Hamiltonian system with an anomaly free Z 2 internal symmetry.
Finally, the translation symmetry operator T of the Majorana chain does not commute 39 The auxiliary Majorana fermions χ j allow us to gauge any subgroup of the O(N ) flavor symmetry.
with the Gauss's law constraints (4.73) and therefore is not gauge invariant. By taking its gauge-invariant matrix elements, we find a non-invertible lattice translation symmetry. 40 For a detailed discussion of this non-invertible symmetry see [46,133].

(A.2)
From this equation, we see that χ a is "gauge invariant" in the sense that it does not change under phase redefinition of the fusion operators. Therefore χ a is identified with the anomaly of the Z 2 symmetry inside H 3 (Z 2 , U (1)) ∼ = Z 2 .
For our choice the anomaly 3-cocycle we have χ a = ω(a, a, a), which can be seen using the fact that λ j commute with λ j+2 . Note that in our construction, the anomaly 3-cocycle satisfies the relation ω(1, g 2 , g 3 ) = ω(g 1 , 1, g 3 ) = ω(g 1 , g 2 , 1) = 1. Hence, for a Z 2 symmetry ω(a, a, a) captures the anomaly since it is the only non-trivial element of the anomaly 3cocycle.
B Comparison with Else-Nayak [1] In this appendix, we show when the anomaly detection method of Else and Nayak [1] works, our method gives the same result as theirs. 42 The Else-Nayak method works for internal symmetries that are realized by finite-depth local unitaries. Our method can capture the anomaly in any locality-preserving symmetry that is not necessarily realized by a finitedepth quantum circuit. Moreover, we can also detect mixed anomalies involving internal symmetries and any other symmetry, such as reflection that is not even locality-preserving.
Here, we consider an internal symmetry G, where each symmetry operator is written as a product of local terms. Specifically, we have U g = · · · U j+2 g U j+1 g U j g U j−1 g U j−2 g · · · , (B.1) where U j g is a local operator with finite support around site j. For simplicity, we assume that U j g has support on at most sites j and j + 1. However, the conclusion of this section holds for the more general case where U j g has support at most on sites j, j + 1, · · · , j + k, for a fixed integer k.
The local factors U j g above are the movement operators of symmetry defects. In terms of the truncated symmetry operators, they are given by U j g = U ≤j g U ≤j−1 g −1 ; see equation (2.32). The defect Hamiltonian for two defects is given by H (j−1,j);(j,j+1) 42 We thank Wilbur Shirley for motivating us to write this appendix.
Therefore, the fusion operators are given by λ j (g 1 , g 2 ) = U ≤j g 1 g 2 U ≤j In [1], the anomaly cocycle is found by considering restricted symmetry operators that act on a finite region in space. In other words, they consider the truncated operators that act on the interval [J 1 , J 2 ], where J 1 < J 2 . Such a restricted symmetry operator represents a G action up to corrections localized around site J 1 and J 2 Here, Ω J L (g 1 , g 2 ) and Ω J R (g 1 , g 2 ) are unitary operators that have support around site J. Note that Ω J 1 L (g 1 , g 2 )Ω J 2 R (g 1 , g 2 ) −1 here is the same as Ω M (g 1 , g 2 ) in [1].

C Defects for antiunitary symmetries
As shown in Section 2.4, any locality-preserving symmetry operator is representable by a topological defect. In particular, we showed that defects for lattice translation correspond to adding or removing a site. Here, we construct topological defects for antiunitary symmetries.
Consider a system where the Hilbert space is a tensor product of local Hilbert spaces We have used the subscript C in ⊗ C to emphasize that the tensor product is taken over the complex numbers. In other words, phase factors (or more generally C-numbers) acting on H j are identified with those acting on H j ′ .
Equivalently, we can consider the tensor product over real numbers and identify the phases at different sites by additional local constraints. Namely, we take the real vector space 43 H R ≡ H 1 ⊗ R H 2 ⊗ R · · · ⊗ R H L , (C.2) and impose the local constraints u j (θ) = u j+1 (θ) to get back H. Here, u j (θ) implements a U (1) "phase" rotation at site j. In other words, u j (θ)|ψ⟩ j ′ = e iδ j,j ′ θ |ψ⟩ j ′ . 44 Consider the antiunitary symmetry operator U = K, where K is complex conjugation in a fixed basis. A defect for this symmetry at link (j, j + 1) is given by changing the constraint u j (θ) = u j+1 (θ) to u j (θ) = u j+1 (θ) −1 . The movement operator U j = K j that moves the defect from link (j − 1, j) to (j, j + 1) acts as K j u j (θ) (K j ) −1 = u j (−θ) , (C. 3) and K j u j ′ (θ)(K j ) −1 = u j ′ (θ) for j ′ ̸ = j. Thus, K j acts antiunitarily only on site j. We now 43 For tensor product over real numbers, we identify the operator rO j ⊗ R O ′ j with O ⊗ R rO ′ only for real numbers r ∈ R, and not for an imaginary number r. 44 The dimension of H R is 2 L−1 times larger than that of H and there exist L − 1 independent constraints. explain how this is derived from our general construction in Section 2.4.
To find the defect for general antiunitary symmetries, we want to extend the unitary operators to U A U −1 B , where U A acts only on system A and U B only acts on system B. In other words, we want U A to act antiunitarily only on system A. To do this, we consider the extended Hilbert space and Hamiltoniañ and the extended symmetry operatorŨ = U ⊗ R U −1 . (C.5) The local constraints for the untwisted system are 1 ⊗ R π j = 1 , u j (θ) ⊗ R u j (θ) −1 = 1 , and u j (θ)u j+1 (θ) −1 ⊗ R 1 = 1 . (C.6) The first constraint just projects out system B to one of its states. The second and third constraints reproduce the tensor product over complex numbers.

(C.7)
Now let us apply this to the case of an antiunitary symmetry acting on-site, that is where U j acts unitarily on site j. Since U j is a complex operator, it commutes with u j (θ). Thus, we find the local constraints u j (θ) ⊗ R u j (θ) −1 = 1 , and u j (θ)u j+1 (θ) −(−1) δ j,J ⊗ R 1 = 1 , (C.9) among other constraints. Hence, the movement operator U J act antiunitarily only at site J.
Using this prescription, we can compute the anomaly of antiunitary symmetries and identify the anomaly as the obstruction to gauging. However, gauging an antiunitary symmetry leads to a theory whose Hilbert space is a real vector space!