The forward recurrence set of a continuous map of a compact metric space Let $T:X\longrightarrow X$ be a continuous map of a compact metric space. We say $x\in X$ is a forward recurrent point if there exists $n_{1}<n_{2}<\cdots$ such that $T^{n_{i}}(x)\rightarrow x$. Let $\mathcal{R}(T)$ denote the set of all recurrent points in $X$.
Then, I am working on 

(1) Prove that $\mathcal{R}(T)$ is a Borel set.
(2) Prove that $m(\mathcal{R}(T))=1$ for any $T-$invariant Borel probability measure $m$.

For the first one, I tried to show that $\mathcal{R}(T)$ can be expressed as a union of open neighborhoods around recurrent point, but I don't know how to construct them.
For the second one, I tried to show that $T$ is ergodic and $T^{-1}(\mathcal{R}(T))=\mathcal{R}(T),$ but I failed.
Is there any other direct way to prove this question?
Thank you.
Edit 1:
I think I have proved part $(1)$, as follow:
Let $E\in\mathcal{B}$ be some open neighborhood of $x\in X$. Define $$A_{N}:=\{x\in X:T^{n}x\in E\ \text{for some}\ n\geq N\},$$ then $$A_{N}=\bigcup_{n=N}^{\infty}T^{-n}E\in\mathcal{B}.$$ Thus, $$\mathcal{R}(T)=\bigcap_{N=0}^{\infty}A_{N}=\{x\in X:T^{n}(x)\in E\ \text{i.o.}\}=\{x\in X: T^{n}(x)\rightarrow x\ \text{i.o.}\},$$ is a Borel set. 
I am still thinking about (2), and please feel free to point out my mistake if I was wrong in the proof of (1).
Edit 2:
I think I proved the second part, but I am really not sure if it is correct. I missed one point that the measure has been normalized to be $1$ not infinity, so what we truly need to show is that $\mathcal{R}(T)$ and $X$ have only difference of a null set. Below is my proof:
Let $\{U_{n}\}_{n\geq 0}$ be a basis of open sets such that $$\lim_{n\rightarrow\infty}diam(U_{n})=0, $$ and $$\bigcup_{n\geq m}U_{n}=X,$$ for every $m\geq 0$. 
Define $$V_{n}:=\{x\in U_{n}: T^{i}(x)\in U_{n}\ \text{for infinitely many values of}\ i>0\},$$ then by Poincare Recurrence Theorem, $$\mu(U_{n}\setminus V_{n})=0.$$
Now, set $$Y:=\bigcap_{m=0}^{\infty}\bigcup_{n\geq m}V_{n},$$ it then follows that $$\mu(X\setminus Y)=\mu\Big(\bigcup_{m=0}^{\infty}\Big(X\setminus\bigcup_{n\geq m}V_{n}\Big)\Big)=\mu\Big(\bigcup_{m=0}^{\infty}\Big(\bigcup_{n\geq m}U_{n}\setminus\bigcup_{n\geq m}V_{n}\Big)\Big)\leq \mu\Big(\bigcup_{m=0}^{\infty}\bigcup_{n\geq m}(U_{n}\setminus V_{n})\Big)=0.$$
Also, by construction, $\mathcal{R}(T)\subset Y$. 
Thus, we now only need to show that for all $x\in Y$, $T^{i}(x)\rightarrow x$ is satisfied for infinitely many positive values of $i$. 
Let $r>0$, choose $m$ such that $diam(U_{n})\leq r/3$ for all $n\geq m.$ 
Since $x\in Y$, then $x\in \bigcup_{n\geq m}V_{n}$ must hold, which means that $x\in V_{n}$ for some $n\geq m$. Since $diam(U_{n})\leq r/3$ for such $n$, we have $U_{n}\subset B_{r}(x)$, and thus $T^{i}(x)\in B_{r}(x)$ if $T^{i}(x)\in U_{n}$. But since $x\in V_{n}$, $T^{i}(x)\in U_{n}$ for infinitely many values of $i$, and thus $T^{i}(x)\in B_{r}(x)$ for infinitely many values of $i$. 
Therefore, for all $x\in Y$, $T^{i}(x)\rightarrow x$ for infinitely many of $i$, and thus $Y\subset\mathcal{R}(T).$
Therefore, $\mathcal{R}(T)=Y$, and thus $$\mu(X\setminus Y)=\mu(X)-\mu(Y)=1-\mu(Y)=0,$$ implies that $$\mu(\mathcal{R}(T))=\mu(Y)=1.$$
I am not sure if my construction of $Y$ directly suggested $\mathcal{R}(T)\subset Y$, if not, how could I prove it?
 A: I stopped thinking about this question for days, and yesterday I got back to think about it. The hard part of $(1)$ is to prove the two definitions are equivalent so that my argument in the post can work. My argument for $(2)$ is basically correct, but I corrected some minor mistake. 
Proof for (1):
By definition, $\mathcal{R}(T)$ could be written as $$\mathcal{R}(T)=\overline{\bigcup_{k=1}^{\infty}T^{k}(x)}.$$
This is equivalent to: 

(1): $x\in X$ is a recurrent point if for every neighborhood $U$ of $x$, there is some $n\in\mathbb{N}$ such that $T^{n}(x)\in U$.

Now, we want to show the above definition is equivalent to:

(2) $x\in X$ is a recurrent point if for every open neighborhood $U$ of $x$, then there are infinite many positive integers $n$ such that $f^{n}(x)\in U.$

