Question:
Let $\phi:\mathbb{R}\to\mathbb{R}$ be continuous, satisfying:
$\lim\limits_{x\to+\infty}(\phi(x)-x)=+\infty$;
$\{x\in\mathbb{R}|\phi(x)=x\}$ is a non-empty,finite set.
Prove that if $f:\mathbb{R}\to\mathbb{R}$ is continuous and $f\circ\phi=f$,then $f$ is constant.
Attempt:
Set $x_0=\sup\{x\in\mathbb{R}|\phi(x)=x\}$,then $\phi(x_0)=x_0,\forall x>x_0,\phi(x)>x$. Let $f(x_0)=c.$
Suppose there exists $x_1>x_0$, such that $f(x_1)=d\neq c$.
Since $f\circ\phi=f$, we have by induction $f\circ\phi^n=f$.
Set $x_{n}=\phi^{n}(x_1)$, then $$x_{n+1}=\phi(x_n)>x_n,$$ $$x_{n+1}-x_n=\phi(x_n)-x_n\implies x_n\to+\infty,x_{n+1}-x_n\to+\infty,$$ so $$\{f(x_n)=f(x_1)=d\}_{n=1}^{+\infty}$$ is a subsequence of $\{f(x)\}$ goes to $d$ when $x\to+\infty$.
Since $f$ is continuous,this is true for any value between $c,d$ (domain in $(x_0,x_1)$). I wonder if this could lead to a contradiction.