In Walters' An Introduction to Ergodic Theory I found the following Theorem and proof (p. 29):
Theorem 1.7. Let $X$ be a compact metric space, $\mathfrak{B}(X)$ the $\sigma$-algebra of Borel subsets of $X$ and let $m$ be a probability measure on $(X,\mathfrak{B}(X))$ such that $m(U)>0$ for every non-empty open set $U$. Suppose $T\colon X\to X$ is a continious transformation which preserves the measure $m$ and is ergodic. Then almost all points of $X$ have a dense orbit under $T$, i.e. $\left\{x\in X|(T^nx)_{n=0}^{\infty}\text{ is a dense subset of }X\right\}$ has measure one.
PROOF. Let $\left\{U_n\right\}_{n=1}^{\infty}$ be a base for the topology of $X$. Then $$ \left\{T^nx|n\geqslant 0\right\} $$ is dense in $X$ iff $$ x\in\bigcap_{n=1}^{\infty}\bigcup_{k=0}^{\infty}T^{-k}U_n. $$ Since $T^{-1}(\bigcup_{k=0}^{\infty}T^{-k}U_n)\subset \bigcup_{k=0}^{\infty}T^{-k}U_n$ and $T$ is measure-preserving and ergodic we have $m(\bigcup_{k=0}^{\infty}T^{-k}U_n)=0$ or $1$. Since $\bigcup_{k=0}^{\infty}T^{-k}U_n$ is a non-empty open set we have $m(\bigcup_{k=0}^{\infty}T^{-k}U_n)=1$. The results follows.
Hello, I have two questions to this proof.
1.) Why is $\left\{T^nx|n\geqslant 0\right\}$ dense in $X$ iff $x\in\bigcap_{n=1}^{\infty}\bigcup_{k=0}^{\infty}T^{-k}U_n$?
Edit: I think maybe I can try to answer this question by myself.
$A_x:=\left\{T^nx|n\geqslant 0\right\}$ is dense in $X$ if any neighbourhood $N$ in $X$ contains a point out of $A_x$. So let $N\subset X$ be an arbitrary neighbourhood in $X$, then for a $m\in\left\{0,1,2,...\right\}$, and an open set $O$ it is $a:=T^mx\in O\subseteq N$. $O$ can be written as $O=\bigcup_{i\in I}U_i$ for a subset $I\subseteq\left\{0,1,2,...\right\}$, so it is $a\in\bigcup_{i\in I}U_i$, i.e. $a\in U_i$ for at least one $i\in I$. i.e. $x\in T^{-m}U_i$. From this it follows that $x\in\bigcup_{k=0}^{\infty}T^{-k}U_i$. Because we do not know which set of the base it is, we build the intersection. So if $A_x$ is dense in $X$, then each point of $A_x$ is in a union $\bigcup_{k=0}^{\infty}T^{-k}U_i$ for any $i\in\left\{0,1,2,3,...\right\}$ which is in any case true if $x\in\bigcap_{n\geq 1}\bigcup_{k\geq 0}T^{-k}U_n$.
2.) Why is it enough that $T^{-1}(\bigcup_{k=0}^{\infty}T^{-k}U_n)\subset \bigcup_{k=0}^{\infty}T^{-k}U_n$, isn't it necessary that $T^{-1}(\bigcup_{k=0}^{\infty}T^{-k}U_n)= \bigcup_{k=0}^{\infty}T^{-k}U_n$ in order to use the ergodicity?
Edit: I think I can answer that by myself, too, now. One has to use an equivalent formulation of ergodicity: It is $$ T^{-1}\left(\bigcup_{k\geqslant 0}T^{-k}U_n\right)\subset\bigcup_{k\geqslant 0}T^{-k}U_n=:A $$ and (because $T$ is measure-preserving) $$ m\left(T^{-1}A\right)=m\left(A\right), $$ so both sets are equal almost surely, i.e. $$ m(T^{-1}A\Delta A)=0, $$ so it is $m(A)=0$ or $m(A)=1$.
Because $T$ is continious and $U_n$ is open (because it's in the base), $T^{-k}U_n$ is open for any $k\geqslant 0$. So the countable union is open, too. Moreover, the union isn't empty, because each such union contains a point out of $\left\{T^nx|n\geqslant 0\right\}$ because of the density of that set in $X$. So it is $m(A)>0$, i.e. $m(A)=1$.
Why does now follow the result? Do not see this last step. Can you explain that, pls? Maybe it's very easy and I simply do not see.