# How to prove that initial arrows in Haus coincide with topological embeddings?

In Joy of Cats it is stated that in category $\textbf{Haus}$ initial arrows coincide with topological embeddings (pg 135). This can be proved by showing that initial arrows in $\textbf{Haus}$ are injective. In an effort to do so I reasoned for an initial $f:X\rightarrow Y$ in $\textbf{Haus}$ that $f\left(u\right)=f\left(v\right)$ would imply that no open set exists in $X$ containing exactly one of the elements $u,v$ (and consequently $u=v$, since $X$ is Hausdorff). This reasoning however was based on the thought that open sets in $X$ would be preimages of open sets in $Y$. This is true if $f$ is initial in $\textbf{Top}$ but fails to be true in $\textbf{Haus}$. If $X$ is indeed equipped with that topology then it does not have to be a Hausdorff space. What is the right way of proving that in $\textbf{Haus}$ initial arrows coincide with topological embeddings?

-

All we need is some non-discrete Hausdorff space $Z$. Fix such a $Z$ and an $A \subset Z$ that is non-open (which can be done, as it is non-discrete). E.g. $Z = \mathbb{R}, A = \mathbb{Q}$ (usual topology) for concreteness.
Now if $f: X \to Y$ is non-injective, as witnessed by $u,v \in X$ with $f(u) = f(v)$, then define $g$ as the function from $Z$ to $X$ that maps $A$ to $u$ and $Z \setminus A$ to $v$.
Note that this map is non-continuous if $X$ is Hausdorff (which it is, as we are in the category Haus): separate $u$ and $v$ by open sets $U$ and $V$ respectively, and $g^{-1}[U] = A$ which is not open.
But $g \circ f$ is a constant map (always continuous) so if $f$ is an initial arrow, it would follow that $g$ is continuous. Contradiction.
This shows that $f$ has to be injective.