Is the U(1) gauge theory in 2+1D dual to a U(1) or an integer XY model? The compact U(1) lattice gauge theory is described by the action
$$S_0=-\frac{1}{g^2}\sum_\square \cos\left(\sum_{l\in\partial \square}A_l\right),$$
where the gauge connection $A_l\in$U(1) is defined on the link $l$. I was told that this theory in 2+1D spacetime is dual to a U(1) XY model on the dual lattice, described by the following action
$$S_1=-\chi\sum_l \cos\left(\sum_{i\in\partial l}\theta_i\right)-K\sum_i\cos(\theta_i),$$
where the XY variable $\theta_i\in$U(1) is defined on the dual site $i$. It was said that the K term in the action is to take into account the instanton effect in the compact U(1) lattice gauge theory (which I don't understand). However when I tried to derive the the dual theory, I arrived at the following integer XY model (or height model?)
$$S_2=-\chi\sum_l \cos\left(\sum_{i\in\partial l}m_i\right),$$
with the integer variable $m_i\in\mathbb{Z}$ defined on the dual site $i$. Because the Pontryagin dual group of U(1) is simply $\mathbb{Z}$ but not U(1), so I believe that the U(1) gauge theory $S_0$ should dual to an integer XY model $S_2$, and this duality is exact. But every book or paper that I have encountered did not mention anything about $S_2$, instead they all point to the U(1) XY model $S_1$. Therefore I was forced to conjecture that the integer XY model is equivalent to the U(1) XY model with additional K term. Can anyone tell me if my conjecture is correct or not? How to go from $S_2$ to $S_1$ (or maybe directly from $S_0$ to $S_1$)? How is the K term being added? What is the physical meaning of the K term?
 A: Let't me give it a shot. One possible explanation is to imagine we soften the integer condition for $m$'s in $S_{2}$. Then, the cosine term in $S_{1}$ is what we want to add because when $K$ is large, it enforce the integer condition and go back to $S_{2}$.
A: It is dual to a model of integer spins on the dual lattice sites.  See for instance Savit.  The duality is between continuous compact variables and discrete integer variables.  The dual partition function is
$$
Z = \sum_{\{m \} } \prod_{x^{*}, \mu} I_{m - m'}\left( \beta \right)
$$
Where the product is over dual links (plaquettes of the original lattice) and the $m$s live on the dual sites.  the difference $m - m'$ is the difference between integer values at adjacent dual sites.  $\beta = 1/g^2$ and the sum is an unconstrainted sum over the integers at each dual site.
To derive this expand the Boltzmann weight in a Fourier series and integrate out the gauge fields.  Then solve the constraint on the integer variables associated with the plaquettes of the original lattice.
