# Finding a topology doesn't convey Hausdorff property by an injective continuous function

Is there a topology on $\mathbb{R}$ that for which , set $A=(0,1)$ be Hausdorff and $B=[0,1]$ not to be Hausdorff with subspace topology and there exist an injective continuous function $f:A \to B$ ?

Yes. Consider the topology $\tau$ whose elements are the open subsets of $(0,1)$ (with respect to the usual topology) and the unions of an open subset of $(0,1)$ (again, with respect to the usual topology) with $\mathbb{R}\setminus(0,1)$. Then $(0,1)$, as a subspace of $(\mathbb{R},\tau)$, has its usual topology and therefore it is Hausdorff. But $[0,1]$ isn't, since every open set which contains $0$ also contains $1$ (and vice-versa).
Now, let $f\colon A\longrightarrow B$ be the function defined by $f(x)=x$. It is injective and continuous.
• No. None of them is an open set in $[0,1]$ with the subspace topology. Keep in mind that every element of $\tau$ to which $0$ belongs also contains $1$ and vice-versa. – José Carlos Santos Jun 12 '18 at 23:02
• What do you mean by $(a,b)\in(0,1)$? Did you mean $(a,b)\subset(0,1)$? – José Carlos Santos Jun 12 '18 at 23:56
• I cannot edit comments made by others! Anyway, I don't undersatand your problem. Do you claim that $\tau$ is not closed with respect to arbitrary unions? Or that it is not closed with respect to finite intersections? – José Carlos Santos Jun 13 '18 at 0:02
• @MasM If $A_1,A_2\in\tau$, then each of them is either an open subset of $(0,1)$ (with respect to the usual topology) or the union of an open subset of $(0,1)$ with $\mathbb{R}\setminus(0,1)$ and in each case $A_1\cap A_2\in\tau$. Do you think you can provide a counterexample? Do it! – José Carlos Santos Jun 13 '18 at 0:11