Solution (source code)

= Solution

A <compact metric space> is <second countable>. To see this concretely, for each positive integer $r$ choose a finite cover by balls of radius $1/r$. Their centres, over all $r$, form a countable <dense subset>; balls centred there with positive rational radii form a countable <basis of a topology>. Enumerate its nonempty members as $(V_j)_{j\geq1}$, repeating members if the basis is finite.

For each $j$, put
$$
G_j=\bigcup_{n\geq1}f^{-n}(V_j).
$$
Each $G_j$ is an <open set>, because all <iterations of a map> $f^n$ are <continuous>. It is <dense>: if $U$ is any nonempty <open set>, the hypothesis supplies $n\geq1$ and $u\in U$ with $f^n(u)\in V_j$, so $u\in U\cap G_j$.

A <compact metric space> is a <complete metric space>, hence a <Baire space>. The <Baire category theorem> implies that $G=\bigcap_{j\geq1}G_j$ is <dense>, and in particular nonempty. For any $x\in G$, the forward <orbit> of $x$ meets every $V_j$, and therefore every nonempty <open set>. Its <orbit closure> is $X$. Thus \b[the open-set intersection hypothesis implies point transitivity], and in fact the set of points with a dense forward <orbit> contains the dense intersection $G$.