# Existence of non-constant continuous functions

Under what circumstances is there at least one non-constant continuous function from a topological space $X$ to a topological space $Y$? Assume that $X$ and $Y$ each have at least two points. If $X$ is disconnected, separated by $A$ and $B$, then any function with one value on $A$ and another on $B$ is continuous. If $X$ is connected, then the image of $X$ under a continuous function must lie within a connected component of $Y$. Therefore, to avoid triviality, assume that $X$ and $Y$ are both connected.

The only theorem I've encountered of this nature is Urysohn's lemma, which proves such a function exists if $X$ is a $T_4$ space and $Y$ has a path-connected component with more than one point. This is of course a rather strong condition.

It's obvious that if $X$ is convex in $\mathbb{R}$ and $Y$ is totally path disconnected, then there is no such function.

Otherwise, I haven't a clue. I'm particularly curious about what happens if $X$ and/or $Y$ is required to be homogeneous or bihomogeneous, and/or if $Y$ is required to be uniform.

This paper might be of interest:

The content of the paper:

Urysohn  asked whether for every regular space $$X$$ (having at least two points) there is a non-constant continuous map from $$X$$ to the space $$Y$$ of real numbers. This question was negatively answered by Hewitt , Novak  and Van Est-Freudenthal . The methods used by these authors (which go back to Tychonoff ) let us show relatively easy the following result:

Theorem Let $$Y$$ be a topological space. The following conditions are equivalent:
(a) $$Y$$ is a $$T_1$$-space,
(b) there exists a regular space $$X$$ (having at least two points), such that every continuous map from $$X$$ to $$Y$$ is constant.

Sketch of the construction in the proof of this theorem: (I have omitted many details and also the proofs that these space do have the required properties.)

Definition of a space $$Q$$. First we start with some given space $$Y$$.

• The spaces $$R_i$$ for $$i=1,2$$ and points $$r_i\in R_i$$ are constructed in such way that every continuous map from $$R_i$$ to $$Y$$ is constant on some neighborhood of $$R_i$$.
• A space $$T=R_1\times R_2\setminus \{(r_1,r_2)\}$$. This space has the property, that for every continuous map $$f$$ from $$T$$ to $$Y$$ there exist neighborhoods $$U_i$$ of $$r_i$$ such that $$f$$ is constant on $$U_1\times U_2 - \{(r_1; r_2)\}$$.
• We take countably many homeomorphic copies $$T\times\{n\}$$ of the space $$T$$. We add two new points $$a$$, $$b$$ with local neighborhood bases $$\{\bigcup T_m; m\ge n\}\cup \{a\}\subseteq B$$ and $$\{\bigcup T_m; m\ge n\}\cup \{b\}\subseteq B$$.
• In this space we identify $$(x,r_2,n)$$ and $$(x,r_2,n+1)$$ for any $$x\in R_1\setminus\{r_1\}$$ and any even $$n$$. We also identify $$(r_1,x,n)$$ and $$(r_1,x,n+1)$$ for every odd $$n$$ and every $$x\in R_2\setminus\{r_2\}$$.

Let us call the resulting space $$Q$$.

Now for any space $$Z$$ we define a space $$Q(Z)$$ on the set $$Z\times Q$$ where a subset $$B$$ of $$Z\times Q$$ is open in $$Z\times Q$$ if and only if the following holds:

• If $$(z;x)$$ is an element of $$B$$, then there is a neighborhood $$U$$ of $$x$$ in $$Q$$ with $$\{z\}\times U\subset B$$.
• If $$(z;a)$$ is an element of $$B$$, then there is a neighborhood $$U$$ of $$z$$ in $$Z$$ with $$U\times\{a\}\subset B$$.

If we identify in the above space $$Z\times Q$$ all points of the set $$Z\times\{b\}$$, then we obtain a space $$Q(Z)$$.

Definition of $$Q(Z)$$. The space $$Q(Z)$$ contains a homeomorphic copy of $$Z$$. If $$f$$ is a continuous map from $$Q(Z)$$ to $$Y$$, then $$f$$ is constant on $$Z$$.

Definition of $$X$$. Let $$X_0$$ be a singleton. By induction we define $$X_{n+1}=Q(X_n)$$. Then $$X_0\subset X_1\subset X_2\subset \dots$$ are regular spaces. Let a subset of $$X=\bigcup\{X_n; n=0,1,\dots\}$$ be open if and only if $$B\cap X_n$$ is open for every $$n$$. The space $$X$$ is a regular space. Every continuous map from $$X$$ to $$Y$$ is constant.

Remark. The above results has a trivial analogue:
Let $$X$$ be a topological space. The following conditions are equivalent:
(a) $$X$$ is connected,
(b) there is a regular space $$Y$$ (having at least 2 points), such that every continuous map from $$X$$ to $$Y$$ is constant.

EDIT: I have put my attempt to translate the article here (let me know if you find any typos or mistranslations).

• @MartinSleziak: A belated question: by "regular", does the paper mean "regular Hausdorff"? Aug 12, 2013 at 22:09
• @dfeuer I don't think it is a Hausdorff space. (I've added a sketch of the construction; I did not check the details.) But I found this in Aaron R. Todd : Quasiregular, pseudocomplete, and Baire spaces: The space $X$ discussed in Hajek and Todd  is a slight modification of an example of Herrlich . This modification gives a regular Hausdorff space with the property that any continuous image of $X$ in any first countable Hausdorff space is a singleton. Aug 13, 2013 at 16:24
• One implication appears to be trivial: Let $X$ be a two-point indiscrete space. Then $X$ is vacuously regular. Let $f\colon X\to Y$ be continuous. Let $p,q \in X$ with $f(p)\ne f(q)$. Then $f^{-1}[\{f(p)\}]$ is a closed set containing $p$ but not $q$, a contradiction. Aug 13, 2013 at 21:39
• Sorry for recalling your memory of an old answer. But it seems $Q$ is not even Hausdorff because you can't separate $a$ and $b$, right? (Or did I overlook something obvious?) Nov 24, 2020 at 9:02

I doubt that a complete and simple characterization exists. One common obstruction though (generalizing a bit what you said) is if $X$ is connected and $Y$ is completely disconnected.