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

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?

• What did you try? At least for finite case, it's still Uryshon lemma... Jul 20 at 8:04
• @ArcticChar, How about the infinite case? Can we still use Uryshon lemma? Jul 20 at 8:08
• Well, what do you think? Take a look at the statement of the lemma. Jul 20 at 8:10

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.

• In the countable case, $f(x_i) = i$ for all $i$ is not possible since $f$ has to be bounded. Jul 20 at 9:50
• Yes, I explicitly said this argument only works for finite $A$. The countable case might be rather subtle, as it's not unreasonable to expect every countable subset of (say) $S^1$ can be separated by a real function. But I'm not sure. Jul 20 at 9:52
• I mean, if the OP's question is: given a countably infinite subset $\{x_i\}$ of $X$, can we find $f$ such that $f(x_i) = i$? Then the answer is no, instead of not sure. Jul 20 at 9:55
• Right, but I feel that parenthetical from the OP was just poorly thought through and not important. Jul 20 at 9:59
• Ok, that's fair. To be honest, now that the OP has accepted another answer, I am not really sure what kind of question the OP has in mind. Jul 20 at 10:00

If $$X$$ is compact, then every injective continuous map from $$X$$ into $$\Bbb R$$ is a homeomorphism from $$X$$ onto $$f(X)$$. So, if it turns out that $$X$$ is not homeomorphic to a subspace of $$\Bbb R$$ (such as when $$X=S^1$$), then the answer is negative.

In the finite case, it is true, by Urysohn's lemma, as you were told in the comments.

• "every continuous map from $X$ into $\mathbb{R}$ is a homeomorphism" you are confusing me Jul 20 at 8:38
• I guess you want injectivity of the continuous map? Even with that, it's not clear how this answers the question: that $f$ is injective when restricted to the points $\{x_i\}$ does not mean that $f$ itself is injective. Jul 20 at 8:40
• Also, of course one cannot have $f(x_i) = i$ by compactness, but there are definitely cases where one can find continuous map so that $\{f(x_i)\}$ are all distinct. Jul 20 at 8:43
• The op said nothing about the function needing to be injective... Jul 20 at 8:54
• That is, the op is asking if the set $\{x_1, \ldots, x_n\mid x_i\in X\}$ can be separated by a continuous function as long as X is compact Hausdorff Jul 20 at 9:06