Is the infinite combination of a continuous function, a continuous function? Let $(X,\mathcal T)$ be a topological space and $f:X\to X $ be a continuous function. Let
$$f^1=f$$
and for each $n\in \Bbb N $,
$$f^{n+1}=f^n\circ f$$
Let
$$R=\bigcup _{n\in \Bbb N}f^n$$


*

*Is $R$ a function?

*Let $R$ be a function, is it continuous?

 A: If there is $x\in X$ such that $x\neq f(x)\neq f^2(x)$ then $R$ cannot be a function at all. To see this note that $\langle x,f(x)\rangle$ and $\langle x,f^2(x)\rangle$ are both in $R$, so it is not a function.
On the other hand, if for every $x\in X$ we have that $f(x)=f^2(x)$ then $R=f$ itself. If $f$ is continuous then obviously $R$ is continuous as well.
However even if $R$ is not a function, there is a meaningful interpretation to the question whether or not $R$ is continuous. Given an open set $U$ one can still ask whether or not $R^{-1}(U)=\{x\in X\mid\exists y\in U:\langle x,y\rangle\in R\}$ is open.
And indeed $R$ is continuous, if $U$ is open, then for every $n$ we have that $f^n$ is continuous, and therefore $(f^n)^{-1}(U)$ is open. Now I claim that $R^{-1}(U)=\bigcup_{n\in\Bbb N}(f^n)^{-1}(U)$. This is true because,
$$\begin{align}
x\in R^{-1}(U)&\iff\exists y\in U:\langle x,y\rangle\in R\\&\iff\exists n\in\Bbb N\exists y\in U:\langle x,y\rangle\in f^n\\&\iff\exists n\in\Bbb N:x\in(f^n)^{-1}(U)\\&\iff x\in\bigcup_{n\in\Bbb N}(f^n)^{-1}(U).\end{align}$$
