Does compact Hausdorff space with many distinct points produces continuous real valued function

compactnesscontinuitygeneral-topology

In the previous posts, I ask the existence of a continuous real-valued function on compact Hausdorff space which gives two distinct points in $X$ gives different values.

Compact Hausdorff space with distinct points $x,y$ implies existence of continuous real function $f$

Now I want to extend this more than two points. For examples

Let $X$ be a compact Hausodrff space and $x_i \in X$ be distints points in $X$. Then is there a continuous function $f:X \rightarrow \mathbb{R}$ such that $f(x_i) \neq f(x_j)$? [Let simply just define $f(x_i) =i$]

It seems since $X$ is normal, $n=2$ two points are okay. How about $n=3, 4,? $ or infinitely many points?

Best Answer

For a finite set of points, this follows from the Tietze extension theorem because compact Hausdorff spaces are normal, in a Hausdorff space, any finite set of points forms a closed subset, and all functions from a discrete set (finite set of points in a Hausdorff space) are continuous. (You can also use Urysohn's lemma and induction to get this)

That is, for your finite subset $A = \{x_1 \ldots, x_n \mid x_i \in X\}$, let $f \colon A \to \mathbb{R}$ be given by $f(x_i) = i$. Then the Tietze extension theorem says there exists a continuous function $\tilde{f} \colon X \to \mathbb{R}$ such that $\tilde{f}(x_i) = f(x_i)$.

For infinite (say countable) subsets, I believe the statement of the result breaks down in full generality because you can't guarantee the set $A$ is closed, though I can't think of a countable counterexample at the moment.

Related Question