Subset of attractor Let $(X,F)$ be some dynamical system where $X$ is a compact metric space and $F\colon X\to X$ is continuous. Let
$$
\operatorname{NW}(F):=\{x\in X: \text{for each neighborhood $U$ of $x$ } \exists~n\geq 1: F^{n}(U)\cap U\neq\emptyset\}.
$$
Then
$$
\operatorname{NW}(F)\subset \bigcap_{n\geq 1}F^n(X)=:E.
$$
Does anyone know a reference, maybe with a proof?

 A: The original version of the question asked about general topological spaces, so I'll state results in that setting. It is easy to come up with counterexamples for non-compact or non-Hausdorff spaces. I will argue that the answer is yes if $X$ is regular Hausdorff and $F$ is a closed map. This includes the case of compact metric spaces $X,$ since a continuous map from a compact space to a Hausdorff space is closed.

For regular Hausdorff spaces $X,$ we can use a stronger property of nonwandering points:

A point $x$ is nonwandering ($x\in NW(F)$) if and only of for all neighborhoods $U$ of $x$ and all $N\geq 0$ there exists $n>N$ such that $F^n(U)\cap U\neq\emptyset.$

This property clearly implies your property - just take $N=1.$
For the other direction, we can assume $x$ is not periodic because that is an easy case. By regularity there is an open neighbourhood $U'\ni x$ whose closure $\overline{U'}$ in contained in $U\setminus \{F(x),F^2(x),\dots,F^N(x)\}.$ Define $U''=U'\setminus \bigcup_{n=1}^N F^{-n}(\overline{U'}).$ This is an open set containing $x$ and we've ensured that $U''\cap F^{-n}(U'')=\emptyset$ for $n=1,\dots,N.$ By your definition of a nonwandering point there exists $n\geq 1$ with $U''\cap F^n(U'')\neq \emptyset,$ which means $U''\cap F^{-n}(U'')\neq \emptyset,$ which forces $n>N$ as required.

This stronger definition of a nonwandering point implies that for each $N\geq 1,$ every point $x\in U=X\setminus \overline{F^N(X)}$ is wandering: $F^n(U)\subseteq F^N(X)\subseteq X\setminus U$ for $n\geq N.$ This gives $NW(F)\subseteq\bigcap_{n\geq 1}\overline{F^n(X)}.$ If $F$ is a closed map then the sets $F^n(X)$ are already closed, so this simplifies to $NW(F)\subseteq\bigcap_{n\geq 1}F^n(X)=E.$
