Solution (source code)

= Solution

At long distances in two dimensions the lattice <Green function> solves $-\nabla^2G=\delta$ and has $G(r)=-(2\pi)^{-1}\log(r/a)+\text{constant}$. Indeed the flux of $-\nabla G$ through a circle is one, fixing that coefficient. For well-separated <vortices> at $r_i$ with integer charges $q_i$, the <vortex Coulomb gas> action becomes
$$
\boxed{S_{\rm v}=\mu_{\rm core}\sum_iq_i^2-2\pi\beta\sum_{i<j}q_iq_j\log(r_{ij}/a),}
$$
with the self-energy convention, boundary terms and any global sectors retained separately. The factor two in the pair sum comes from the two ordered terms in $q^TGq$. Opposite charges have pair action $+2\pi\beta|q_iq_j|\log(r/a)$, so separating them costs energy and they attract. Like charges have a negative logarithmic pair coefficient and repel. The ultraviolet lattice regularizes the core, while multiply charged defects have a quadratic self-energy cost. A separated unit vortex-antivortex pair costs $2\mu_{\rm core}+2\pi\beta\log(r/a)$, the energetic basis for <vortex-antivortex binding> at low temperature. In three dimensions one instead has interacting closed <vortex> lines with a three-dimensional Green kernel; the logarithmic point-pair formula is specifically two-dimensional.