Is there some n-iterative union guaranteed for each subset of an element in a countable transitive model of $\sf ZF$? Is the following a theorem of $\sf ZF$?
If $M$ is a countable transitive model of $\sf ZF$, then for each subset $X$ of an element of $M$ there is a natural number $n$ such that $\bigcup^n X \in M$?
Where $\bigcup^n$ is the $n$-iterative union operator, defined as usual as:
$\bigcup^0 X = X \\ \bigcup^{n+1} X = \bigcup (\bigcup^n X)$
 A: For each $n,m<\omega$, define recursively
$$f^0(n)=n,\quad f^{m+1}(n) = \{f^m(n)\}.$$
This definition works over $\mathsf{ZF}$ (and in fact, over $\mathsf{KP}\omega$.) Furthermore, $f$ is $\Delta_1$-definable.
Now let $M$ be a transitive model of $\mathsf{ZF}$, then $\omega,f\in M$. Pick any subset $A\subseteq \omega\setminus\{0,1\}$ that is not in $M$. Then $A$ must be infinite, so $\bigcup A=\omega$. Now consider
$$B=\bigcup_{m<\omega} \{f^m(n)\mid n\in A\}.$$
Then we can see that
$${\textstyle\bigcup}^kB = \omega\cup \bigcup_{1\le m<\omega}\{f^m(n)\mid n\in A\}.$$
for $k\ge 1$.
You can see that $B$ is a subset of $\{f^m(n)\mid m,n<\omega\}$, which is an element of $M$. However, if $\bigcup^k B$ is an element of $M$, then we can recover $A$ in $M$ from $B$ by looking $B\cap \{\{n\}\mid n<\omega\}$.
By the same argument, we can see that if $M$ is a countable transitive model of $\mathsf{KP\omega}$ then there is a subset $B$ of an element of $M$ such that $\bigcup^n B$ is not always a member of $M$, whatever $n$ is.
