*[Cross-posted from MSE.](https://math.stackexchange.com/questions/4231158/is-there-an-infinite-topological-space-with-only-countably-many-continuous-maps?noredirect=1)*


Is there an infinite countable topological space $X$ with only countably many continuous functions to itself?


It cannot be a metrizable space. Another large class of examples that I know of are [Alexandrov topologies](https://en.wikipedia.org/wiki/Alexandrov_topology), however each Alexandrov topology corresponds to a preorder, and the continuous maps between two Alexandrov topologies correspond to the morphisms between the preorders. An infinite countable preorder has always $2^{\aleph\_0}$ endomorphisms, hence I cannot find a counterexample there either. It also cannot be a filter (+ the empty set), because any function which restricts to the identity on a set in the filter is continuous (thanks to Eric Wofsey for this last fact).


Using the [$\pi$-Base](https://topology.pi-base.org/), an online database of topological spaces inspired by the book *Counterexamples in topology* and expanding it, I obtained [this list of possible spaces](https://topology.pi-base.org/spaces?q=Countable%20%2B%20%7EMetrizable%20%2B%20%7EFinite). I proved for every one of these spaces that there were too many continuous maps, except for the Relatively prime integer topology (also known as the Golomb space) and the Prime integer topology. The first one [was proved to have too many continuous maps](https://dml.cz/handle/10338.dmlcz/147548), and the second one is very similar to the first one, so I don't place much hope on it. We need to look somewhere else.


On MSE, Mirko indicated the existence of the following paper:   

ADVANCES IN MATHEMATICS 29 (1978), 89-130   

Constructions and Applications of Rigid Spaces, I   

V. Kannan, M. Rajagopalan   

<https://www.sciencedirect.com/science/article/pii/0001870878900063>


In it, it is proven (Theorem 2.5.6) that, for any cardinal $\kappa$, if $(2^\kappa)^+ < 2^{2^\kappa}$, then there is a Hausdorff topological space of cardinality $\kappa$ which is strongly rigid, i.e. such that any continuous endofunction is either constant or the identity, which is a lot stronger than what we are trying to prove.



Is there an infinite topological space with only countably many continuous functions to itself?
A partial answer: the only place where Kannan and Rajagopalan use the inequality $(2^\kappa)^+<2^{2^\kappa}$ is in the application of the Theorem on page 121. That theorem is a consequence of Corollary 10.15 in Comfort and Negrepontis' *The Theory of Ultrafilters*. However the particular case that they use can be proven without an appeal to that book.
They show that for their set $F$ one can find a partition $\mathcal{A}$ of $\kappa$ into $\kappa$ many sets of cardinality $\kappa$ such that $\bar A\cap F\neq\emptyset$ for all $A\in\mathcal{A}$. Using that the space $\{0,1\}^{2^\kappa}$ has a dense subset of cardinality $\kappa$ one can map $\kappa$ onto a dense subset of that cube such that $\mathcal{A}$ is the set of point-inverses of that map, call it $f$. Then $\beta f$ not only maps $\beta\kappa$ onto that cube it also maps $F$ onto it. Take a closed subset $K$ of $F$ such that $f$ is surjective on $K$ and irreducible.
For every $\alpha<2^\kappa$ let $I\_\alpha=\{\beta\in\kappa:\pi\_\alpha(f(\beta))=1\}$ and $J\_\alpha=\kappa\setminus I\_\alpha$.
Then $\bigl\{(I\_\alpha,J\_\alpha):\alpha<2^\kappa\bigr\}$ is an independent family; even independent modulo the filter $\mathcal{F}=\{X\subseteq\kappa:K\subseteq\bar X\}$.
The proofs of Theorems 2.2 and 2.7 in [K. Kunen, *Ultrafilters and independent sets*, Trans. Amer. Math. Soc. 172 (1972), 299–306.](https://doi.org/10.1090/S0002-9947-1972-0314619-7)  go through with $\mathcal{F}$ as its starting point, so that $K$ contains a set of $2^\kappa$ many Rudin-Keisler incomparable ultrafilters.


Now specialize this to $\kappa=\omega\_0$ and you have a ZFC-construction of the space in Kannan and Rajagopalan's Theorem 2.5.6.


