Failure of Nielsen-Ninomiya theorem and fragile topology in two-dimensional systems with space-time inversion symmetry: application to twisted bilayer graphene at magic angle

We show that the Wannier obstruction and the fragile topology of the nearly flat bands in twisted bilayer graphene at magic angle are manifestations of the nontrivial topology of two-dimensional real wave functions characterized by the Euler class. To prove this, we examine the generic band topology of two dimensional real fermions in systems with space-time inversion $I_{ST}$ symmetry. The Euler class is an integer topological invariant classifying real two band systems. We show that a two-band system with a nonzero Euler class cannot have $I_{ST}$-symmetric Wannier representation. Moreover, a two-band system with the Euler class $e_{2}$ has band crossing points whose total winding number is equal to $2e_2$. Thus the conventional Nielsen-Ninomiya theorem fails in systems with a nonzero Euler class. We propose that the topological phase transition between two insulators carrying distinct Euler classes can be described in terms of the pair creation and annihilation of vortices accompanied by winding number changes across Dirac strings. When the number of bands is bigger than two, there is a $Z_{2}$ topological invariant classifying the band topology, that is, the second Stiefel Whitney class ($w_2$). Two bands with an even (odd) Euler class turn into a system with $w_2=0$ ($w_2=1$) when additional trivial bands are added. Although the nontrivial second Stiefel-Whitney class remains robust against adding trivial bands, it does not impose Wannier obstruction when the number of bands is bigger than two. However, when the resulting multi-band system with the nontrivial second Stiefel-Whitney class is supplemented by additional chiral symmetry, a nontrivial second-order topology and the associated corner charges are guaranteed.


I. INTRODUCTION
The recent discovery of Mott insulating states and superconductivity in twisted bilayer graphene (TBG) near the first magic angle θ ∼ 1.05 • [1,2] has lead to a surge of research activities to understand this system . One notable feature in the band structure of TBG is the presence of almost flat bands near charge neutrality, which are effectively decoupled from other bands by an energy gap. The reduced kinetic energy of the flat bands allows this purely carbon-based system, normally regarded as a weakly correlated system, to be an intriguing playground to examine the Mott physics and the associated unconventional superconductivity.
For a microscopic description of correlation effect in TBG, there have been several theoretical efforts to construct a tightbinding lattice model capturing the characteristic band structure of the four almost flat bands near charge neutrality [29][30][31][32]. Here we neglect the spin degrees of freedom for counting the number of bands, which is valid because the spinorbit coupling is negligibly small. According to the low energy continuum theory which excellently describes the qualitative feature of the almost flat bands, there are two Dirac points at each K and K' point in the Moiré Brillouin zone, whose origin can be traced back to the Dirac points at each valley of the underlying graphene layers [33,34]. The presence of massless Dirac fermions is further supported by several theoretical studies [35][36][37][38] as well as recent quantum oscillation measurement [39]. The existence of gapless Dirac points indicates the valley charge conservation U v (1) and the space-time inversion symmetry C 2z T where C 2z denotes a two-fold rotation about the z-axis and T is time-reversal symmetry [28,29,40]. In the presence of U v (1) and C 2z T , the four nearly flat bands are decoupled into two independent valley-filtered two-band systems, and each two-band system possesses Dirac points at K and K . The fact that both the valley charge conservation and C 2z T are not the exact symmetry of the TBG indicates that the symmetry of the low energy physics is larger than the exact lattice symmetry [28].
Interestingly, by putting together all the emergent symmetry including U v (1) and C 2z T , Po et al. have found an obstruction to constructing well-localized Wannier functions describing the four nearly flat bands in TBG [28,29]. Moreover, it is shown that the obstruction originates from the fact that the two Dirac points in each valley-filtered two-band system have the same winding number, which is generally not allowed in 2D periodic systems due to the Nielsen-Ninomiya theorem [41]. In addition, based on the observation that the winding number is defined only for a two-band model in each valley, it is conjectured that the Wannier obstruction is fragile [28,29], that is, the obstruction disappears when one considers other bands away from the Fermi energy E F separated by an energy gap.
The main purpose of the present study is to unveil the topological nature of the nearly flat bands in TBG near a magic angle and propose a general framework to understand the band topology of 2D systems sharing the same symmetry. In particular, we show that, two bands having two Dirac points with the same winding number is endowed with an integer topological invariant, the Euler class e 2 , when the 2D spinless fermion system has space-time inversion symmetry I ST ≡ C 2z T . We explicitly show that two bands having a nonzero Euler class arXiv:1808.05375v3 [cond-mat.mes-hall] 30 Aug 2018 cannot have exponentially localized Wannier representation, that is, there is a Wannier obstruction. Moreover, the nonzero Euler class e 2 implies that there are band crossing points, henceforth called vortices, between the two bands, whose total winding number is equal to 2e 2 . Thus, a real two-band system carrying a nonzero e 2 evidences the violation of the Nielsen-Ninomiya theorem.
When the number of occupied bands is bigger than two, the system is characterized by another Z 2 topological invariant, that is, the second Stiefel-Whitney (SW) class w 2 . A twoband system with the Euler class e 2 turns into a multi-band system with the second Stiefel-Whitney class w 2 = e 2 (mod 2) when additional trivial bands are added. Therefore a two band system with an odd e 2 can still be characterized by the nontrivial w 2 = 1, which gives rise to a unit winding of the Wilson loop spectrum [42]. However, even if w 2 is nontrivial in a multi-band system, we show that there is no obstruction to constructing well-localized Wanner functions, which indicates that the band topology of a real two band system is fragile. However, when a multi-band system with w 2 = 1 has additional mirror and chiral symmetries, the system exhibits a higher-order band topology which guarantees the existence of corner charges.
The paper is organized as follows. We first present the topological properties of a simple four-band lattice model proposed by Zou et al. [28], which captures all the essential properties of the nearly flat bands in TBG at magic angle. After clarifying the issues related with the band topology of TBG by using the toy model, we provide a general description of the band topology of space-time (I ST ) symmetric spinless fermion systems in 2D. We review the concept of the Euler class in Sec. III and show that a nontrivial Euler class leads to a Wannier obstruction in Sec. III B. In Sec IV. we prove the correspondence between the vortex winding number and the Euler class, and demonstrate the violation of Nielsen-Ninomiya theorem in real two band systems with a nonzero Euler class. Based on this correspondence, we study the transition changing the Euler class by analyzing the winding number of vortices. In section. V, we develop a new method for calculating the winding number by using the off-diagonal component of the Berry connection, which is useful for studying the pair creation and annihilation of vortices in Sec. VI. Then we show that the topological phase transition between two insulators carrying distinct Euler classes can be described via the pair creation and annihilation of vortices through the winding number reversal across a Dirac string in Sec. VII. In Sec. VIII, we describe the fragile and higher-order nature of the band topology of the nearly flat bands in twisted bilayer graphene based on the winding number annihilation and the properties of the second Stiefel-Whitney class. In Sec.IX, we summarize the main results and discuss future research directions. In addition, we explain how the winding number can be computed by using the off-diagonal Berry phase in a generic chiral symmetric system in Appendix A. Appendix B describes the equivalence between the second Stiefel-Whitney class and the Fu-Kane-Mele invariant in spin-orbit coupled two dimensional systems with I ST = C 2z T symmetry. Finally, in Appendix C, we explain the symmetry protection π -π 0 k y a Θ (d)  1. (a) The definition of the hopping amplitudes t1,2 for a four-band lattice model proposed by Zou et. al. [28]. a is the lattice constant representing the lattice vector for a Moire superlattice of TBG at magic angle. (b) High symmetry points in the Brillouin zone. Γ = (0, 0), M = (2π/ √ 3a, 0), and K = (2π/ √ 3a, 2π/3a). The blue rectangle is the Brillouin zone used to compute the Wilson loop spectrum. (c) Band structure along high-symmetry lines. Both of the occupied and unoccupied bands have gapless Dirac points at K and K'. (d) Wilson loop spectrum for the lower two bands. The Wilson loop operator is calculated along the ky direction at fixed kx, as shown by the red arrow in (b). The unit winding of the spectrum indicates the unit Euler class |e2| = 1.
of anomalous corner states and propose a general method to characterize the second order band topology by extracting the first and second Stiefel Whitney classes directly from the Wilson loop spectrum without additional numerical computation of the nested Wilson loop.

