  Using 2-d U(1) lattice gauge theory we study two definitions of the topological charge constructed from a generalized Villain action and analyze the implementation of the index theorem based on the overlap Dirac operator. One of the two definitions expresses the topological charge as a sum of the Villain variables and treats charge conjugation symmetry exactly, making it particularly useful for studying related physics. Our numerical analysis establishes that for both topological charge definitions the index theorem becomes exact quickly towards the continuum limit. 
Topology and index theorem with a generalized Villain lattice action --   a test in 2d