Ordinal Equal to Rank

Theorem
Let $x$ be an ordinal.

Let $S$ be a small class.

Let $V \left({ x }\right)$ denote the von Neumann hierarchy on the ordinal $x$.

Then $x$ equals the rank of $S$ iff $S \in V \left({x+1}\right) \land S \notin V \left({x}\right)$.

Sufficient Condition
Suppose that $x$ is equal to the rank of $S$.

Then $S \in V \left({x+1}\right)$ by the definition of rank.

Suppose $S \in V \left({x}\right)$. Then $x \ne 0$, so $x = y^+$ for some ordinal $y$ or $x$ is a limit ordinal.

Suppose $x = y^+$.

Then, $S \in V \left({y+1}\right)$.

This contradicts the fact that the rank is the smallest set $x$ such that $S \in V\left({x+1}\right)$.

Suppose $x$ is a limit ordinal.

Then, $S \in V \left({y}\right)$ for some $y$, so $S \in V \left({y+1}\right)$ and $y+1 < x$.

This contradicts the fact that the rank is the smallest set $x$ such that $S \in V \left({x+1}\right)$.

Therefore, $S \notin V \left({x}\right)$.

Necessary Condition
Suppose $S \notin V \left({x}\right)$ and $S \in V \left({x+1}\right)$.

Then, if $y < x$, then $S \notin V \left({y+1}\right)$ by Von Neumann Hierarchy Comparison.

If $x < y$, then $S \in V\left({y}\right)$.

Therefore, $x$ is the unique ordinal that satisfies $S \notin V \left({x}\right)$ and $S \in V \left({x+1}\right)$.

Moreover, the rank of $S$ also satisfies $S \notin V \left({x}\right)$ and $S \in V \left({x+1}\right)$.

Therefore, $x = \operatorname{rank} \left({S}\right)$.