II. BAND TOPOLOGY OF NEARLY FLAT BANDS IN TWISTED BILAYER GRAPHENE
Let us first clarify the issues related with the band topology of the nearly flat bands in TBG at magic angle. For this purpose, we study a simple four-band model Hamiltonian proposed by Zou et al. [28], which captures the essential characteristics of the nearly flat bands in TBG.

A. A four-band lattice model
The model is defined on a honeycomb lattice which represents the Moire superlattice of TBG at magic angle [28]. Putting two orbitals per site, one can construct a four-band Hamiltonian given by wheret 1 = 0.4 + 0.6τ z andt 2 = 0.1τ x indicate the hopping amplitudes between the nearest-neighbor and next-nearest neighbor sites with the Pauli matrices τ x,y,z representing the orbital degrees of freedom. Here we choose s ij = +1 for r i = r j + aŷ, which determines the rest of the s ij 's because of the C 3z symmetry. Then the full Hamiltonian is invariant under a three-fold rotation about the z-axis C 3z , a two-fold rotation about the y-axis C 2y , and C 2z T . Namely, the lattice model has D 6 point group symmetry. This model Hamiltonian inherits the essential features of the nearly flat bands of TBG with enlarged emergent symmetries. In momentum space, the Hamiltonian becomes where the Pauli matrices σ x,y,z denote the sublattice degrees of freedom of the honeycomb lattice.

B. Band topology of lower two bands
The band structure of the four-band model is shown in Fig. 1(c). One can see that two lower bands are fully separated from the two upper bands. The two lower bands cross at two corners of the BZ, K and K , forming two Dirac points with the same winding number. As pointed out in [28], the winding number of the two Dirac points can be determined by examining the mirror eigenvalues of the two occupied bands at the M point: if their mirror eigenvalues are opposite (equal), the winding numbers of the Dirac points at K and K points are equal (opposite). In the case of the model Hamiltonian in Eq. (1), the mirror symmetry along the ΓM line can be represented by τ z , and it can be explicitly checked that the mirror eigenvalues of the two occupied bands are indeed opposite along this line. Similarly, the two upper bands also possess two Dirac points sharing the same winding number whose winding direction is opposite to that between the lower two bands. Both the lower two bands and the upper two bands possess the same topological characteristic of the nearly flat bands of TBG in a single valley while preserving all D 6 point group symmetry [28].
Let us focus on the topological properties of the lower two bands to understand the band topology and the relevant obstruction of the nearly flat bands in TBG. One direct evidence showing the nontrivial topology of the lower two bands is the winding of the Wilson loop spectrum shown in Fig. 1(d), which is computed from the transition function in a real gauge by using the technique developed in [42]. Here the Wilson loop operator corresponds to the transition function. In the Wilson loop spectrum in Fig. 1(d), two eigenvalues change symmetrically about Θ = 0 line due to the I ST symmetry, and each eigenvalue winds once as k x is varied. Below we show that the unit winding of the transition function in a real gauge indicates the unit Euler class |e 2 | = 1, which imposes an obstruction to Wannier representation and leads to the violation of the Nielsen-Ninomiya theorem.

III. EULER CLASS AND WANNIER OBSTRUCTION FOR REAL FERMIONS IN TWO DIMENSIONS
The central symmetry governing the band topology of nearly flat bands in TBG is the space-time inversion symmetry I ST . I ST is an antiunitary symmetry, local in momentum space satisfying I 2 ST = +1, so it acts like a complex conjugation in momentum space. In the absence of spin-orbit coupling, either P T or C 2z T can be used to define I ST where P indicates a spatial inversion, C 2z is a two-fold rotation about the z-axis, and T is time reversal symmetry. On the other hand, in the presence of spin-orbit coupling, only C 2z T can be used to define I ST since (P T ) 2 = −1. In an I ST invariant system, we define a real gauge as where |ψ nk is a Bloch state. Other possible choices of real gauges are related to each other by orthogonal transformations. This gauge condition is equivalent to I ST |ũ nk = |ũ nk for the cell-periodic part |ũ nk = e −ik·r |ψ nk since e −ik·r commutes with I ST . Moreover, the transition function of |ψ nk is equivalent to that of |ũ nk if we define the periodic condition to be |ψ nk+G = |ψ nk and |ũ nk+G = e iG·r |ũ nk , respectively. As is customary, we will investigate the topology of the Bloch states using the cell-periodic part.
In this section, we define a topological invariant of I ST symmetric two-band systems, that is, the Euler class, and explain the topological obstruction for real states arising from it.

