[proofplan]
We first identify $\omega_f(x)$ with the intersection of the closed tails of the forward orbit of $x$. Compactness then gives non-emptiness by applying the finite intersection property to this nested family, and compactness of the omega-limit set follows because it is closed in $X$. Forward invariance is obtained by shifting a convergent subsequence of the orbit forward by one iterate. When $f$ is a homeomorphism, we recover the reverse inclusion by shifting the approximating orbit points backward and using continuity of $f^{-1}$.
[/proofplan]
custom_env
admin
[step:Represent the omega-limit set as an intersection of closed orbit tails]Fix $x \in X$. For each $N \in \mathbb{N}_0$, define the orbit-tail set $O_N \subset X$ and its closure $K_N \subset X$ by
\begin{align*}
O_N := \{f^n(x) : n \in \mathbb{N}_0 \text{ and } n \geq N\}, \qquad K_N := \overline{O_N}.
\end{align*}
We claim that
\begin{align*}
\omega_f(x)=\bigcap_{N=0}^{\infty} K_N.
\end{align*}
If $y \in \omega_f(x)$, then there is a strictly increasing sequence $(n_k)_{k=1}^{\infty} \subset \mathbb{N}_0$ such that $f^{n_k}(x) \to y$. Fix $N \in \mathbb{N}_0$. Since $n_k \to \infty$, there exists $k_N \in \mathbb{N}$ such that $n_k \geq N$ for all $k \geq k_N$. Hence $f^{n_k}(x) \in O_N$ for all $k \geq k_N$, and the convergence $f^{n_k}(x) \to y$ implies $y \in \overline{O_N}=K_N$. Since $N$ was arbitrary, $y \in \bigcap_{N=0}^{\infty}K_N$.
Conversely, suppose $y \in \bigcap_{N=0}^{\infty}K_N$. For each $k \in \mathbb{N}$, since $y \in K_k=\overline{O_k}$, there exists $m_k \in \mathbb{N}_0$ with $m_k \geq k$ and
\begin{align*}
d(f^{m_k}(x),y)<\frac{1}{k}.
\end{align*}
The sequence $(m_k)_{k=1}^{\infty}$ satisfies $m_k \to \infty$, though it need not be strictly increasing. Choose a strictly increasing subsequence $(n_j)_{j=1}^{\infty}$ of $(m_k)_{k=1}^{\infty}$; then $f^{n_j}(x) \to y$ because the corresponding distance bound tends to $0$. Therefore $y \in \omega_f(x)$.[/step]
custom_env
admin
[guided]The goal of this step is to turn the subsequence definition of $\omega_f(x)$ into a closed-set formula. For each $N \in \mathbb{N}_0$, define
\begin{align*}
O_N := \{f^n(x) : n \in \mathbb{N}_0 \text{ and } n \geq N\}, \qquad K_N := \overline{O_N}.
\end{align*}
Thus $O_N$ is the part of the forward orbit after time $N$, and $K_N$ is the set of all possible limits of points that can be approximated by this tail.
First let $y \in \omega_f(x)$. By definition, there is a strictly increasing sequence $(n_k)_{k=1}^{\infty} \subset \mathbb{N}_0$ such that $f^{n_k}(x) \to y$. Fix a tail index $N \in \mathbb{N}_0$. Since the integers $n_k$ increase without bound, there is $k_N \in \mathbb{N}$ such that $n_k \geq N$ whenever $k \geq k_N$. Hence all sufficiently late points $f^{n_k}(x)$ lie in $O_N$. Since these same points converge to $y$, the point $y$ belongs to the closure $K_N=\overline{O_N}$. This holds for every $N$, so
\begin{align*}
y \in \bigcap_{N=0}^{\infty} K_N.
\end{align*}
For the reverse inclusion, suppose $y \in \bigcap_{N=0}^{\infty} K_N$. Membership in $K_k=\overline{O_k}$ means that $y$ can be approximated by points of the $k$-th tail. Therefore, for each $k \in \mathbb{N}$, there exists $m_k \in \mathbb{N}_0$ with $m_k \geq k$ and
\begin{align*}
d(f^{m_k}(x),y)<\frac{1}{k}.
\end{align*}
The indices $m_k$ tend to infinity because $m_k \geq k$. They may repeat or fail to be increasing, so we pass to a strictly increasing subsequence $(n_j)_{j=1}^{\infty}$ of the index sequence. Along that subsequence the same distance estimates force $f^{n_j}(x) \to y$. Hence $y$ is a subsequential limit of the forward orbit, which is exactly the condition $y \in \omega_f(x)$. Therefore
\begin{align*}
\omega_f(x)=\bigcap_{N=0}^{\infty} K_N.
\end{align*}[/guided]
custom_env
admin
[step:Use compactness to prove non-emptiness and compactness]
For every $N \in \mathbb{N}_0$, the set $O_N$ is non-empty because it contains $f^N(x)$. Hence $K_N=\overline{O_N}$ is non-empty. Also, $K_N$ is closed in $X$, and since $X$ is compact, $K_N$ is compact.
The family $(K_N)_{N=0}^{\infty}$ is nested: if $M \geq N$, then $O_M \subset O_N$, so $K_M \subset K_N$. Therefore every finite subfamily of $(K_N)_{N=0}^{\infty}$ has non-empty intersection, namely the smallest-index tail among that finite subfamily. Since $K_0$ is compact and all $K_N$ are closed subsets of $K_0$, the finite intersection property gives
\begin{align*}
\bigcap_{N=0}^{\infty} K_N \neq \varnothing.
\end{align*}
Using the intersection formula from the previous step, $\omega_f(x)$ is non-empty. The same formula also shows that $\omega_f(x)$ is closed as an intersection of closed subsets of $X$. Since $X$ is compact, every closed subset of $X$ is compact, so $\omega_f(x)$ is compact.
[/step]
custom_env
admin
[step:Shift convergent orbit subsequences forward to prove forward invariance]
Let $y \in \omega_f(x)$. By definition, there exists a strictly increasing sequence $(n_k)_{k=1}^{\infty} \subset \mathbb{N}_0$ such that $f^{n_k}(x) \to y$. Since $f:X \to X$ is continuous, applying $f$ to this convergent sequence gives
\begin{align*}
f(f^{n_k}(x)) \to f(y).
\end{align*}
For every $k \in \mathbb{N}$,
\begin{align*}
f(f^{n_k}(x))=f^{n_k+1}(x).
\end{align*}
The sequence $(n_k+1)_{k=1}^{\infty}$ is strictly increasing and tends to infinity. Hence $f(y)$ is a subsequential limit of the forward orbit of $x$, so $f(y) \in \omega_f(x)$. Since $y \in \omega_f(x)$ was arbitrary,
\begin{align*}
f(\omega_f(x)) \subset \omega_f(x).
\end{align*}
[/step]
custom_env
admin
[step:Shift convergent orbit subsequences backward when $f$ is a homeomorphism]
Assume now that $f:X \to X$ is a homeomorphism. We already know that $f(\omega_f(x)) \subset \omega_f(x)$, so it remains to prove $\omega_f(x) \subset f(\omega_f(x))$.
Let $y \in \omega_f(x)$. Choose a strictly increasing sequence $(n_k)_{k=1}^{\infty} \subset \mathbb{N}_0$ such that $f^{n_k}(x) \to y$. Since $n_k \to \infty$, after discarding finitely many terms we may assume $n_k \geq 1$ for every $k \in \mathbb{N}$. Define a sequence $(z_k)_{k=1}^{\infty}$ in $X$ by
\begin{align*}
z_k := f^{n_k-1}(x).
\end{align*}
Compactness of $X$ gives a subsequence $(z_{k_j})_{j=1}^{\infty}$ converging to some point $z \in X$. Since $n_{k_j}-1 \to \infty$, the point $z$ is a subsequential limit of the forward orbit of $x$, so $z \in \omega_f(x)$.
For every $j \in \mathbb{N}$,
\begin{align*}
f(z_{k_j})=f^{n_{k_j}}(x).
\end{align*}
The left-hand side converges to $f(z)$ by continuity of $f$, while the right-hand side converges to $y$ because it is a subsequence of $f^{n_k}(x) \to y$. [Uniqueness of limits](/theorems/625) in the [metric space](/page/Metric%20Space) $X$ gives $f(z)=y$. Thus $y \in f(\omega_f(x))$. Since $y \in \omega_f(x)$ was arbitrary,
\begin{align*}
\omega_f(x) \subset f(\omega_f(x)).
\end{align*}
Combining this reverse inclusion with forward invariance yields
\begin{align*}
f(\omega_f(x))=\omega_f(x).
\end{align*}
[/step]