Q:

Let $f:[a,b] \rightarrow [a,b]$ be a continuous function.  Define $p_0 = p \in [a,b]$ and $p_{n+1} = f(p_n)$ prove that

Let $f:[a,b] \rightarrow [a,b]$ be a continuous function.  Define $p_0 = p \in [a,b]$ and $p_{n+1} = f(p_n)$ and let the set $K_p := \{p_n, n\geq 0\}$ be a closed set.  Prove that $K_p$ is finite. 
My attempt:
Either all elements of $K_p$ are isolated which would mean we could build a monotone sequence $a_n$ with all elements of $K_p$.
$a_n$ is clearly bounded as it lies in $[a,b]$ so it must converge to a limit $L$.
Because $K_p$ is closed $L \in K_p$ but a monotone sequence can only converge to a member of itself if $a_n = L, \forall n \geq n_0$ which would mean $K_p$ is finite. 
Or $K_p$ has at least one acumulation point $x_0$. So we can take a sequence of $K_p$ converging to $x_0$ this would mean $\lim_{n \rightarrow \infty} a_n = x_0$ but because $f$ is continuous $\lim_{n \rightarrow \infty} f(a_n) = f(x_0) \iff \lim_{n \rightarrow \infty} a_{"n+1"} = f(x_0) = x_0$.
So all acumulation points of $K_p$ are fixed points but I can't finish the proof (that this would mean $K_p$ is finite).  Actually this last paragraph got a little messy. 

A:

Consider $L_n=f^n(K_p)$, since $f$ is continuous, $L_n$ is compact, remark that $L_{n+1}\subset L_n$, we have $\cap_nL_n$ is not empty it contains $x\in K_p$ implies that $x=f^N(p)$. $x$ is an element of $L_{N+1}$ implies that $x=f^N(p)=f^{N+m}(p)$ implies that $K_p$ is finite.