# Do there exist two spaces such that there is no continuous, non-constant function between them?

Do there exist two topological spaces $(X,\tau_X)$ and $(Y,\tau_Y)$, each with more than one point, so that no continuous non-constant function $f:X\to Y$ exists?

Edit: As Krish commented, an example of this would be to take $X$ connected and $Y$ discrete with more than one point, so now I propose the question:

Do there exist two topological spaces $(X,\tau_X)$ and $(Y,\tau_Y)$, each with more than one point, so that no continuous non-constant function $f:X\to Y$ or $f:Y\to X$ exists?

Edit 2: I added the assumption that $X$ and $Y$ have at least two points.

• Take $X$ connected, and $Y$ discrete space with more than one points. – Krish Sep 8 '17 at 17:20
• @Krish Of course! Thank you, I made a change on the question to make it a little harder, I think. – Sergio Enrique Yarza Acuña Sep 8 '17 at 17:36
• Take one of $X$ or $Y$ to be empty, or a single point. – MartianInvader Sep 8 '17 at 17:51
• @MartianInvader Any function with empty domain is continuous. – Sergio Enrique Yarza Acuña Sep 8 '17 at 18:01
• @SergioEnriqueYarzaAcuña: Any function with empty domain is also constant. – Eric Wofsey Sep 8 '17 at 18:07

Here's a neat example. Take $X=[0,1]$ with the usual topology and let $Y$ be a countably infinite set with the cofinite topology. Then any continuous map $Y\to X$ is constant, since $X$ is Hausdorff but there are no disjoint nonempty open sets in $Y$. On the other hand, there are no nonconstant continuous maps $X\to Y$ either (this is tricky to prove; for instance, see this question on MO).
Examples similar to Eric's exist even if you insist on Hausdorff spaces. Take $X=[0,1]$ (with the standard topology) and $Y$ which is countably infinite, Hausdorff and connected (e.g. the irrational slope topology). Then every continuous map $X\to Y$ and $Y\to X$ is constant.