The theorem that justifies transfinite induction on a class states the following:
Assume that $R$ is well-founded and set-like on $A$, and that $X$ is a non-empty sub-class of $A$. Then $X$ has an $R$-minimal element.
However, with the Axiom of Foundation, we can eliminate the requirement that $R$ must be set-like. My question is regarding a certain step in the proof of such. Here is what I have.
For $x \in X$, let $f(x) = \min\{\text{rank}(z): z\in X \wedge zRx\}.$ (Here $\text{rank}(z)$ is $\text{rank}_{V,\in}(z)$, this is where we need Foundation.) This function essentially corresponds each element $x \in X$ to the lowest rank of a set which is below $x$ in the relation $R$. This function exists because any class of ordinals has a minimal element. The goal is to find a subset of $X$ whose minimal element is also minimal in $X$. Suppose we can find a $\gamma$ such that $X \cap V_\gamma$ is non-empty and $\forall x \in X \cap V_\gamma [f(x) < \gamma]$.
Let $y$ be minimal in $X \cap V_\gamma.$ Then $f(y) = \emptyset$, for assume that $f(y) = \alpha$. Then by our definition of $f$, there is a $z \in X$ such that $zRy$ and $\text{rank}(z) = \alpha$. Then, because $\alpha < \gamma$ (by our choice of $\gamma$) we get $z \in X \cap V_\gamma$. But then $y$ is not minimal in $X \cap V_\gamma$ and thus $f(y) = \emptyset$. Therefore, there is no $z \in X \wedge xRy$ and $y$ is minimal in $X$.
My question is: how do we produce $\gamma$?
Start with any ordinal $\gamma_0$ such that $X\cap V_{\gamma_0}$ is nonempty. Recursively define $\gamma_{n+1}=\sup \{f(x):x\in X\cap V_{\gamma_n}\}+1$. This gives a sequence of ordinals $\gamma_n$ for each $n\in\omega$; let $\gamma$ be their supremum. Then any $x\in X\cap V_\gamma$ is in $V_{\gamma_n}$ for some $n$, and so $f(x)<\gamma_{n+1}\leq\gamma$ by definition.