A. The Euler class
The Euler class e 2 is an integer topological invariant for two real states which can be written as a simple flux integral form [43][44][45], whereF mn (k) = ∇ k ×Ã mn (k) andÃ mn (k) = ũ m (k)|∇ k |ũ n (k) (m, n = 1, 2) are 2×2 antisymmetric real Berry curvature and connection defined by real states |ũ n (k) in Eq. ( The flux integral form of e 2 can be connected to transition functions in the following way. To show this relation, let us notice that the 2D Brillouin zone can be deformed to a sphere when the real states are orientable along any noncontractible one-dimensional cycles as far as the topology of the real states is concerned [See Fig. 2]. Then the sphere can be divided into two hemispheres, the northern (N ) and southern (S) hemispheres, which overlap along the equator. Along the equator, the real smooth wave functions |u N and |u S defined on the northern and southern hemispheres, respectively can be connected by a transition function t N S = u N |u S = exp[−iσ y φ N S ] ∈ SO (2). It is straightforward to show that where S 1 indicates the circle along the equator. Therefore the Euler class e 2 is identical to the winding number of the transition function t N S . Let us note that Eq. (5) is also equivalent to the definition of the monopole charge [44,46] B. Wannier obstruction from the Euler class Here we show that two real bands with a nontrivial Euler class suffer from an obstruction to defining exponentially localized Wannier functions respecting I ST symmetry. Below, we prove the contrapositive, that the existence of exponentially localized I ST -symmetric Wannier functions implies that the Euler class is trivial. Our strategy for the proof is to start from the I ST -symmetric exponentially localized Wannier representation. Then, we go to the Bloch representation, find the transformation that makes I ST = K, and finally determine whether a transition function with a nonzero winding number can arise in this real basis.
Let us recall some basic facts. Wannier states are defined to be the Fourier transform of the Bloch states: The Bloch states |ψ nk is given by the inverse Fourier transform, given the Wannier states. Because we assume that the Wannier functions are exponentially localized, its Bloch state is smooth over the whole Brillouin zone [47]. We first relate the I ST symmetry for Wannier basis and that for Bloch basis. Since we are dealing with the case (I ST ) 2 = +1, we may take with suitable unit cell translation ∆ αβ . Here, α, β are Wyckoff position index and i, j are orbital index (which, in fact, we do not really need for our purpose because when I ST symmetry is a site symmetry group element, its representation can be diagonalized in a spinless system). Also, ∆ αβ = −t β − t α can easily be found from the action of I ST symmetry in real space, −(R + t β ) = −R + ∆ αβ + t α .
In the Bloch basis, Thus, the sewing matrix is where the constraint −(R+t β ) = −R+∆ αβ +t α or ∆ αβ = −t α − t β is represented by δ α,I ST β . If we choose a real basis |ψ αik = U † αi,βj (k)|ψ βjk , the sewing matrix must be equal to δ αβ . The transformation above may not be continuous and periodic in general. Our task now is to divide the Brillouin zone into two patches and determine whether the transition matrix for two bands resulting from two Wannier orbitals can have nontrivial winding.
The easiest case to consider is when the unit cell is left invariant under the inversion symmetry. This requires the inversion symmetry to swap the position of the two Wannier centers. Then, I ST = σ x K in the complex basis. Under the constant unitary transformation I ST = K as required. Note that there is no need to introduce patches to define a real basis. We next consider the case when the unit cell is not left invariant under the I ST symmetry, meaning that the Wannier centers occupy two different points invariant under inversion symmetry up to lattice translations. If we place the inversion center at one of the Wannier centers, the sewing matrix in the complex basis is We can obtain the real basis by taking Without loss of generality, we can assume that ∆ αβ = a 1 , where a 1,2 are the two unit lattice vectors. Let us parametrize the Brillouin zone by 0 ≤ k 1 , k 2 < 1, where k = k 1 G 1 + k 2 G 2 and G 1,2 are the reciprocal lattice vectors. Then we introduce two patches, N and S, covering 0 ≤ k 1 ≤ 1/2 and 1/2 ≤ k 1 ≤ 1 0 respectively, and define |ψ N/S k = |ψ k for k ∈ N/S. In the case of interest, the transition function is nontrivial only at k 1 = 0: t N S (0, k y ) = ψN (0, k 2 )|ψ S (0, k 2 ) = ψ (0, k 2 )|ψ(1, k 2 ) = U −1 (0, k 2 )U (1, k 2 ) = σ z , but it does not wind along the k 2 direction. In conclusion, it is not possible to realize a nontrivial Euler class in the Brillouin zone with two exponentially localized I ST -symmetric Wannier functions.

IV. FAILURE OF NIELSEN-NINOMIYA THEOREM DUE TO THE EULER CLASS
In the previous section, we have shown that the Euler class is a topological invariant characterizing the Wannier obstruction for two real bands. Here we show that the Euler class is the topological invariant that explains the Wannier obstruction for nearly flat bands in TBG, which was attributed to the non-zero total winding number in the Brillouin zone. More explicitly, we show that the Euler class is equivalent to half the total winding number. To introduce some notations and set the stage for the discussion that follows, we first give a short proof of the 2D Nielsen-Ninomiya theorem, in analogy to the three-dimensional (3D) case [48]. Our main result will follow by carefully investigating the failure of the 2D Nielsen-Ninomiya theorem.
A. Two-dimensional Nielsen-Ninomiya theorem In this section, we give a short proof of the 2D Nielsen-Ninomiya theorem that the total winding number is zero in 2D periodic systems and point out what the assumptions are. Note that we have stated this theorem by using the winding number instead of Berry phase because Berry phase is defined only modulo 2π.
Let us take two real basis states |ũ 1k and |ũ 2k such that I ST is represented by the complex conjugation K (i.e., I ST = K), so the I ST symmetry condition I ST H(k)(I ST ) −1 = H(k) requires that the matrix elements of the Hamiltonian H mn (k) = ũ mk |H(k)|ũ nk to be real, that is, H mn (k) = H * mn (k). Therefore, where r(k) ≥ 0, σ 1 and σ 3 are Pauli matrices defined in the basis {|ũ 1k , |ũ 2k }, and a term proportional to σ 0 is ignored. Let us define a unit vector n(k) = (cos θ(k), sin θ(k)) away from points at which r(k) = 0. The winding number of the Hamiltonian along a loop C is defined to be the winding number of n(k) [49]: Let D i be a disk enclosing an ith vortex, so that the total winding number is given by where ∂D i is the boundary of D i . Using the Stokes' theorem, we have Here, we have made an obvious assumption that the matrix elements of the two-band Hamiltonian are continuously defined throughout the Brillouin zone. This has two important implications. The first one is that when the matrix elements of the two-band Hamiltonian cannot be defined continuously in the presence of I ST symmetry, a non-vanishing total winding number is allowed. We will discuss this in the following subsection. The second implication is that when the two bands are no longer isolated from the other bands, the winding number may lose its meaning. This will be discussed further in section VI A.

B. Winding number and Euler class
Let us now prove that e 2 is equal to half the total winding number of a two band Hamiltonian. We again consider the Hamiltonian in Eq. (14).
In the case when the total Berry phase, i.e. the sum of the Berry phases of the two bands, along any non-contractible 1D cycle in the Brillouin zone is trivial, we can take a spherical gauge in which we neglect the non-contractible 1D cycles and instead view the Brillouin zone as a sphere [ Fig. 2]. We will discuss the case in which the Berry phase is nontrivial in Sec. VI B One immediate consequence of the non-vanishing total winding number is that it is impossible to define a continuous Hamiltonian matrix element throughout the sphere. Thus, let us divide the sphere into N and S hemispheres such that each vortex is located in the interior of either the N or S hemisphere [ Fig. 2]. On the equator, we need a transition function, O N S (φ) ∈ SO(2), where φ is the azimuthal angle parametrizing the equator. The two Hamiltonian on the N and S hemispheres are connected along the equator as Thus, we must have O N S = exp(−iσ y (θ S − θ N )/2). Before moving on, note that we may assume that the two bands of our interest arise as sub-bands of a lattice Hamiltonian. Then, this transition matrix is the transition function between the two sub-bands of interest. Because the full lattice Hamiltonian is continuous, any discontinuity of the projected 2 × 2 Hamiltonian must originate from that of the basis states of the two subbands. Accordingly, the Euler class, which is given by the winding number of the transition function, is equal to (19) where N N/S are the sum of the winding number within N/S patch. The negative sign in the definition of N S is there because the winding number is defined by the counterclockwise line integral with respect to the normal direction of the sphere.
In conclusion, we have proved that Let us note that this is a generalization of the Poincaré-Hopf theorem [50][51][52], which relates zeros of a tangent vector field to the Euler characteristic of the manifold, to rank two real Bloch bundles (i.e., two real Bloch states).

V. OFF-DIAGONAL BERRY PHASE
The relation in Eq. (20) allows us to study the Euler class by investigating band degeneracies which carry nontrivial winding numbers. However, it is not easy to treat the winding number with its conventional definition, because it requires nontrivial transition functions between local patches when the total winding number in the Brillouin zone is non-zero. Instead of using the matrix element of the Hamiltonian, here we develop a new method for calculating the winding number of vortices by using energy eigenstates. We will show that the winding number of a vortex can be calculated by using an offdiagonal component of the Berry connection. Although we focus on I ST -symmetric two bands here, the same method can be applied to any chiral symmetric system [See Appdendix A for details]. Moreover, since the energy eigenstates can be taken smooth everywhere on the Brillouin zone except at the points of degeneracy under a smooth complex gauge, the offdiagonal Berry connection can also be smoothly defined on the punctured Brillouin zone without the need of introducing patches. Because of this reason, in this section, we relax the reality condition I ST |ũ nk = |ũ nk , and instead use a smooth complex gauge to define the off-diagonal Berry phase. This method will be particularly useful when we study topological phase transitions in Sec. VII.

A. Sewing matrix and Berry connection
Let {|u nk } be energy eigenstates with energy E nk . In this basis, the sewing matrix G of the I ST operator is defined by This sewing matrix is diagonal when the energy eigenstates are non-degenerate, because I ST operator does not change the energy of the state when it is a symmetry operator. Then Equation (21) can be used to show that the Berry connection in I ST -symmetric systems satisfies In a two-band system, or more generally for two subbands of a larger system, the constraint equation can be exactly solved on the non-degenerate region. We have where , which is the only real parameter undetermined by the sewing matrix. Here χ(k) is defined modulo π because θ 1 (k) and θ 2 (k) are defined modulo 2π. Correspondingly, a definite global sign of a(k) is fixed after choosing the global phase of e iχ(k) . Let us emphasize that a(k) is the gauge-invariant part of the off-diagonal Berry connection A 12 (k): it is invariant under diagonal gauge transformations, which do not mix different energy eigenstates. Under a gauge transformation where n = 1, 2, we have θ n (k) = θ n (k) − 2ζ n (k), and

B. Winding number from off-diagonal Berry connection
Now we show that a(k) contains the full information on the winding number. Let us consider the following eigenstates of the two-band Hamiltonian in Eq. (14).
where φ(k) = θ(k)/2−π/4. In this choice of gauge, G(k) = 1, and the Berry connection is given by From this expression, we get a(k) = 1 2 ∇ k θ(k), such that Since a(k) is invariant under any diagonal gauge transformations, the off-diagonal Berry phase defined by S 1 dk · a(k) in any smooth energy eigenstate basis gives the desired winding number N S 1 . When we consider two subbands of a larger system, the offdiagonal Berry phase can still capture the winding number of (a) v 1 v 2 vortices although it is not quantized in general. As one can see from ∇ k × a(k) =F 12 = 0 in a real eigenstate basis, is not quantized. However, the above relation between the off-diagonal Berry phase and the winding number in Eq. (30) is still valid in the vicinity of a vortex, where the other bands except the two bands of our interest contribute to the off-diagonal Berry phase negligibly. In other words, as a disk D containing a vortex v shrinks to the vortex site, we have where N (v) is the winding number of a vortex v. This is consistent with the correspondence between the Euler class and the winding number we derived above. Consider a punctured sphere S 2 p ≡ S 2 − i D i , where D i is an infinitesimal disk on the sphere containing a vortex v i . Then, in the limit of vanishing D i , we find

VI. PAIR ANNIHILATION OF VORTICES
In this section, we discuss how a pair annihilation of vortices can occur. In the previous sections, we have described how a non-zero Euler class gives a non-zero total winding number, and how the winding number can be defined in terms of the off-diagonal Berry connection. A crucial assumption for achieving a non-zero total winding number was that the total Berry phase along any non-contractible cycle must be zero.
To study the effect of non-zero Berry phase, let us notice that it is impossible to consistently choose a definite global sign of a(k) when the total Berry phase is nontrivial along a loop. Suppose we take a smooth and periodic gauge around a loop C parametrized by 0 ≤ k < 2π. Then, the sewing matrix and the Berry connection are also smooth and periodic along the cycle. The periodic condition G(2π) = G(0) gives Since A(2π) = A(0), we find that Thus, we cannot assign the global sign of a(k) unambiguously when the total Berry phase is nontrivial. This implies that a pair creation of two vortices with the same winding number can occur when the band gap closes and the nontrivial Berry phase is generated by gap-closing points. In this section, we describe this mechanism of the pair creation and annihilation of vortices. We also comment on the case with nontrivial Berry phase along the non-contractible 1D cycles in the Brillouin zone.

A. Pair annihilation process
In Fig. 3 (a), we show a schematic picture of a part of the 2D Brillouin zone. The orange dots labeled by v 1 and v 2 represent two vortices between energy bands 1 and 2, which are the bands we are interested in. Let us assume that v 1 and v 2 have the same winding number. We will describe how v 1 and v 2 can be pair-annihilated when the band gap between these two bands and another band (band 3) closes to form additional gap closing points (Dirac points). Notice that in the viewpoint of bands 1 and 2, such an additional gap closing point acts as a π Berry phase generator in the sense that the sum of the Berry phases for bands 1 and 2 calculated around a loop enclosing the additional gap closing point formed by bands 1 or 2 and the band 3 is π. Such a π Berry phase generator is shown as a red dot in Fig. 3.
According to Eq. (34), a(k) changes sign when it circles around the red dot once, because of the π Berry phase. For the purpose of discussing the winding number of vortices, we must therefore introduce a branch cut, shown as a dashed line in Fig. 3 (a). Across this branch cut, the sign of both a(k) and e iχ(k) changes, so that A 12 is well defined. We will refer to this branch cut as a a Dirac string, in analogy to the Dirac string that arises from three-dimensional magnetic monopoles [53]. As in the three-dimensional case, this Dirac string also ends when it reaches another π Berry flux generator because the total Berry phase surrounding the two π Berry flux generator is 2π so that the factor e iχ(k) is well defined around any curve surrounding them.
To illustrate the most important property of the Dirac string, suppose that v 1 and v 2 have the same winding number with the choice of Dirac string in Fig. 3(a). Then, consider a process in which the Dirac string rotates clockwise to the configuration shown in Fig. 3 (b). This is equivalent to changing the sign of a(k) at the points where the Dirac string swaps by, so that the winding number of v 1 also changes. One implication of this result is that v 1 and v 2 can be annihilated only by circling around the red dot downwards, as shown in Fig. 3 (c). Also, by considering the reverse process in which the Dirac string is fixed and the vortices move, one sees that whenever a vortex crosses a Dirac string, its winding number changes its sign. Thus, if we consider the annihilation process shown in Fig. 3 (d), the winding number of the vortex v 2 changes the sign upon crossing the Dirac string, before v 1 and v 2 are pair annihilated.

B. Instability of vortices in non-orientable cases
Up to now, we have dealt with the case when the Euler class is well defined by assuming that the total Berry phase along any non-contractible cycle in the Brillouin zone is trivial. However, when there is a nontrivial Berry phase along any non-contractible 1D cycle on the Brillouin zone torus, and thus the Euler class is ill-defined, two vortices with the same winding number can be pair annihilated even when band 1 and 2 are well separated from other bands. The reason why two vortices can be pair-annihilated is basically the same as the previous case discussed in section VI A. Namely, the nontrivial Berry phase along a nontrivial cycle implies that there must be a closed Dirac string along the other non-contractible 1D cycle of the Brillouin zone torus. Because the winding number of a vortex changes whenever it crosses a Dirac string, even if two vortices have the same winding number at the beginning, after transporting one of the vortices across the Dirac string, two vortices can be pair-annihilated as shown in Fig. 3 (e).
For instance, let us consider the two-band lattice model on checkerboard lattice proposed in [54], which falls exactly into this category. As explained below, this model contains a single quadratic band crossing point (QBCP) with the winding number ±2 at M = (π, π) in the BZ. The presence of a well-defined tight-binding Hamiltonian indicates that there is no Wannier obstruction for the two bands, and thus the Euler class of this model should be zero. Naively, the presence of the band crossing point with the winding number two seems to be incompatible with the fact that the Euler class of the system is trivial. One way to reconcile this contradiction is to consider nontrivial Berry phase along non-contractible cycles of the BZ. Below we show that this is indeed the case, that is, the total winding number is ill-defined due to the π Berry phase along non-contractible cycles of the BZ.
The checkerboard lattice is shown in Fig. 4(a). The relevant tight binding Hamiltonian with one orbital per lattice site is where t ij = t for nearest neighbor sites, t ij = t (t ) for next nearest neighbor sites connected (not connected) by vertical or horizontal bonds. This spinless model has time reversal T symmetry and four-fold rotation C 4z symmetry about the center of the smallest square formed by A (blue) and B (red) sites. Since the system has C 2z T = (C 4z ) 2 T symmetry, the theoretical idea developed in the preceding sections can be directly applied.
After Fourier transformation taking into account the atomic positions within the unit cell, we obtain . It is important to note that this Hamiltonian is real but not periodic. In contrast, if we take the Fourier transformation with respect to the position of the unit cell neglecting the atomic positions in the unit cell, d 0 (k) and d z (k) remain the same, but we now have d x (k) − id y (k) = −(1 + e −ikx + e −iky + e −i(kx+ky) ). Thus, the Hamiltonian is complex and periodic in this case.
If we choose the real basis in which the winding number is well-defined and expand the Hamiltonian near the M point, we obtain d x = −tk x k y and d z = (t −t ) 2 (k 2 x −k 2 y ) so that the winding number is ±2 where the sign depends on the choice of the parameters. We find H(k + G i ) = σ z H(k)σ z , where G i is the reciprocal lattice vector either along the k x or k y direction. This indicates that the Hamiltonian is discontinuous at the BZ boundary. Since det(σ z ) = −1, an orientation reversing transformation is necessary to glue the Hamiltonian matrix elements at the BZ boundary.
This non-orientability indicates that the total Berry phase along the k x and k y directions should be π, which can be explicitly checked by computing the Berry phase using a complex smooth basis.
As shown in Sec. VI A, the π-Berry phase along both the k x and k y directions indicates the presence of Dirac strings along the two non-contractible cycles of the Brillouin zone.
[See Fig. 4(b).] If the C 4z symmetry is broken while C 2z is preserved, the QBCP can be split into two Dirac points and be annihilated when they merge at X = (π, 0) or Y = (0, π) after crossing a Dirac string. This phenomenon is indeed observed in a related tight binding model on the checkerboard lattice in [55].
Let us note that the appearance of the Dirac string is related to the absence of a C 2z -invariant unit cell. If we Fourier transform a tight-binding Hamiltonian, we have H(k + G) = V −1 (G)H(k)V (G) in general, where V αβ (k) = exp(ik · r α )δ αβ , and α, β are indices labelling the atomic sites. When det V = −1, an odd number of atoms are displaced by a half lattice vector from a C 2z center, so we cannot take a C 2zinvariant unit cell.

VII. TOPOLOGICAL PHASE TRANSITION
In this section, we describe the topological phase transition between insulators with different Euler classes. Since the Euler class is well-defined for two-band systems, we consider the insulators with two occupied bands. We first discuss the transition between 2D insulators with e 2 = 1 and e 2 = 0, respectively. Then, we provide an alternative description for the same process in terms of monopole nodal lines in three dimensions (3D). Finally, we consider spinful systems with C 2z T symmetry and describe the transition between a quantum spin Hall insulator and a normal insulator. Here we show how the total vorticity in the Brillouin zone can be related with the Fu-Kane-Mele (FKM) invariant [56].

A. Pair annihilation of vortices
In this section, we describe how a topological phase transition from a e 2 = 1 phase to a e 2 = 0 phase can occur. For a minimal description, we consider a four-band system at halffilling, where the occupied bands (band 1,2) have e 2 = 1, and the unoccupied bands (band 3,4) have e 2 = −1 as in the case shown in Fig. 1. Recalling that an insulator with |e 2 | = 1 has a pair of vortices with the same winding number, we must either annihilate the two vortices or create another pair of vortices with the opposite winding number so that the total winding number of bands 1 and 2 becomes zero. For simplicity, we discuss only the former case, shown in Fig. 5 (a)∼(e).
Following the convention in the previous section, the pair of vortices between bands 1 and 2 with the same winding numbers are labeled by v 1 and v 2 , as shown in Fig. 5 (a). For the phase transition to occur, a pair of vortices with opposite winding number ( v 3 and v 4 ) must be formed between bands 2 and 3 via a band gap closing, as shown in Fig. 5(b). Notice that we have drawn two Dirac strings for each of the pairs, because in the viewpoint of bands 1 and 2, v 3 and v 4 act as π Berry flux generators, while in the viewpoint of bands 2 and 3, v 1 and v 2 act as π Berry flux generators. Thus, v 1 and v 2 can be annihilated by passing through the Dirac string, as shown in Fig. 5 (b) and (c). However, this leaves behind a ring of the Dirac string, as shown in Fig. 5 (c), so that v 3 and v 4 eventually has the same winding number as in Fig. 5 (d) after v 3 crosses the ring of the Dirac string which shrinks to a point and disappears in the end. However, we have only focused on

B. Alternative description in terms of a monopole nodal line
It is possible to give this pair annihilation process an alternative description in terms of a nodal line with a monopole charge in 3D. For this, let us consider again the four-band model with two occupied bands (bands 1, 2) and two unoccupied bands (bands 3, 4), which are now in 3D space. Moreover, let us suppose that the band crossing between bands 2 and 3 forms a monopole nodal line at E F . One immediate physical consequence arising from the monopole charge of the nodal line is that another nodal line formed between bands 1 and 2 should be linked with the monopole nodal line as shown in [42]. Because of this linking structure, a sphere wrapping the monopole nodal line should cross the other nodal line below E F at two points as shown in Fig. 5 (f). Considering the wrapping sphere as a 2D BZ, the crossing between the sphere and the nodal line below E F indicates the Dirac points formed between two occupied bands. Since the monopole charge is identical to the Euler class when the number of occupied bands is two [42], the wrapping sphere exactly corresponds to a 2D insulator with e 2 = 1 having two vortices with the same winding number between the two occupied bands. Note that in Fig. 5 (f), we have also drawn a purple line next to the orange line, to indicate that the gap closing points formed by the unoccupied bands (bands 3 and 4), for which the same comments apply as those for the occupied bands. Also, the points at which the orange (purple) line crosses the sphere corresponds to the vortices between bands 1 and 2 (bands 3 and 4) in the 2D insulator. Then, we see that for the occupied bands to become trivial, the orange line and the purple line should leave the sphere before the red loop does. The trajectories of the crossing points between the sphere and the three nodal lines (orange, red, purple) correspond to the process shown in Fig. 5 (a-d).

C. Topological phase transition in the presence of spin-orbit coupling
Up to now, we have focused on the case without spin orbit coupling. Even in the presence of spin-orbit coupling, however, I ST = C 2z T acts like a complex conjugation satisfying (C 2z T ) 2 = +1, so it can protect vortices in the absence of inversion P symmetry. In a recent work [40], it was shown that pair creation and pair annihilation of Dirac points can mediate a topological phase transition between a normal insulator and a quantum spin Hall insulator in spinorbit coupled noncentrosymmetric systems with T and C 2z symmetries. In the course of a topological phase transition, the trajectory of Dirac points form a closed loop surrounding time-reversal-invariant momenta (TRIM) an odd number of times as shown in Fig. 6(a). This pair creation and pair annihilation processes can also be understood in terms of the winding number changes across a Dirac string as described below. Such an alternative description is possible due to the equivalence between the second Stiefel-Whitney class and the Fu-Kane-Mele invariant in the system as explained in detail in Appendix B.
For convenience, let us suppose that the system is composed of two occupied bands and two unoccupied bands, although the topological phase transition is well-defined when the number of bands is larger. Because of time reversal symmetry, occupied bands are always degenerate at TRIM. Then in the 3D space (k x , k y , m) including a tuning parameter m controlling the phase transition, the Kramers degeneracies form four straight nodal lines along the m-direction as shown in Fig. 6 (b). If a normal insulator with e 2 = 0 and a topological insulator with e 2 = 1 exist for m < m 1 and m = m 2 > m 1 , respectively, the trajectory of Dirac points corresponds to the intersection between the red nodal line and the constant m planes in Fig. 6 (b) as m is tuned in the range m 1 < m < m 2 . Due to the straight nodal lines from Kramers degeneracies, any nodal loop, representing the trajectory of Dirac points, centered at a TRIM should be a monopole line due to the linking structure [42]. Then, the shape of the trajectory of Dirac points reflects the correspondence between the closed trajectory of vortices and the relevant change of the topological invariant.
Explicitly, let us explain how the winding number transition is related to the closed trajectory of gap-closing points. Consider a transition from a normal insulator with e 2 = 0 to a quantum spin Hall insulator with e 2 = 1, and assume, for simplicity, that the band structure of the normal insulator has no degeneracy other than the Kramers degeneracy. Then, e 2 = 0 indicates that the total winding number of the Kramer degenerate points below the Fermi energy E F should be zero as shown in Fig. 6(c). When the band gap closes and vortices are pair-created at the momentum k and −k, Dirac strings connecting each pair of vortices are also generated [ Fig.6(d)]. Let us note that both C 2z and T require that the winding number of vortices at k and −k is equal. As the Dirac strings follow the trajectory of the vortices, they eventually form a closed loop around a TRIM after the pair annihilation of vortices

VIII. FRAGILE TOPOLOGY AND HIGHER-ORDER TOPOLOGY
In Ref. [29], Po et al. have conjectured that the topological characteristic of two bands having two vortices with the identical winding number is fragile against adding topologically trivial bands [57], based on the observation that the integer winding number of the vortices is defined only for two bands. Our theory is consistent with this conjecture in that the Euler class is also defined only for two bands. However, there is a caveat. Although the Euler class is defined only for two bands, its parity remains meaningful even when the number of bands becomes larger than two due to the additional trivial bands. In fact, the Euler class modulo two is identical to another Z 2 topological invariant, known as second Stiefel-Whitney class w 2 , that is well-defined for any number of bands. Namely, if the Euler class of the two-band model is even (odd), w 2 of the system should remain zero (one) after the inclusion of additional trivial bands [42]. Such a change of the topological indices from Z to Z 2 can be observed from the variation of the winding pattern in the Wilson loop spectrum when additional trivial bands are added [42,58]. It has been argued in recent studies [42,[58][59][60] that the fragility of the winding pattern in the Wilson loop spectrum reflects the fragility of the Wannier obstruction. Here we show concretely that the nontrivial second Stiefel-Whitney class (w 2 = 1) does not induce a Wannier obstruction when the number of bands is bigger than two. However, this does not mean that an insulator with the nontrivial w 2 , dubbed a Stiefel-Whitney insulator [42], is featureless. As shown in [60], anomalous corner states can exist in Stiefel-Whitney insulators, which can be stabilized when additional mirror and chiral symmetries are present. We show that the corner charges are induced by the configuration of the Wannier centers constrained by the non-trivial second Stiefel-Whitney class. Therefore the band topology of the nearly flat bands in TBG carrying unit Euler class is fragile but exhibits the second-order topology due to the nontrivial second Stiefel-Whitney class.

A. Reduction of winding numbers from Z to Z2
Let us first clarify the meaning that the winding number of a vortex reduces from Z to Z 2 when the number of bands is increased from two to more than two. The reduction is due to the ambiguity in the sign of the winding number in the presence of a Dirac string, which was introduced before. We show that this puts a global constraint on the pair creation and annihilation processes of vortices.
For instance, let us consider a two-band system (band 1 and band 2) with two vortices v 1 and v 2 with the same winding number. One can add a trivial band (band 0) below the band minimum of the two band system. When a band inversion happens between band 0 and band 1, two new vortices v 3 and v 4 with the opposite winding numbers can be created. Between v 3 and v 4 , a Dirac string exists across which the winding number of v 1 or v 2 changes its sign. Then, v 1 and v 2 can be pair-annihilated after one of them crosses the Dirac string. If the pair annihilation occurs across the Brillouin zone boundary as shown in Fig. 7(c,d), v 3 and v 4 also can be annihilated across the other Brillouin zone boundary. Thus, eventually, each band is decoupled from other bands without any band crossing inbetween. The pair annihilation of v 1 and v 2 , which had the same winding number in the absence of band 0, indicates that the integer winding number is not well-defined anymore after the addition of band 0. A quantized Berry phase, which is a Z 2 invariant, would be the only remaining invariant assigned to each vortex.
Interestingly, such pair annihilations of two pairs of vortices leave behind two Dirac strings, each encircling a noncontractible cycle in the Brillouin zone. Let us note that the torus geometry of the Brillouin zone is essential to complete this process. The appearance of two orthogonal closed Dirac strings indicates that the bands 0, 1, 2 acquire nontrivial Berry phases along the k x and k y cycles, Φ x and Φ y such that bands 0, 1, and 2 have (Φ x , Φ y ) = (0, π), (π, π), and (π, 0), respectively, after the completion of the pair annihilation process.
In contrast, let us remark that the above process cannot occur if the Brillouin zone has a spherical geometry. Since all loops are contractible on a sphere, Berry phase should always be trivial. On a sphere, a pair annihilation of vortices with the same winding number formed between bands 1 and 2 necessarily lead to a pair creation of other vortices with the same winding number between another pair of bands, (for instance, between bands 0 and 1) as shown in Fig. 5 (a-d). This is related to the robust linking structure of monopole nodal lines in the 3D Brillouin zone as illustrated in Fig. 8.

B. Absence of Wannier obstruction
As for the Wannier obstruction, let us note that each decoupled band after pair annihilation of vortices is Wannier representable since a single isolated band with zero Chern number always has a Wannier representation [61]. In fact, the Wannier representation is allowed even if the vortices v 1 and v 2 exist after the addition of the trivial band 0. This is beause the corresponding transition functions can be diagonalized after a suitable gauge transformation, which mixes energy eigenstates at each k in general, while keeping the Hamiltonian intact.
Let us note that the Wannier centers for three bands 0, 1, 2 are uniquely determined here. Since the Berry phase for bands 0, 1, and 2 are (Φ 1 , Φ 2 ) = (0, π), (π, π), and (π, 0), respectively, the relevant Wannier centers are given by (0, a 2 /2), (a 1 /2, a 2 /2), and (a 1 /2, 0), because 1 2π (a 1 Φ 1 , a 2 Φ 2 ) corresponds to the Wannier center, where a i=1,2 are lattice constants. This can be shown as follows. Let us recall that the Wannier center of the nth band is related to a Berry connection by where V cell is the volume of the unit cell, and |nR is the Wannier state of the nth band B n . Then, because of the quantization of the Berry phase, Let us note that although the three bands have a Wannier representation, the second Stiefel-Whitney class is still nontrivial. This fact can be confirmed by using the Whitney sum formula [42,43] for the second Stiefel-Whitney class in the following way. When all the bands are non-degenerate, the second Stiefel-Whitney class of the whole bands B ≡ ⊕ n B n (n = 0, 1, 2) satisfies From the Berry phases for bands 0, 1, 2, given by (Φ 1 , Φ 2 ) = (0, π), (π, π), and (π, 0), one can easily find w 2 = 1. C2zT symmetry is broken due to the requirement that a corner state is localized at one corner, similar to the case in Su-Schrieffer-Heeger model [62][63][64].
C. Second-order topology characterized by nontrivial second Stiefel-Whitney class Even though w 2 = 1 states are Wannier representable, it does not mean that there is no physical consequence associated with them. Let us note that w 2 in Eq. (39) has the form of the electric quadrupole moment q xy [63][64][65] as pointed out in [42]: where we used Eq. (39) in the first line and considered trivial total polarization n (W n ) 1 = n (W n ) 2 = 0 in the third line. In fact, anomalous corner states can be induced in systems with w 2 = 1 as shown in [60].
The presence of corner charges can be understood as follows. Suppose that a two-dimensional system is composed of two quantum Hall insulators with Chern numbers c = 1 and c = −1, respectively, which are related to each other by I ST [Fig. 9(a)]. This system is a Stiefel-Whitney insulator with w 2 = 1, which can be confirmed by the winding pattern of the Wilson loop spectrum. For example, the Wilson loop spectrum in Fig. 1(d) is composed of two spectral flows, one going upward and the other going downward, each of which corresponds to c = 1 and c = −1, respectively. In this particular limit of the Stiefel-Whitney insulator, two counter-propagating chiral edge states exist [ Fig. 9(a)]. After I ST -preserving mass terms are added to the boundary, the chiral edge states can be gapped, but mirror symmetry forces the mass term to vanish at the mirror-invariant corners on the edge. To see this, let us consider a disk geometry with the radius R shown in Fig. 9(b) for simplicity. When chiral operation S is represented by S = σ z , the edge Hamiltonian is given by H edge (θ) = −i(v/R)σ y ∂ θ + m(θ)σ x , where θ denotes the polar angle and v indicates the tangential velocity along the boundary [66,67]. Then, the mirror operator M is uniquely determined to be M = σ z by the condition that it commutes S and satisfies the mirror symmetry condition M H edge (θ)M −1 = H edge (−θ). Since the mirror symmetry imposes m(−θ) = −m(θ), the mass vanishes at the mirror invariant corners with θ = 0 and θ = π.
Let us note that, although the role of mirror and chiral symmetries is not explicitly explained in [60], the presence of these two symmetries, which are actually very slightly broken, is the origin of the corner states found in [60] [See Appendix C].
Alternatively, we can understand the origin of the anomalous corner charges in terms of localized Wannier centers when the number of occupied bands is bigger than two. For convenience, let us consider a hexagonal lattice with four electrons per unit cell. Suppose that atoms are located at the corners of the hexagon, and each atom has two electrons. The Wannier centers for four electrons, which are compatible with the lattice symmetry and the condition w 2 = 1, are then given by (0, 0), (0, a 2 /2), (a 1 /2, a 2 /2), and (a 1 /2, 0), respectively, where (0, 0) indicates the center of the hexagon as shown in Fig. 9(c). Because of the nontrivial Wannier centers associated with the bulk invariant w 2 = 1, a mirrorinvariant configuration of electrons must induce additional half charges at the mirror-invariant corners. When there is M y : y → −y symmetry, the rightmost and leftmost unit cells on the M y -invariant line have additional half charge induced by the bulk. Since any mirror-symmetric configuration of electrons adds integer charges to the mirror invariant line, additional half charges must be there. A similar argument holds for M x : x → −x symmetric case. As in Su-Schrieffer-Heeger model [62][63][64], C 2z T symmetry is broken by the corner charge, because we require the corner charge to be localized at one of the two corners. [See Appendix C for detailed model calculations for corner charges.] In twisted bilayer graphene, C 6z T and C 2x symmetries are generators of the approximate D 6h symmetry of the Moiré superlattice. C 2x : (t, x, y) → (t, x, −y) and C 2x (C 6z T ) 3 : (t, x, y) → (−t, −x, y) operate like M y and M x T symmetries in two dimensions. Since M x T plays the same role as M x for the protection of corner charges [66], anomalous corner charges may appear at either M y -invariant corners or M xinvariant corners. Although there is no chiral symmetry in TBG, the in-gap states may be robust due to the large band gap relative to the bandwidth of the nearly flat bands.

IX. DISCUSSION
We have shown that the Euler class e 2 of real two band systems with I ST symmetry is identical to the total winding number 2e 2 of the band degeneracies between two bands. Namely, the topological charge of band crossing points determines the global band topology. We expect that our theory here can be generalized to a broader class of systems. For instance, recently, a no-go theorem was proposed in [61]: the statement is that Wannier obstruction of a single band can only come from a nontrivial first Chern number. This implies that Wannier obstructions originating from the other topological invariants describing multi-band systems may require unremovable band degeneracies. It would be an interesting topic for future studies to establish the general relationship between the symmetry eigenvalues at high symmetry points, the topological charge of band degeneracies and the global band topology in crystalline topological materials.
first-principles calculations, it was found that the Wilson loop spectrum for nearly flat bands in twisted bilayer graphene has nontrivial winding, which is consistent with our conclusion. In [69], tight-binding models were constructed explicitly by adding trivial bands to the two nearly flat bands, which demostrates the fragility of the Wannier obstruction for the flat bands.
After the completion our manuscript, we became aware of related mathematical studies [52,70,71] in which the relationship between the topological charges of Dirac and Weyl points and the global topology is examined in more abstract settings. In particular, it was also pointed out in [52] that the total winding number of vortices is given by the Euler class, based on the generalized Poincaré-Hopf theorem.
Appendix A: Winding number in general chiral symmetric systems In the main text, we showed that the winding number can be computed using the off-diagonal Berry phase for I STsymmetric two bands. Notice that I ST -symmetric two band Hamiltonian have chiral symmetry when the chemical potential term, which is irrelevant for the band crossing, is neglected. Here we show that the same method can be applied to any chiral symmetric systems.

Sewing matrix and Berry phase
Consider the sewing matrix for chiral symmetry operator S: It takes an off-diagonal form in the basis where s(k) ∈ U (N ). The Berry connection in chiral symmetric systems satisfies which shows that and a(k) ≡ iA 12 (k)s(k) = (iA 12 (k)s(k)) † = a † (k). (A7) Accordingly, the Berry connection takes the following form.
where A 1 (k) and a(k) are undetermined by the sewing matrix for chiral symmetry. Under a gauge transformation |u nk → |u nk = U mn (k)|u mk , the sewing matrix transforms as Accordingly, under a diagonal gauge transformation Since the Berry connection transforms by we get Notice that the matric trace of any power of a(k) is gauge invariant. It suggests that S d Tr[a d (k)] may serve as a ddimensional topological invariant.

Winding number and the off-diagonal Berry phase
Suppose that the unoccupied and occupied bands are topologically trivial as a whole. Then there exists a Hamiltonian which is smooth over the whole Brillouin zone that describes both the unoccupied and occupied bands. When the chiral operator is represented by the chiral-symmetric Hamtiltonian takes the form of where we used polar decomposition of h(k), where U (k) ∈ U (N ) and P (k) = h † (k)h(k). The energy eigenstates on gapped regions are given by where |e n=1,...,N,k are the eigenstates of P (k) with eigenvalues |E nk |, and |u unocc nk and |u occ nk have energies |E nk | and −|E nk |, respectively.
In this choice of gauge, the Berry connection is given by From this expression, we see that where det U (k) = exp(−iθ(k)). This off-diagonal Berry phase is invariant under gauge transformations which do not mix the unoccupied and occupied bands. As in the main text, the sign of the winding number is fixed after we choose the global sign of Tr[a(k)].
In general, the winding number in (2n + 1)-dimensional chiral symmetric systems is given by (A20)

Space-time symmetries
Let us investigate the space-time symmetry constraint on a(k). It will turn out that a(k) transforms like a Berry curvature rather than a Berry connection. We get the same conclusion for I ST -symmetric two bands because they have effective chiral symmetry if we neglect the chemical potential.
First we consider a crystalline symmetry operator G, where It takes the form in the basis where g 1,2 (k) ∈ U (N ). The symmetry constraint for the Berry connection is given by where P −1 G is the point group part of G, and P −1 G · A indicates the transformation of vector components of A under the action of G. Then, where A 1 ≡ A 11 and A 2 ≡ A 22 , and so that we get Next we consider the time-reversal symmetry operator T , where It takes the form in the basis where b 1,2 (k) ∈ U (N ). The symmetry constraint for the Berry connection is given by Then, where A 1 ≡ A 11 and A 2 ≡ A 22 , and so that we get In spin-orbit coupled 2D systems with time reversal T and two-fold rotation C 2z symmetries, both the second Stiefel-Whitney class and the Fu-Kane-Mele invariant are protected, respectively by C 2z T and T . As we mentioned in the main text, the Wilson loop method implies that the second Stiefel-Whitney class is identical to the Z 2 topological variant, because they are characterized by the same pattern of the Wilson loop spectral flow. Here we provide another proof of the equivalence using the Euler class and the Fu-Kane-Mele invariant. Our proof here goes parallel with the derivation of the relation between the second Stiefel-Whitney class and inversion eigenvalues, presented in Supplemental Material of [42].
We first notice that the total Berry phase of the occupied bands is always nontrivial in this system because the Berry phase is quantized to be a multiple of π due to the C 2z T symmetry, but T further requires it be a multiple of 2π because energy bands form Kramers pairs [40]. Therefore, the occupied states are always orientable in a real gauge, so we take transition functions belonging to the special orthogonal group. Furthermore, we will only consider two occupied bands because we can block-diagonalize the sewing matrix B into 2×2 blocks by lifting the accidental degeneracy of occupied bands without loss of generality.
Let us take a real gauge: C 2z T |ũ nk = |ũ nk . Time reversal symmetry imposes a further constraint on energy eigenstates by where B(k) ∈ O(2) is the sewing matrix for time reversal, and A and B denotes the local patch on which the states are smoothly defined. In fact, the sewing matrix B belongs to SO (2). In general, as the real occupied states are not smooth over the whole 2D Brillouin zone, the sewing matrix also is not smooth. The sewing matrix defined on C and D patches are related to the one defined on A and B patches as where A and C covers −k, and B and D covers k, and t AB and t CD are the transition functions defined by Since we required all the transition functions be orientationpreserving, the above relation shows that the determinant of the sewing matrix is uniform: det B CD = det(t AC ) −1 det B AB det t BD = det B AB . Because B = ±iσ y at time-reversal-invariant momenta (TRIM), such that det B = 1 at TRIM, the sewing matrix belongs to SO(2) everywhere on the Brillouin zone.
The symmetry constraint on the Berry connection and cur-vatureÃ where Because the Fu-Kane-Mele invariant ∆ is defined by the change of a 1D quantity, the time reversal polarization P T , let us first investigate the 1D topological invariant. Consider a time-reversal-invariant 1D subBrillouin zone, which includes two TRIM Γ 1 and Γ 2 . We can take a real smooth gauge there because the first Stiefel-Whitney class is trivial, i.e., the total Berry phase is trivial in complex smooth gauges as explained above. On the time-reversal-invariant 1D Brillouin zone, we observe from symmetry conditions that where we used the definition of the time-reversal polarization in the last step [72]. This integral is defined only modulo 2π because a gauge transformation can change its value by 2π times an integer [73]. Now we return to the original 2D Brillouin zone. Let us take a real gauge where the occupied states are smooth over the region including the half Brillouin zone 0 ≤ k x ≤ π . The Fu-Kane-Mele invariant ∆ is defined as the time-reversal polarization pump from k x = 0 to k x = π, i.e., ∆ = P T (π) − P T (0), so where we usedF(−k) =F(k) in the fourth line. This shows the equivalence of the (two times) Fu-Kane-Mele invariant ∆ and the second Stiefel-Whitney class w 2 .  [60] that the anomalous corner charges are induced by the nontrivial second Stiefel-Whitney class. Here we review the idea and clarify some issues that were not fully covered in [60]. First, we specify which symmetries protect the anomalous corner charges. We demonstrate that mirror and chiral symmetries are essential for the protection of corner charges, by using the same model introduced in [60]. Then, we establish the relation between the second Stiefel Whitney class and the nested Wilson loop introduced in [60] to capture the existence of the anomalous corner charges.

Mirror and chiral symmetries
The model introduced in [60] has the following form.
where we defined three real Gamma matrices and two pure imaginary Gamma matrices and the other generators of real matrices are then The Hamiltonian is symmetric under P T = K symmetry requires the Hamiltonian be real.
In [60], anomalous in-gap states were demonstrated with parameters, m 1 = 0.3, m 3 = 0.4, and m 2 = m 4 = 0.2. Let us note that this set of parameters are very close to the mirror and chiral symmetric parameters. When m 1 = m 3 and m 2 = m 4 , the Hamiltonian Eq. (C1) has chiral S and two mirror M x+y : (x, y) → (−y, −x) and M x−y : (x, y) → (y, x) symmetries in addition to spatial inversion and time reversal symmetries. To see this, let us rewrite the above Hamiltonian as In this form, one can see that it is symmetric under , where m 2 = m 2 1 + m 2 2 . M 2 x+y = M 2 x−y = S 2 = 1, and M x+y , M x−y , and S all commutes with time reversal T .
While M x+y anticommutes with S, M x−y commutes with S. Therefore, M x+y and M x−y belongs to the BDI M+− and BDI M++ classes, which are classified by 0 and Z, respectively [66]. The subscript in M +− represents commutation (+) and anti-commutation (−) relation of the mirror operation Here Φx and Φy are the Berry phases for the whole bands (usually the whole occupied bands) along the kx and ky directions, respectively. In (a,b,c) where Φy = 0, w2 can be determined by det W2(B2) whereas in (d,e) where Φy = π, w2 can be determined by det W2(B1).
with time reversal T and particle-hole T S operations, respectively.
According to the K-theory classification, corner charges are accumulated at the M x−y -invariant corners when m 1 = m 3 and m 2 = m 4 . This is consistent with our calculations in Fig. 10(a,b). Also, if we choose parameters m 1 = −m 3 and m 2 = −m 4 , corner charges are accumulated at M x+yinvariant corners as shown in Fig. 10(c,d) since then the role of M x+y and M x−y is changed. The corner states carry half charges as shown in Fig. 10(e). Those in-gap states disappear when mirror and chiral symmetries are broken [See Fig. 10(f)].

Nested Wilson loop method
The nested Wilson loop method was proposed in [60] as a diagnostics for anomalous corner charges induced from the bulk topology. Let us briefly recap the idea as follows. First, one calculates the Wilson loop operator along the k y direction for a given momentum k x . Here, k x and k y are arbitrary two independent momenta that parametrize the 2D Brillouin zone. Then, its phase eigenvalues Θ's (so-called Wilson bands) are calculated as a function of k x . The spectrum is gapped in general except for possible crossings on the Θ = 0 or Θ = π lines, because only the crossings on the Θ = 0 and Θ = π lines are protected by I ST symmetry [42] [See Fig. 11]. Therefore, one can separate the Wilson bands into two groups B 1 and B 2 that are centered at Θ = 0 and Θ = π, respectively, and separated by a gap inbetween. The choice of B 1 and B 2 is not unique, and the number of bands in a group can vary depending on the choice. However, the topological characteristic of each group B 1 , B 2 is independent of the choice. Then we can pick a particular group B i (i = 1, 2), and calculate their determinant of the Wilson loop along k x , i.e., the exponentiation of the Berry phase for B i along k x , It was suggested that this determinant of the "nested Wilson loop" is −1 (+1) when an anomalous corner charge is (is not) present. Let us note that this method can be used to the cases when the number of bands is bigger than two because the Wilson loop spectrum is not gapped in general for two bands. See Fig. 1(d) in the main text as an example of a gapless Wilson loop spectrum for two bands. Now we show how the nested Wilson loop is related to the second Stiefel-Whitney class, which is responsible for the appearance of the anomalous corner charges. More specifically, let us clarify that i) which block of Wilson bands (B 1 , or B 2 , or both) should be chosen to determine the second Stiefel-Whitney class w 2 , and ii) whether it is possible to determine w 2 directly from the pattern of the Wilson loop spectrum without additional computation of the nested Wilson loop. Notice that the decomposing the Wilson bands into two blocks B 1 and B 2 corresponds to decomposing the transition functions into two blocks, because the Wilson loop operator is equivalent to the transition functions in a parallel-transport gauge [42]. Then, according to the Whitney sum formula [42,43], the total Stiefel-Whitney class w 2 (B 1 ⊕ B 2 ) can be determined by the topological invariants of each block as w 2 (B 1 ⊕ B 2 ) = w 2 (B 1 ) + w 2 (B 2 ) First, let us choose B 1 to determine det W 2 (B 1 ) = exp[iΦ x (B 1 )]. Notice that Φ y (B 1 ) = 0 since B 1 is centered at Θ = 0, and w 2 (B 1 ) = 0 since it is given by the number of the Wilson band crossings at the Θ = π line [42]. Then we have In fact, w 2 (B 2 ) and det W 2 (B 1 ) can be further related to each other in some cases. In order to investigate all possible patterns of Wilson loop spectra with w 2 (B 1 ⊕ B 2 ) = 1, as shown in Fig. 11, let us recall that the second Stiefel-Whitney class can be determined by the Wilson loop spectrum as follows [42]: i) when Φ y = 0, it is given by the number of crossing points on the Θ = π line [ Fig. 11(a,b,c)]; ii) when Φ y = π, it is given by the number of crossing points on the Θ = 0 line if the number of bands is odd [ Fig. 11(d)] whereas it is undetermined by the spectrum if the number of bands is even [ Fig. 11(e)]; iii) furthermore, the Berry phase along k x direction Φ x can be determined by the parity of the total number of crossing points on both the Θ = 0 and Θ = π lines. For instance, Φ x = 0 in Fig. 11(a) (Φ x = π in Fig. 11(b)) because there are even (odd) crossing points in total; iv) however, the Berry phase Φ x is indeterminate when there are flat Wilson bands at Θ = 0 or π as in Fig. 11 (c),(d),(e).
Basically the same rule can be applied to a subset of Wilson bands, B 1 or B 2 . Keeping the above rules in mind, let us consider the following two cases: (1) When Φ y (B 2 ) = 0, corresponding to the cases shown in Fig. 11(a,b,c), we also have w 2 (B 2 ) = 1 because of the single crossing point on the Θ = π line. Then w 2 (B 1 ⊕B 2 ) = 1 does not depend on det W 2 (B 1 ). Let us determine det W 2 (B 1 ) by inspecting the evolution pattern of the Wilson bands in B 1 and compare it with w 2 (B 1 ⊕ B 2 ) = 1. Notice that det W 2 (B 1 ) = −1 and +1 in Fig. 11 (a) and Fig. 11 (b), respectively, since it can be determined by the number of the crossings on the Θ = 0 line, that is, det W 2 = 1 (−1) when the number is even (odd) [42]. However, in the case shown in Fig. 11 (c), det W 2 (B 1 ) cannot be determined simply by looking at the shape of the Wilson band in B 1 . When there is a flat Wilson band on the Θ = 0 line, det W 2 (B 1 ) should be determined directly via numerical computation.
Therefore, we find that although w 2 (B 1 ⊕ B 2 ) = 1 is fixed for all the cases shown in Fig. 11(a,b,c), det W 2 (B 1 ) varies depending on the shape of the Wilson bands in B 1 . So one cannot establish any relationship between w 2 (B 1 ⊕ B 2 ) and det W 2 (B 1 ). However, by using the other block B 2 , one can see that det W 2 (B 2 ) = −1 in all the three cases shown in Fig. 11(a,b,c). Thus we conclude that when Φ y (B 1 ⊕B 2 ) = 0, w 2 (B 1 ⊕ B 2 ) can be determined by det W 2 (B 2 ). This is basically because both are given by the parity of the crossing points at Θ = π in the non-nested Wilson loop spectrum. Namely, w 2 (B 1 ⊕ B 2 ) = 0 (1) indicates det W 2 (B 2 ) = 1 (−1) whereas det W 2 (B 1 ) is not a meaningful quantity.
In conclusion, the determinant of the nested Wilson loop is equivalent to second Stiefel-Whitney class in all cases shown in Fig. 11. However, depending on the total Berry phase Φ y (B 1 ⊕B 2 ), a different block of Wilson bands should be used to determine w 2 (B 1 ⊕ B 2 ). Specifically, when Φ y (B 1 ⊕ B 2 ) is 0 (π), B 2 (B 1 ) should be used to determine det W 2 from the evolution pattern of the Wilson bands in the block. Let us note that, in the case shown in Fig. 11 (e), w 2 cannot be determined simply by the shape of the (non-nested) Wilson loop spectrum, so the nested Wilson loop should be numerically calculated to get w 2 . In practice, however, there is an alternative way. We can avoid the case (e) by calculating the Wilson loop spectrum along a different direction (along k x or along k x + k y ). Then w 2 can be determined directly by the pattern of the Wilson loop spectrum without additional numerical calculations of the nested Wilson loop.