If a monothetic group is locally compact, then it is either discrete or compact A topological group $G$ is called monothetic if it is Hausdorff and has a dense
cyclic subgroup.
I wish to prove that

If a monothetic group is locally compact, then it is either discrete or compact.

Suppose a monothetic group $G$ is locally compact, i.e., for every $g\in G$, there exists compact $K$ and open $U$ such that $g\in U\subset K.$ If $G$ is discrete, then every singleton subset $\{g\}$ of $G$ is open. In fact, this is also a sufficient condition (since an arbitrary union of open sets is open). On the contrary, suppose $G$ is not discrete, i.e., there exists some $x\in G$ such that $\{x\}$ is not open. Thus, $G\setminus \{x\}$ is not closed. The smallest closed set containing $G\setminus\{x\}$ is $G$, so, $G\setminus\{x\}$ is dense in $G$. We also know that $G$ has a dense cyclic subgroup, say $\langle h\rangle$ for some $h\in G$. How do I show that $G$ is compact?
Thank you!

Source: Some Remarks on Monothetic Groups (S. Rolewicz, Warsaw).
 A: In Pontryagin's book this result is stated in $\S39$, Lemma 1.
But it can be found in other books besides.
This result with a detailed proof is given in Rudin's book Fourier Analysis on Groups (see $\S$ 2.3.2).
A more general result can be found in Hewitt and Ross Abstract Harmonic Analysis, Vol. I (see $\S$ 9.1).
I will give a proof for completeness.
Let $G$ be a locally compact group, $G=\overline{\langle h\rangle}$ for some $h\in G$, and let $G$ be non-discrete.

Lemma 1. If $V$ is an arbitrary open set in $G$, then there exists $k\in\mathbb{N}$ that $kh\in V$.

Proof. Choose $m\in\mathbb{Z}$ such that $mh\in V$. Let $W$ be a symmetric neighborhood of zero such that $mh+W\subset V$. Choose $n>|m|$ such that $nh\in W$. Let $k=m+n>0$. We have $(m+n)h=mh+nh\in mh+W\subset V$. Lemma is proved.
Now let $V$ be a symmetric neighborhood of zero such that $\overline{V}$ is compact. By Lemma 1
$$
G=\cup_{k\in\mathbb{N}}ka+V.
$$
Since $\overline{V}$ is compact, there exists $q\in\mathbb{N}$ that
$$
\overline{V}\subset\cup_{k=1}^q ka+V.\tag1
$$
Let us prove that in fact
$$
G=\cup_{k=1}^q ka+V.\tag2
$$
Let $g\in G$. Let $m$ be the smallest positive integer that $mh\in g+V$ (Lemma 1).
We have $mh-g\in V$. Let $mh-g\in kh+V$, $1\leq k\leq q$ (see (1)).
So $(m-k)h\in g+v$. It follows that $m-k\leq0$ that is $1\leq m\leq k\leq q $.
So $g\in mh-V=mh+V$.
We have proved equality (2). Hence it follows that $G$ is a compact.
