While reading Topology: An Introduction to the Point-Set and Algebraic Areas (1995) of Donald.W.Kahn, I found a sentence I cannot understand. It may be good to quote the whole paragraph for the context. (p.119~120)
I contend that in forming a quotient space $D_1/\sim$, it suffices to consider a subspace $D_0\subseteq D_1$ which contains at least one point in each equivalence class. For we may define a map $$h:D_0/\sim \ \to \ D_1/\sim$$ by sending each class in $D_0$ into the class to which it belongs in the bigger $D_1$. Since $D_0$ contains at least one element in every class, $h$ is immediately onto. $h$ is 1-1 because if two points are equivalent in $D_1$, and they both lie in $D_0$, then they are equivalent in $D_0$; in fact, it is the very same equivalence relation. This map is clearly continuous, so that it must be a homeomorphism (see Problem 11 after Theorem 4.2) when $D_1$ is compact.
Without too much difficulty I could understand that $h$ is bijective and continuous. What I don't understand is the last sentence, which claims that $h$ must be a homeomorphism if $D_1$ is compact. The problem to which the writer refers states that if $X$ is a compact space and $Y$ is a Hausdorff space, then any continuous $f$ from $X$ onto $Y$ is a closed map. To apply this result to show that $h$ is a closed map, we should show that $D_0/\sim$ is compact and $D_1/\sim$ is Hausdorff. But I didn't succeed with showing either of this, when the only given condition is $D_1$ being compact. Am I missing an obvious way to show these, or misunderstanding the purpose of the writer?
Thanks for any help in advance. (This is my first question on mathstackexchange, so please let me know if I am doing something wrong here.)