in terms of the dual variables $\tau$, the Boltzmann weights are not positive anymore. The ${\mathbb{Z}}_2$ constraint thus appears as a natural way to reflect the additional ${\mathbb{Z}}_2$ symmetry while maintaining positive Boltzmann weights and locality.

Generalizations to $G=G'=Z_N$ {#sec:gen_2d}
-----------------------------

Let us generalize the above model to the case $G=G'=Z_N$. Accordingly, we consider a directed square lattice and take $\sigma_i \in {\rm Z}_N$ and $U_{ij} = U_{ji}^{-1} \in {\rm Z}_N$ for the orientation being from vertex $i$ to $j$. We represent elements in ${\rm Z}_N$ by $e^{2\pi i \alpha/N}$, $\alpha= 0,1,\dots,N-1$. For a given $p=0,1,\dots,N-1$, let us define the minimal coupling: $$\begin{aligned}
  \mathscr{H}_{p} 
  &= 
  \sum_{i}\sum_{j\sim i}
  \sigma^p_i U_{ij} \sigma^{-p}_j\, ,\end{aligned}$$ where $j\sim i$ means $j$ a neighbour of $i$, so that each edge is counted twice, once with its positive and once with its negative orientation ensuring a real energy. Given non-zero $p\neq p'$ the generalized model is defined by with $$\begin{aligned}
  \label{eq:model_ZN}
  -\beta\mathscr{H}_{p,p'} &= 
  K_1  \mathscr{H}_{p} 
  +
  K_2 \mathscr{H}_{p'} 
  \, .\end{aligned}$$ As we will show, for large $K_1$ ($K_2$) p ($p'$) controls the topological index. Let us note that $\sigma^p$ is a ${\mathbb{Z}}_N$ variable only when $p$ and $N$ are co-prime. Otherwise, it has a reduced order, given 