TITLE: Poincare recurrence theorem and convergence on compact metric spaces
QUESTION [6 upvotes]: I am looking for a proof (or a reference to a proof) of the following theorem:
Let $X$ be a compact metric space with metric $d$, endow $X$ with the Borel $\sigma$-algebra and a probability measure $\mu$. Let $T\colon X\to X$ be a continuous map which is $\mu$-preserving. Then for $\mu$-almost every $x\in X$ there is a sequence $n_k\to\infty$ in $\mathbb{N}$ such that $T^{n_k}x\to x$ as $k\to\infty$.
I tried already for some time and looked for references, unfortunately unsuccessful. It seems that one needs to find the right formulation to be able to use the Poincare recurrence theorem. Any ideas?

REPLY [3 votes]: This is part of the statement of Proposition 4.1.18 in Introduction to the Modern Theory of Dynamical Systems by Katok and Hasselblatt. As far as I am aware there is essentially only one proof, which is that given by Anthony. It generalises to the following result which I have found useful once or twice but which is less frequently stated:
Proposition: Let $T$ be a measure-preserving transformation of the probability space $(X,\mathcal{F},\mu)$, $Y$ a second-countable topological space, and $f \colon X \to Y$ measurable. Then $$\mu\left(\left\{x \in X \colon f(x) \in \overline{\left\{f(T^nx) \colon n \geq 1\right\}}\right\}\right)=1.$$
Proof: Let $\{U_k\colon k \geq 1\}$ be a countable base for the topology of $Y$. For each $k \geq 1$ we have $$\mu\left(\left\{x \in f^{-1}(U_k) \colon f(T^nx ) \in U_k \text{ infinitely often}\right\}\right)=\mu\left(f^{-1}(U_k)\right)$$
by the Poincare recurrence theorem. Taking an appropriate intersection over all $k$ we find that there is a set of full measure on which every $x$ returns infinitely often to every $f^{-1}(U_k)$ to which $x$ originally belonged. Since $\{U_k\}$ is a base the result follows.
(Your question corresponds to the case $Y:=X$ and $f:=\mathrm{id}$.)