Hi there i need help with verifying if my proof is sound:
Let $f:X \rightarrow Y$ be a morphism of the category of Hausdorff topological spaces. Prove that $f$ is a epimorphism iff $f$ is a continuous map whose image is dense.
Proof: Recall that to show what morphisms are epimorphims we need to show for what conditions for $f:X \rightarrow Y$ we have for any parallel morphisms $h_1,h_2:Y\rightarrow Z$ with $h_1\circ f=h_2\circ f$ implies that $h_1=h_2$.
$"\Rightarrow"$: Let $f:X \rightarrow Y$ be a morphism where $X,Y \in \text{Ob}(\text{HausTop} )$. By way of contradiction assume that $f$ is not continuous map whose image is dense, i.e. $Y\not = \overline{\text{Im}f}$. Now we construct two parallel morphisms $h_1,h_2:Y\rightarrow Z$ with $Z=\{0,1\}$ equipped with the discrete topology and defined by $$h_1(y)=0 \,\,\, \forall y\in Y, \qquad h_2(y)= \begin{cases} 0 & y\in \overline{\text{Im }f} \\ 1 & y\not\in \overline{\text{Im }f} \end{cases}$$ Then we have $h_1\circ f=h_2\circ f$ but $h_1\not = h_2$, which contradicts the definition of epimorphism. Therefore $Y = \overline{\text{Im }f}$ must be true.
This doesn't work because $h_2$ will usually not be continuous: $h_2^{-1}(\{0\})$ is probably not open.
Instead, you will have to do some real work to construct the space $Z$ you want to use. Hidden below is some discussion about how to think about a question like this.