Firstly, $(2)\implies (1)$ is immediate.
To prove $(1)\implies (2)$, we need to note that any metric space is Hausdorff, and thus any singleton set $\{x\}$ is closed in $X$. 
Now, suppose $(1)$ holds, and then given an open neighborhood $U$ of $x$, let $n_{1}$ be the first (smallest) positive integer such that $f^{n_{1}}(x)\in U$. 
If $f^{n_{1}}(x)=x$, then the periodicity of $x$ yields an infinitely many of values, namely $n_{k}=kn_{1}$ such that $f^{n_{k}}\in U$ and we are done. 
If $f^{n_{1}}(x)\neq x$, then $U\setminus\{f^{n_{1}}(x)\}$ is an open set containing $x$, and since $(1)$ holds, there must be a new positive integer $n_{2}>n_{1}$ such that $$f^{n_{2}}(x)\in U\setminus\{f^{n_{1}}(x)\}\subset U,$$ and $$f^{j}(x)\notin U,\ \text{for any}\ n_{1}<j<n_{2}.$$
By analogous reasoning, we deduce the existence of an infinite set of positive integers $(n_{j})_{j}$ such that $f^{(n_{j})_{j}}\in U$.
Therefore, totally $(1)\implies (2)$ and thus $(1)\iff (2)$. 
Thus, if we define $A(T,x)$ to be set of points $x\in X$ such that for every neighborhood $U$ of $x$, the relation $T^{n}(x)\in U$ is satisfied for infinitely many of positive integers $n$, then $\mathcal{R}(T)$ could be written as $$R(T)=\{x\in X: x\in A(T,x)\}.$$
Now, let $x\in X$, given an open neighborhood $U$ of $x$, define the set $$E_{N}:=\{x\in X:T^{n}(x)\in U\ \text{for some}\ n\geq N\},$$ then $$E_{N}=\bigcup_{n=N}^{\infty}T^{-n}(U)\in\mathcal{B}.$$
Then, $$\bigcap_{N=1}^{\infty}E_{N}=\{x\in X:T^{n}(x)\in U\ \text{i.o.}\ \}=\{x\in X: x\in A(T,x)\}=R(T)\in \mathcal{B}.$$
Proof for (2):
Since $R(T)\subset X$, we have $$\mu(R(T)^{c})=\mu(X\setminus R(T))=\mu(X)-\mu(R_{T})=1-\mu(R(T)),$$ and thus equivalently, we can show $$\mu\Big(\{x\in X:x\notin A(T,x)\}\Big)=0.$$
Note that any compact metric space is separable which allows us to make the below construction. 
Let $\{U_{n}\}_{n\geq 0}$ be a basis of open sets such that $$\lim_{n\rightarrow\infty}diam(U_{n})=0, $$ and $$\bigcup_{n\geq m}U_{n}=X,$$ for every $m\geq 0$. 
Define $$V_{n}:=\{x\in U_{n}: T^{i}(x)\in U_{n}\ \text{for infinitely many values of}\ i>0\},$$ then by Poincare Recurrence Theorem, $$\mu(U_{n}\setminus V_{n})=0.$$
Now, set $$Y:=\bigcap_{m=0}^{\infty}\bigcup_{n\geq m}V_{n},$$ it then follows that $$\mu(X\setminus Y)=\mu\Big(\bigcup_{m=0}^{\infty}\Big(X\setminus\bigcup_{n\geq m}V_{n}\Big)\Big)=\mu\Big(\bigcup_{m=0}^{\infty}\Big(\bigcup_{n\geq m}U_{n}\setminus\bigcup_{n\geq m}V_{n}\Big)\Big)\leq \mu\Big(\bigcup_{m=0}^{\infty}\bigcup_{n\geq m}(U_{n}\setminus V_{n})\Big)=0.$$
Thus, we now only need to show that for all $x\in Y$, $x\in A(T,x)$, since if it was true, we would have $Y\subset R(T)$ and consequently $$0=\mu(X\setminus Y)\geq\mu(X\setminus R(T))=\mu(R(T)^{c}).$$
Let $\epsilon>0$, choose $m$ such that $diam(U_{n})\leq \epsilon/3$ for all $n\geq m.$ 
Since $x\in Y$, then $x\in \bigcup_{n\geq m}V_{n}$ must hold, which means that $x\in V_{n}$ for some $n\geq m$. Since $diam(U_{n})\leq \epsilon/3$ for such $n$, we have $U_{n}\subset B_{\epsilon}(x)$, and thus $T^{i}(x)\in B_{\epsilon}(x)$ if $T^{i}(x)\in U_{n}$. But since $x\in V_{n}$, $T^{i}(x)\in U_{n}$ for infinitely many values of $i$, and thus $T^{i}(x)\in B_{\epsilon}(x)$ for infinitely many values of $i$. 
Therefore, for all $x\in Y$, $x\in A(x, T)$. 
Note 1:
This proof is greatly inspired by the following posts:
(1) Recurrent point of continuous transformation in a compact metric space
(2) Recurrent point: two definitions
(3) Proof about diameter of a set
(4) https://pdfs.semanticscholar.org/8589/8b1368c334fb73d16d2ab2462bbd5bf466a7.pdf
(1) helped me understand the definition given in my problem, while (2) inspired me about the equivalence of definitions. (3) gives me the inspiration of the construction in part (b), and (4) helped me understand why we need to be in a compact metric space, especially for its $T_{1}$ and separable properties. 
Note 2:
The definition of the $\omega-$limit set in Wikipedia is wrong, since by its definition, the set would be empty if your function is not $f(x)=x$. The third definition in above (4) is also wrong for it is the same as what appears in Wikipedia.
Link in Wikipedia: https://en.wikipedia.org/wiki/Limit_set
