# Counterexample of path-connectedness "swapped" definition

Suppose $$(X, \tau_X )$$ is path-connected. Then is it true that there is a continuous function from $$(X, \tau_X )$$ to $$([0,1],τ_E)$$ with $$f(x) = 0$$ and $$f(y) = 1$$ ?

My answer is no, the counterexample I give is $$X=[0,1) \cup (1,2]$$, $$x=0$$ and $$y=\frac\pi2$$, so that $$f(z)=\sin(z)$$ satisfies $$f(0)=0$$ and $$f(\frac\pi2)=1$$ and $$f$$ is clearly continuous.

I guess there is a much easier counterexample, any ideas ?

• Are you claiming that $X$ is path-connected? Jan 25 at 12:33
• @JoséCarlosSantos What a misunderstanding from me, I'll fix that asap Jan 25 at 12:36
• The $X$ you give is not path-connected. Jan 25 at 12:49

Let $$X$$ be a topological space which consists of a single point. Then $$X$$ is path-connected, but the range of any map from $$X$$ to $$[0,1]$$ consists of a single point.

• Sure ! But what about a space with at least two distinct points ? Jan 25 at 12:43
• That was not part of the problem when I posted my answer. Jan 25 at 12:44
• Yes sorry, should I bring back the old version, accept the answer and post a new question ? Jan 25 at 12:45

If $$X$$ is $$\Bbb R$$ in the indiscrete (trivial) topology, then $$X$$ is path-connected (any map into an indiscrete space is continuous) but there is no non-constant continuous map to $$([0,1], \tau_E)$$.