If every neighbourhood of a point is dense, every continuous map to a Hausdorff space is constant

See it in Lean

Axioms
ZFC only
Concerns
Hausdorff, Strongly connected

Statement

Let \(X\) be a space with a point \(x\) every neighbourhood of which is dense in \(X\), and let \(Y\) be a Hausdorff space. Then every continuous map \(f \colon X \to Y\) is constant: \(f(y) = f(x)\) for every \(y \in X\).

Proof

Suppose that \(f(y) \ne f(x)\), and let \(U\) and \(V\) be disjoint open subsets of \(Y\) with \(f(y) \in U\) and \(f(x) \in V\). Then \(f^{-1}(V)\) is an open set containing \(x\), so it is dense, and \(f^{-1}(U)\) is a nonempty open set, since it contains \(y\). So they meet, at a point \(z\) with \(f(z) \in U \cap V\), which is impossible. \(\blacksquare\)

Where it is used

Cited on space pages