How is it possible to define a recursive function call in set theory? Let the function $ f : X \rightarrow X $ and a variable $ x \in X $
I would like to define a set, which contains the values, which can be constructed from consecutive calls of $f$ on $x$. I did it like this:
$$
S = \{ x, f(x), f(f(x)), f(f(f(x))), \dots \}
$$
How could this set be defined more elegantly? ( without the dots )
I would like to avoid using this upper index notation also, if possible: $ \{ f^0(x), f^1(x), f^2(x), \dots \} $
 A: My interpretation of the question is that you are looking for a way to express this with a notation that doesn't involve the ellipsis? One way is to write
$$
S = \cap \{ T \, | \, x \in T \, \wedge \, \forall y \in T \, (f(y) \in T)     \}
$$
If you're planning to do this for several different $x$ and maybe several different $f$, then it might make sense to define an $f$-closure operation on sets, i.e.
$$
\mathrm{cl}_f (E) := \cap \{ T \, | \, E \subseteq T \, \wedge \, \forall y \in T \, (f(y) \in T)     \}
$$
You could then write $S = \mathrm{cl}_f (\{ x\})$.
A: That would be done with the recursion theorem (or at least that's one way to find that set, I don´t know if you're trying to find the exact property that defines it).
Let $X$ be a non-empty set, $x_0\in X$ and $f\colon X\to X$ a function. Then, we define a function:$$ G\colon X\times\mathbb{N}\to X $$ such that $G(x,n)=f(x)$. According to the recursion theorem, there exists a unique function $F\colon\mathbb{N}\to X$ such that $F(0)=x_0$ and for all $n\in\mathbb{N}$, $F(S(n))=G(F(n),n)=f(F(n))$.
Let's find the first couple values of the function. $F(0)=x_0$, $F(1)=F(S(0))=f(F(0))=f(x_0)$, and $F(2)=f(F(1))=f(f(x_0))$ and so on. So the set you're looking for is, in fact, the image of this function, $F[\mathbb{N}]$. (I hope it is clear)
I'm not exactly sure if this is what you were looking for, but hopefully it helps :). Greetings.
