Define $F(x,f,p)$ to be the smallest ordinal not in the range of $f$ (so the variables $x$ and $p$ are just dummy variables, to match the notation in the question). Suppose there exists a solution $f$ of the recursion $f(x)=F(x,f|X_x,p)$. Then $f$ embeds $X$ (with its given ordering) strictly monotonically into the ordinals (with their standard well-ordering). It follows that the given ordering of $X$ is a well-ordering.
Andreas Blass
- 73.1k
- 8
- 191
- 290