I want to prove the following:
Let $\left(W,\leq\right)$ be a well-ordered set. If $W_{a}$ is order isomorphic to an ordinal for all $a\in W$, then $W$ is isomorphic to an ordinal.
Here $W_a$ is notation for the set $\left\{ x\in W:x<a\right\} $.
I have been through the proof and part of it involves the use of the Axiom of Replacement. For reference, here is the version of the Axiom of Replacement I am using:
For any two sets $x$ and $y$, let $P\left(x,y\right)$ be a sentence pertaining to $x$ and $y$ which can be expressed entirely in terms of the symbols $=$, $\in$, $\lnot$, $\land$, $\lor$, $\Rightarrow$, $\Leftrightarrow$, $\forall$, $\exists$ and variables which represent sets. Let $X$ be a set. Suppose that the following condition is satisfied: If $x$,$y$, and $z$ are sets such that $x\in X$ and the sentences $P\left(x,y\right)$ and $P\left(x,z\right)$ are true, then $y=z$. Then there exists a unique set $Y$ such that $y\in Y$ if and only if there exists a set $x\in X$ such that $P\left(x,y\right)$ is true.
First of all, is this version accurate? Am I stating the axiom properly?
This is how I use the axiom in the proof:
The result is obvious if $W$ is empty, so we will assume that $W$ is non-empty. For any two sets $a$ and $b$, let $P\left(a,b\right)$ be the sentence “$a\in W$, $b$ is an ordinal, and $W_{a}$ is order isomorphic to $b$”. If $a$, $b$, and $c$ are sets such that $a\in W$ and the sentences $P\left(a,b\right)$ and $P\left(a,c\right)$ are true, then $b$ and $c$ are order isomorphic. Since any two ordinals which are isomorphic are equal, we have $b=c$. The Axiom of Replacement then implies that there exists a unique set $Y$ such that $b\in Y$ if and only if there exists a set $a\in W$ such that $P\left(a,b\right)$ is true. Then $\left(Y,\leq\right)$ is a well-ordered set. Define a function $f:W\rightarrow Y$ as follows. Let $a\in W$. Then there exists a unique ordinal number $b$ such that $W_{a}$ is order isomorphic to $b$. As we have just seen, $b\in Y$. Set $f\left(a\right)=b$.
Did I use the Axiom of Replacement correctly in the above proof?
You have used the Axiom of Replacement correctly, but it looks like you still need to prove that $Y$ is itself an ordinal.
(As a matter of style, you could use some paragraph breaks, and you could define $f$ shorter as $f=\{\left<a,b\right>\in W\times Y\mid P(a,b)\}$ instead of repeating the entire description in words).