# Necessity of Hausdorff-ness in "continuous function determined by its values on a dense subset"

It's well-known that if a continuous function taking values in a Hausdorff space is uniquely determined by its specification on a dense subset of the domain. Now, I contemplate on the necessity of Hausdorff-ness in this result:

It's clear that the result no longer holds if the codomain is just $$T_0$$, as is demonstrated by the function $$\mathbb R$$ to the Sierpiński space $$\{0, 1\}$$ (with $$1$$ being the Sierpiński point) given by $$x\mapsto 0$$ if $$x\ne 0$$ and $$x\mapsto 1$$ if $$x = 0$$. (Thus this and the constant $$0$$ function are both continuous despite agreeing on the dense $$\mathbb R\setminus \{0\}$$.)

Now, I am trying to come up with an similar example where the codomain is $$T_1$$ (and not Hausdorff ofc), but haven't been able to conjure anything up yet. You know anything? The only examples of $$T_1$$ spaces fmailiar to me are the co-finite/-countable spaces.

• Hello. Are you aware that $X$ being Hausdorff is equivalent to $\{y \in Y: f(y) = g(y)\}$ being closed for all topological spaces $Y$ and functions $f, g: Y \to X$? This is usually proved via the also equivalent condition "the diagonal $\{(x, x) : x \in X\}$ is closed in $X^2$". I'm struggling a bit to find a good link to a proof of that at the moment, but it answers your question very strongly - if $X$ is not Hausdorff, you can find $f$ and $g$ which agree on a non-closed set. In particular, that set is dense in its closure but $f$ and $g$ do not agree on the closure! Feb 22 at 15:00
• I've found some links now. You can piece it together from here and here. It's also mentioned here. When you piece it together, what you end up with is "if $X$ is not Hausdorff, then the two projection maps $\pi_1, \pi_2 : X \times X \to X$ agree on the diagonal $\Delta \subseteq X \times X$, but not on its closure". I'm not sure if this is close enough to count as a duplicate or not. Feb 22 at 15:14
• @IzaakvanDongen Thanks tons for your responses! But I think I have found a simple example: Any bijection on $\mathbb R$ is continuous with the codomain being taken under cofinite topology. Now, just consider the identity function with two points swapped. What do you think?
– Atom
Feb 22 at 15:55
• @Atom Looks good to me, with the dense subset taken to be $\Bbb R\setminus\{a,b\}$ where $a,b$ are the swapped points Feb 22 at 16:10
• @FShrike Great, I will post as an answer then
– Atom
Feb 22 at 16:38

Any bijection on $$\mathbb R$$ is continuous with the codomain taken under cofinite topology. Now, just consider the identity function with two distinct points, $$a$$ and $$b$$, swapped. Then this and the identity function are continuous functions agreeing on the dense subset $$\mathbb R\setminus\{a, b\}$$ and yet distinct.