Prove that if $f: \mathbb{R} \rightarrow \mathbb{R}$ is a homeomorphism, then $f$ cannot have periodic points of primitive period $3$.
The proof was given as follows:
Suppose that we have a primitive period of $3$. Then either:
1) the interval $[x \quad f(x)]$ maps to $[f(x) \quad f^2(x)]$, and $[f(x) \quad f^2(x)]$ maps to $[x \quad f^2(x)]$, or
2) $[x \quad f^2(x)]$ maps to $[f^2(x) \quad f(x)]$, and $[f^2(x) \quad f(x)]$ maps to $[x \quad f(x)]$.
Assume either 1) $x < f(x) < f^2(x)$, or 2) $x < f^2(x) < f(x)$.
Then for 1), $I_1 = [x \quad f(x)]$ and $I_2 = [f(x) \quad f^2(x)]$ and so then $f(I_1) = I_2$ and $f(I_2) = I_1 \cup I_2$. By the intermediate value theorem, there exists a $k \in I_2$ such that $f(k) = f(x)$, but since $x \neq k$ and we have that $f(k) = f(x)$, this is a contradiction.
For 2), $I_1 = [x \quad f^2(x)]$ and $I_2 = [f^2(x) \quad f(x)]$. Then $f(I_1) = I_1 \cup I_2$. Then there exists a $k \in I_1$ such that $f(k) = f^2(x)$ but $f(k) = f(f(x)) = f^2(x)$ which is a contradiction to the assumption that the primitive period was $3$. Q.E.D.
I didn't understand anything about the proof, especially this "interval" business and how the intermediate value theorem is relevant at all.