Relating the rank function and the Mostowski collapsing function I've been reading about the rank function in Kunen's newest Set Theory book. At this point in the text, he mentions the Mostowski collapsing function, and he provides an exercise to relate the two functions:

Suppose $R$ is well-founded and set-like on $A$, and that $R$ is a transitive relation on $A$. Then mos$_{A,R}(a) = \mbox{rank}_{A, R}(a)$ for all $a \in A$.

Here are definitions that go with this problem (assuming $R$ is well-founded and set-like on $A$). For $b \in A$:
rank$_{A, R}(b) = \sup \{\mbox{rank}(a) + 1 : a \in A \wedge aRb\}$,
mos$_{A, R}(b) = \{\mbox{mos}(a) : a \in \downarrow\!\! b\}$,
$\downarrow\!\! b = \{c \in A : cRb\}$.
I'm guessing this will be down with some sort of induction since we want to show it holds for all $a \in A$, but I'm not sure how I would go about showing this. If induction is used, then I guess our base case would follow from picking an $R$-minimal element. Then, the rank and collapse of that element would both be $0$.
I would appreciate any help with this one. Thanks in advance!
 A: Since $A$ and $R$ are fixed, I’ll drop the subscripts on $\mbox{mos}$. 
Suppose that $x\in A$ and $z\in y\in\mbox{mos}(x)$. Then $y=\mbox{mos}(u)$ for some $u\in\downarrow\!\!x$, so $z\in\mbox{mos}(u)$, and $z=\mbox{mos}(v)$ for some $v\in\downarrow\!\!u$. $R$ is transitive, so $v\in\downarrow\!\!x$, and therefore $z\in\mbox{mos}(x)$. Thus, $\mbox{mos}(x)$ is transitive. Now suppose that $\mbox{mos}(y)\in\mathbf{ON}$ for each $y\in\downarrow\!\!x$. Then $\mbox{mos}(x)$ is a transitive set of ordinals, so $x\in\mathbf{ON}$, and by induction $\mbox{mos}(x)\in\mathbf{ON}$ for all $x\in A$. This implies that if $\alpha$ is an ordinal less than $\mbox{mos}(x)$, there is a $y\in\downarrow\!\!x$ such that $\mbox{mos}(y)=\alpha$, so $\mbox{mos}(x)=\{\alpha\in\mathbf{ON}:\alpha<\mbox{mos}(x)\}$.
Can you finish it from there? Assume the result for all $y\in\downarrow\!\!x$ and calculate $\mbox{rank}_{A,R}(x)$ to show that it’s $\mbox{mos}(x)$. I’ve written out the calculation in the spoiler-protected box below in case you get completely stuck.

 $$\mbox{rank}_{A,R}(x)\\=\sup\{\mbox{rank}_{A,R}(y)+1:y\in\downarrow\!\!x\}\\=\sup\{\mbox{mos}(y)+1:y\in\downarrow\!\!x\}\\=\sup\{\alpha+1:\alpha\in\mathbf{ON}\land\alpha<\mbox{mos}(x)\}\\=\mbox{mos}(x)$$

