Let $f\in C([0,1],[0,1])$ be such that:
$$\forall x\in [0,1], \; \exists k\in \mathbb N, \; f^{\circ k}(x)=0.$$


Is it true that $f$ is nilpotent (i.e., that there is some $k$ such that $f^{\circ k}=0$)?


Here $f^{\circ k}$ denotes the $k$th iterate of $f$.



Does locally nilpotent imply nilpotent for continuous self-maps of intervals?
Yes, this implies that $f$ is nilpotent.


As explained in my comment, $f(0)=0$ because otherwise Sarkovski's theorem would give us other periodic orbits which, of course, won't visit $x=0$. We also know that $f(x)<x$ for $x>0$.


Decompose the open set $\{x: f(x)>0\}=\bigcup I\_n$ into its connected components. Clearly, since each set $[0,a]$ is invariant, the zeros of $f$ must accumulate at $0$. On the other hand, I claim that the $I\_n$ do not accumulate at $x=0$.


Indeed, if they did, we could start out with any $I\_0$ and then $f(\overline{I\_0})=[0,b\_0]$ for some $b\_0>0$. By assumption, $I\_1\subseteq [0,b\_0]$ for some $I\_1$. Let $K\_1=\{x\in \overline{I\_0}: f(x)\in \overline{I\_1}\}$. Since $0\notin\overline{I\_n}$ for all $n$, the orbit of any $x\in K\_1$ will not yet have reached zero after one iteration.


Continue in this style: $f(\overline{I\_1})=[0,b\_1]\supseteq I\_2$ for some $I\_2$. Let $K\_2 =\{x\in K\_1: f^2(x)\in \overline{I\_2}\}$. The compact sets $K\_n$ are nested, so $\bigcap K\_n\not=\emptyset$, but if $x\in K\_n$, then $f^k(x)\not= 0$ for $k\le n$, so this point never reaches zero.


It follows that $f=0$ on $[0,d]$ for some $d>0$, but then everything is clear because now $f(x)\le x-\delta$ for some fixed $\delta>0$ for $x\ge d$, and each iteration brings us closer to the set $[0,d]$ by at least $\delta$.


