Set Theory: For a given set X, how can I collect all its recurring predecessors into a new set? Editing this question because it was ambiguous and I found an answer to it.
I'm attempting to construct a set that contains all the recurring predecessors of a given $X$.
Here's my definition of a recurring predecessor.
Let $S$ be a unary operation where $S(x) = x \cup \{x\}$. A recurring predecessor of $x$ is defined to be a unique $y$ that is equal to $x$ after finite applications of the successor operator. In other words,
$$y \text{ is a} \textit{ recurring predecessor} \text{ of } x \textbf{ iff } S(S( \cdots S(y) \cdots )) = x$$
Now, I want to collect all the predecessors of any given set $X$ into a new set $Y$.
Some examples:
if $X = \{\{\varnothing\}\}$, then $Y = \varnothing$, since $X$ isn't a successor of any set, and thus it has no predecessors.
if $X = \{\varnothing, \{\varnothing\}, \{\varnothing, \{\varnothing\}\}\}$, then $Y = X$, because all elements of $X$ after finite operations of $S$, are equal to $X$.
Question: For any given set $x$, how can I show the existence of a set $P_x$ such that $a \in P_x$ if and only if $a$ is a recurring predecessor of $x$?
 A: First, allow me to suggest the term "lineage" to denote the set of "recurring predecessors" (which sounds like an oxymoron, but let's go with it). Now. To the point.
Everything is clearer when you are more formally correct. For $y$ to be in the lineage of $x$ means that there is some $n<\omega$, such that $S^n(y)=x$.
Suddenly, when we discarded the dots, it is clear what is going on. The definition just writes itself. $$\operatorname{lineage}(x)=\{y\mid\exists n<\omega, S^n(y)=x\}.$$
Applying suitable Replacement axioms, or if you prefer, we can bound it in some transitive closure (which itself requires a mild Replacement axiom) and only apply Separation, we get that this is a set.
Job well done, case well closed. Right? Well. Not quite. There are two questions we need to ask now.

*

*What if $\omega$ is not the same as "the real $\omega$"? Namely, the universe contains non-standard integers, relative to its meta-theory.


*What does it really mean to say $S^n(y)$?
Well, the answers to both are kind of intertwined. If you are only interested in meta-theoretic iterations, then you are out of luck. While it's true that things we can "more or less write down" will have only a (meta-)finite number of recurring predecessors (things like $4$ in its von Neumann definition), if we take a non-standard integer $\tilde n$, and we start applying the predecessor function, we will never, ever, ever reach the standard part of the integers, we will always be trapped inside the $\Bbb Z$-chain defined by $\tilde n$.
Even worse, since in that case, being able to define, internally, the lineage of $\tilde n$, using the meta-theoretic definition, will expose the non-standard nature of the universe and violate numerous axioms of $\sf ZF$.
So, the definition can only exist in the same context as your recurrence. If external, that's fine; if internal, that's fine. But in either case you need to match the two.
Finally, what does $S^n(y)$ mean? Well, again, formally speaking, what we are saying is that "there is a sequence of length $n$, such that its first element is $y$, and its $(i+1)$th element is the successor of its $i$th element."
