[step:Use reflection and condensation to prove Replacement]
Let $a\in L$, let $p_1,\dots,p_n\in L$, and suppose that a formula $\varphi(x,y,p_1,\dots,p_n)$ defines a function on $a$ inside $(L,\in)$; that is, for every $x\in a$ there is a unique $y\in L$ such that
\begin{align*}
(L,\in)\models \varphi(x,y,p_1,\dots,p_n).
\end{align*}
We must prove that the image set
\begin{align*}
b=\{y\in L:\exists x\in a\,(L,\in)\models \varphi(x,y,p_1,\dots,p_n)\}
\end{align*}
belongs to $L$.
Apply the following standard bounded-image theorem, proved from the [finite reflection theorem for $L$](/page/Reflection%20Principle) and the [Condensation Lemma for $L$](/page/Condensation%20Lemma): if $a,p_1,\dots,p_n\in L$ and a formula $\varphi(x,y,p_1,\dots,p_n)$ defines a single-valued class function on $a$ over $(L,\in)$, then there is an ordinal $\beta$ such that every value of that function belongs to $L_\beta$. The hypotheses are exactly the displayed uniqueness assumption and the fact that $a,p_1,\dots,p_n$ are sets in $L$. This is a substantial reflection-and-condensation theorem supplying a uniform rank bound for all values at once.
This bounded-image theorem is imported here as a prior metatheorem. It is a uniform condensation theorem, not a choice of a new reflected level for each individual $x$. More precisely, after fixing the finite list of formulas expressing existence and uniqueness for $\varphi$, reflection supplies constructible levels in which that finite fragment is absolute for the parameters $a,p_1,\dots,p_n$ and elements of $a$. The associated canonical Skolem functions are fixed for that finite fragment. Taking Skolem hulls generated by finite tuples from the set $a\cup\{a,p_1,\dots,p_n\}$ gives a set-indexed family of hulls. For each hull in this family, let $\eta$ denote the ordinal height of its transitive collapse; by the [Mostowski collapse](/page/Mostowski%20Collapse) and condensation, that collapse is the initial segment $L_\eta$. Since the indexing data are set-sized, the collection of these ordinals $\eta$ is bounded by a single ordinal. The uniqueness clause ensures that each value $y$ of the class function appears in one of those collapsed initial segments, so all values lie in one common $L_\beta$.
Choose the resulting ordinal $\beta$. Then every value $y$ satisfying $\varphi(x,y,p_1,\dots,p_n)$ for some $x\in a$ lies in $L_\beta$, so
\begin{align*}
b=\{y\in L_\beta:\exists x\in a\,(L,\in)\models \varphi(x,y,p_1,\dots,p_n)\}.
\end{align*}
Choose an ordinal $\alpha$ such that $a,p_1,\dots,p_n\in L_\alpha$. By the [finite reflection theorem for $L$](/page/Reflection%20Principle) applied to the finite set consisting of $\varphi$ and its relevant subformulas, choose an ordinal $\delta$ such that $\alpha<\delta$, $\beta<\delta$, and truth of $\varphi(x,y,p_1,\dots,p_n)$ for all $x\in a$ and all $y\in L_\beta$ is equivalent in $(L,\in)$ and $(L_\delta,\in)$. Then $a,p_1,\dots,p_n,L_\beta\in L_\delta$: the original parameters are in $L_\delta$ by monotonicity, and $L_\beta\in L_{\beta+1}\subseteq L_\delta$ because $\beta<\delta$. Since $L_\delta$ is set-sized, satisfaction for this finite list of formulas is definable by recursion on formula complexity. Hence $b$ is definable over $L_\delta$ from parameters $a,p_1,\dots,p_n,L_\beta$, and so $b\in L_{\delta+1}\subset L$. Thus $(L,\in)$ satisfies Replacement.
[/step]