The lattice of compact representations of an infinite group