TITLE: Countable compact spaces as ordinals
QUESTION [23 upvotes]: I heard at some point (without seeing a proof) that every countable, compact space $X$ is homeomorphic to a countable successor ordinal with the usual order topology. Is this true? Perhaps someone can offer a sketch of the proof or suggest a topology/ordinal text which treats countable spaces in depth. I also wonder if these spaces are metrizable or if they can be embedded into $\mathbb{R}$.
By the way, I'm assuming $X$ is Tychonoff but perhaps this can be reduced to a weaker separation axiom.
Edit: Just to clarify and avoid erroneous future editing,"countable compact space" means "compact space, whose underlying set is countable." This is different from "countably compact space."

REPLY [4 votes]: Call a topological space good if it's homeomorphic to a compact ordinal.
Lemma 1. Every countable compact Hausdorff space is first countable, zero-dimensional, and scattered.
Proof. These are well-known facts.
Lemma 2. A closed subspace of a good space is good.
Proof. This follows from the fact that a closed subspace of an ordinal is homeomorphic to an ordinal.
Lemma 3. Let $S$ be a countable compact Hausdorff space. If each point of $S$ has a good clopen neighborhood, then $S$ is good.
Proof. By compactness, $S$ is covered by finitely many good clopen sets, which (by Lemma 2) can be made disjoint. Thus $S$ is the union of finitely many disjoint clopen sets $X_1,\dots, X_n$, where each $X_i$ is homeomorphic to a compact ordinal $\alpha_i$. It follows that $S$ is homeomorphic to the compact ordinal $\alpha=\alpha_1+\dots+\alpha_n$. (This is because $S$ is the topological sum of the $X_i$'s, and $\alpha$ is the topological sum of disjoint clopen subsets $A_i$, where $A_i$ is homeomorphic to the ordinal $\alpha_i$ and thus to $X_i$.)
Theorem. Every countable compact Hausdorff space is homeomorphic to an ordinal.
Proof. Let $S$ be a countable compact Hausdorff space. Assume for a contradiction that $S$ is not good. Let $X$ be the set of all points of $S$ which have no good clopen neighborhood. By Lemma 3, $X$ is nonempty. Since $S$ is scattered, $X$ has an isolated point $x$. (Of course, $x$ is not isolated in $S$, since $\{x\}$ would then be a good clopen neighborhood of $x$.)
Let $U_1$ be a clopen neighborhood of $x$ such that $U_1\cap X=\{x\}$. Note that, by Lemmas 2 and 3, every clopen subset of $U_1$ which does not contain $x$ is good.
Let $U_1,U_2,\dots,U_n,\dots$ be a neighborhood base for $x$ such that each $U_n$ is clopen and properly contains $U_{n+1}$. Then the (nonempty) set $V_n=U_n\setminus U_{n+1}$ is a good clopen set, whence it is homeomorphic to a compact ordinal $\alpha_n$. It follows that the set $U_1\setminus X=V_1\cup V_2\cup\dots\cup V_n\cup\dots$, which is the topological sum of the $V_n$'s, is homeomorphic to the limit ordinal $\alpha=\alpha_1+\alpha_2+\dots+\alpha_n+\dots$. Hence $U_1$, the one-point compactification of $U_1\setminus\{x\}$, is homeomorphic to the ordinal $\alpha+1$, the one-point compactification of $\alpha$. Thus $U_1$ is a good clopen neighborhood of $x$, which was assumed to have no good clopen neighborhood. This contradiction proves the theorem.