Contraction of compact sets I am trying to solve the following problem.

Let $X$ be a compact Hausdorff space and let $f:X\to X$ be continuous.
  Show that there exists a non-empty set $A\subset X$ such that
  $f(A)=A$.

There is a hint to define $A=\cap_{n\ge 0} A_n$ with $A_{n+1}=f(A_n)$ and $A_0=X$.
Then $x\in A_{n+1}$ implies that $f^{-1}(x)\cap A_n\ne\emptyset$. Right? So if $f^{-1}(x)\cap A_n=\emptyset$ then $x\notin A_{n+1}$. Is this correct?
First I need to show that for $A$ defined in the hint it holds $f(A)=A$. For this to happen it is enough to have $f(A)=\cap_{n\ge 0} f(A_n)$ Because then $f(A)=\cap_{n\ge 1} A_n=\cap_{n\ge 1} A_n\cap X=A$. But got stuck proving the equality.
What I did for that is to assume that there exists $x\in A$. This means that $\exists y_n\in A_n$ such that $f(y_n)=x$ for all $n$. Is this enough to deduct that $f(x)\in A$?
Then I need to show that $A$ is not empty. For this I think it is enough to show that $A_{n+1}\subset A_n$, because $A_n$ are compact and then their intersection is not empty. However I am stuck there too. I tried by contradiction assuming $\exists x\notin A_n$ with $f(x)\in A_{n}$, but I cannot work from there.
Initially I thought of something else. Choose $x_n\in A_n$ and create the sequence $\{x_n\}$. This has a convergent subsequence $\{x_{n_k}\}$. Then I create a sequence $\{x'_m\}$ by defining $x'_m=x_{n_k}$ with $n_k=\max\{j\in\{n_k\}|j\le m\}$. So basically i repeat the terms of the subsequence to get a convergent sequence. However this again requires that $A_{n+1}\subset A_n$ so I have $x'_m\in A_m$. Then I think that the limit $x'_m\to x$ is in $A$ but I was not able to show that also.
Thanks in advance.
 A: You need to prove three things with the hint to apply the theorem and show that $A \neq \emptyset$. Each of them is provable by induction:


*

*$\color{red}{\forall n, A_{n+1} \subset A_n}$: $A_1 = f(X)$ is clearly included in $X$. Now assume $A_{n+1} \subset A_n$, then $A_{n+2} = f(A_{n+1}) \subset f(A_n)$ (by induction hypothesis), but $f(A_n) = A_{n+1}$, so $A_{n+2} \subset A_{n+1}$.

*$\color{red}{\forall n, A_n \neq \emptyset}$: $A_0 = X$ is nonempty, and if $A_n$ is nonempty, then $f(A_n) = A_{n+1}$ is nonempty.

*$\color{red}{\forall n, A_n \text{ is closed}}$: $A_0 = X$ is closed in $X$. Assume $A_n$ is closed in $X$; since $X$ is compact Hausdorff, $A_n$ is compact too, so $f(A_n) = A_{n+1}$ is compact and thus closed.


Once you've proven all that, then you can apply the theorem to show that $A = \bigcap_n A_n \neq \emptyset$. Next you want to prove that $f(A) = A$:


*

*$\color{red}{f(A) \subset A}$: Let $x \in A$, then $\forall n, x \in A_n \Rightarrow f(x) \in f(A_n) = A_{n+1}$. Therefore $\forall n, f(x) \in A_n$ and therefore $f(x) \in A$.

*$\color{red}{A \subset f(A)}$: Let $x \in A$, you want $y \in A$ such that $f(y) = x$. But $x \in A_{n+1}$ for all $n$, so there exists $y_n \in A_n$ such that $f(y_n) = x$. This sequence $y_n$ has a convergent subsequence...

A: Let $Y=f(X)$ then $X= \mathop{\cup}_{y  \in Y} f^{-1}(y)$ where the union is over disjoint sets. Since each of the pullback is a closed set. Being in a normal space, $\forall \ f^{-1}(y), \  \exists \  U_{y}$ open in $X$ such that  $f^{-1}(y) \subset U_{y} \subset \overline{U_{y}} \subset X$ .
Hence $X = \bigcup_{y \in Y} U_{y} $. 
This open cover has a finite subcover. $X=U_{1} \cup U_{2} \cup \ldots \cup U_{n} $.
Let $\Sigma = \lbrace A \  \ \vert A \subset X \rbrace$, suppose $\nexists$ any $A \in \Sigma$ st $f(A) =A$ then $\forall A \in \Sigma , \ \exists \ f (x)_{A} $ st $f (x)_{A} \notin A$.
define partial order on $\Sigma$ by set inclusion so that it becomes a directed set. 
Let $\ell \colon \Sigma \to X$ be a net such that $\ell(A) = f(x)_{A} $. For simplicity let us represent it the net by $(f(x)_{A})$.
Since $X$ is compact,every net has a cluster point,call the cluster point of the above net as $p$. 
Since $p \in X=U_{1} \cup \ldots \cup U_{n} $, we may assume $p \in U_{1} $.
Let $U_{1}$ be the neighbourhood of $p$ and $A=   U_{1}$ then $\exists  \ B \in \Sigma $  such that $ A \subset B $ and $f(x)_{B} \in U_{1}$. But $f(x)_{B} \notin B \Rightarrow f(x)_{B} \notin A=U_{1}$. 
This is a contradiction. $\square$
