Here is an example of a nonempty ultraconnected space that is not contractible:
We say a partial function $f$ from $\mathbb{Z}$ to $\{0, 1\}$ is admissible if it satisfies all of the following three conditions,
- There exists $n \in \mathbb{Z}$ s.t. the domain of $f$ is $\mathbb{Z}_{\leq n}$. We call $n$ the length of $f$, which shall be denoted by $l(f)$.
- There exists $n \in \mathbb{Z}$ s.t. $f(m) = 0$ for all $m \leq n$.
- Either $\text{range}(f) = \{0\}$ and $l(f) \leq 0$; or there exists $n < 0$ s.t. $f(n) = 1$, and furthermore if $n_0 = \min\{n < 0: f(n) = 1\}$, then $l(f) \leq -n_0$.
Let $X$ be the space of all admissible partial functions from $\mathbb{Z}$ to $\{0, 1\}$. We note that $X$ is countable.
For partial functions $f, g$ from $\mathbb{Z}$ to $\{0, 1\}$, we shall say $g$ is a truncation of $f$, denoted by $g \leq f$, if there exists $n \in \mathbb{Z}$ s.t. $g = f|_{\text{dom}(f) \cap \mathbb{Z}_{\leq n}}$. We observe that truncations of admissible partial functions are admissible. Furthermore, $\leq$ is a partial order on $X$ and makes $X$ into a meet-semilattice. For $f, g \in X$, we shall write $f \wedge g$ for the meet of $f$ and $g$ under $\leq$.
Now, we topologize $X$ as follows: for each $x \in X$, let,
$$T_x = \{y \in X: y \leq x\}$$
And, for each $n \in \mathbb{Z}$, let,
$$K_n = \{y \in X: l(y) \leq n\}$$
We then equip $X$ with the topology generated by the closed subbasis,
$$\{T_x: x \in X\} \cup \{K_n: n \in \mathbb{Z}\}$$
Lemma 1: $\overline{\{x\}} = T_x$ for all $x \in X$.
Proof: $T_x$ is closed and contains $x$, so $\overline{\{x\}} \subset T_x$. Conversely, if $x \in T_y$, then $x \leq y$ so $T_x \subset T_y$. If $x \in K_n$, then $l(x) \leq n$ so $T_x \subset K_n$. From this, it is easy to conclude that $T_x \subset \overline{\{x\}}$. $\square$
Corollary 1: $X$ is ultraconnected.
Proof: It suffices to show that, for any $x, y \in X$, $\overline{\{x\}} \cap \overline{\{y\}} \neq \varnothing$. Indeed, we have $\overline{\{x\}} \cap \overline{\{y\}} = T_x \cap T_y \ni x \wedge y$. $\square$
For any $x \in X$, it is easy to see that there are only finitely many $y \in X$ s.t. $y \geq x$. Thus,
$$E_x = \bigcup_{y: y \geq x} T_y$$
is closed.
Lemma 2: Any path $f: [0, 1] \to X$ has finite range. Furthermore, $\text{range}(f)$ has a minimum under $\leq$.
Proof: Note that $\text{range}(f)$ is compact. Thus, as $n$ decreases, $K_n \cap \text{range}(f)$ form a decreasing sequence of closed subsets of a compact space whose intersection is empty. Thus, there exists $n \in \mathbb{Z}$ s.t. $K_n \cap \text{range}(f) = \varnothing$, i.e., $\text{range}(f) \subset K_n^c$. On the other hand, $K_n^c$ can be written as a countable disjoint union of (relatively) closed sets:
$$K_n^c = \bigsqcup_{x: l(x) = n + 1} (E_x \cap K_n^c)$$
So, $[0, 1]$ is a countable disjoint union of closed sets $f^{-1}(E_x \cap K_n^c)$ where $x$ ranges over all elements of $X$ of length $n + 1$. By Sierpiński's theorem, exactly one of these closed sets is nonempty, i.e., there exists $x \in X$ with $l(x) = n + 1$ and $\text{range}(f) \subset E_x \cap K_n^c$. The latter set is easily seen to be finite.
Now, as $\text{range}(f)$ is finite, we may let $\{x_1, \cdots, x_n\}$ be the elements of $\text{range}(f)$ that are minimal under $\leq$. But then $\text{range}(f)$ can be written as a finite disjoint union of nonempty (relatively) closed sets,
$$\text{range}(f) = \bigsqcup_{i=1}^n (E_{x_i} \cap \text{range}(f))$$
But $\text{range}(f)$ is connected, so $n = 1$, i.e., $\text{range}(f)$ has a minimum. $\square$
Corollary 2: If $f: [0, 1] \to X$ is a path from $x \in X$ to $y \in X$, then there exists $t \in [0, 1]$ s.t. $f(t) \leq x \wedge y$.
Proof: By Lemma 2, $\min(\text{range}(f))$ exists, so there exists $t \in [0, 1]$ s.t.,
$$f(t) = \min(\text{range}(f)) \leq f(0) \wedge f(1) = x \wedge y$$
$\square$
Now, let us assume $X$ is contractible and $f: X \times [0, 1] \to X$ is a contraction. Let $x_0 \in X$ be the point $f$ contracts to, i.e., $f(x, 1) = x_0$ for all $x \in X$. For any $y \in X$, let $\Pi_y = f^{-1}(T_y) \subset X \times [0, 1]$, which is closed. Let $p: X \times [0, 1] \to X$ be the projection onto the first coordinate.
Lemma 3: For any $y \in X$, $p(\Pi_y)$ contains elements of arbitrarily large lengths.
Proof: For any $n \in \mathbb{Z}$, it is easy to show that there exists $x \in X$ s.t. $l(x) \geq n$ and $x \wedge x_0 \leq y$. (Indeed, such an $x$ can be chosen by modifying a $0$ at a sufficiently small index in $x_0 \wedge y$ to $1$, then adding sufficiently many numbers at larger indices to reach the desired length.) Then $t \mapsto f(x, t)$ is a path from $x$ to $x_0$, so by Corollary 2, there exists $t \in [0, 1]$ s.t. $f(x, t) \leq x \wedge x_0 \leq y$. Whence, $(x, t) \in \Pi_y$ and $x \in p(\Pi_y)$. $\square$
Fix $y \in X$. We note that the following is a closed subbasis for $X \times [0, 1]$:
$$\{T_x \times [0, 1]: x \in X\} \cup \{K_n \times [0, 1]: n \in \mathbb{Z}\} \cup \{X \times L: L \subset [0, 1] \text{ closed}\}$$
We note that $\{K_n: n \in \mathbb{Z}\}$ is linearly ordered by inclusion. Thus, as $\Pi_y$ is closed, it can be written as,
$$\Pi_y = \bigcap_{i \in I}\left(\left[\bigcup_{j \in J_i} (T_{x_j} \times [0, 1])\right] \cup (K_{n_i} \times [0, 1]) \cup (X \times L_i)\right)$$
where $I$ is a possibly infinite index set; for each $i \in I$, $J_i$ is a finite index set; for each $j \in J_i$ where $i \in I$, $x_j \in X$; for each $i \in I$, $n_i \in \mathbb{Z} \cup \{-\infty\}$ (here, we abuse the notation slightly and let $K_{-\infty} = \varnothing$ in order to accommodate the case where this term does not appear in the union); and for each $i \in I$, $L_i \subset [0, 1]$ is closed. Hence, for each $i \in I$, by Lemma 3, the following set has elements of arbitrarily large lengths.
$$p\left(\left[\bigcup_{j \in J_i} (T_{x_j} \times [0, 1])\right] \cup (K_{n_i} \times [0, 1]) \cup (X \times L_i)\right) = \begin{cases} \left(\bigcup_{j \in J_i} T_{x_j}\right) \cup K_{n_i} &, \text{ if }L_i = \varnothing\\
X &, \text{ if }L_i \neq \varnothing\end{cases}$$
Since $J_i$ is finite, it is easy to see that elements of $\left(\bigcup_{j \in J_i} T_{x_j}\right) \cup K_{n_i}$ have a uniform bound on lengths, so $L_i \neq \varnothing$.
Now, consider a nonempty finite subset $I_0 \subset I$ and take the intersection $U$ of,
$$\left[\bigcup_{j \in J_i} (T_{x_j} \times [0, 1])\right] \cup (K_{n_i} \times [0, 1]) \cup (X \times L_i)$$
where $i$ ranges over $I_0$. We note that the intersection of (nonzero) finitely many sets of the form $T_x$ is again of the form $T_x$; the intersection of (nonzero) finitely many $T_x$ and (nonzero) finitely many $K_n$ is of the form $T_x$; and the intersection of (nonzero) finitely many sets of the form $K_n$ is of the form $K_n$. From this, we see that $U$ can be written as,
$$\left[\bigcup_{j \in J} (T_{x_j} \times L'_j)\right] \cup \left[\bigcup_{j \in J'} (K_{n_j} \times L''_j)\right] \cup (X \times L)$$
where $J, J'$ are finite index sets; for each $j \in J$, $L'_j \subset [0, 1]$ is closed; for each $j \in J'$, $n_j \in \mathbb{Z} \cup \{-\infty\}$ and $L''_j \subset [0, 1]$ is closed; and $L \subset [0, 1]$ is closed. Furthermore, $L = \bigcap_{i \in I_0} L_i$. As $\Pi_y \subset U$, $p(U)$ has elements of arbitrarily large lengths, so the same argument shows $L \neq \varnothing$. That is,
$$\bigcap_{i \in I_0} L_i \neq \varnothing, \forall I_0 \subset I \text{ nonempty finite}$$
As $[0, 1]$ is compact, this implies $\bigcap_{i \in I} L_i \neq \varnothing$. Since $X \times \left(\bigcap_{i \in I} L_i\right) \subset \Pi_y$, we have the following set,
$$S_y = \{t \in [0, 1]: X \times \{t\} \subset \Pi_y\} = \bigcap_{x \in X} \{t \in [0, 1]: f(x, t) \in T_y\}$$
is nonempty closed. Note that as $T_{y_1} \cap T_{y_2} = T_{y_1 \wedge y_2}$, we have $S_{y_1} \cap S_{y_2} = S_{y_1 \wedge y_2}$. Thus, $\{S_y\}_{y \in X}$ is a downward directed collection of nonempty closed subsets of $[0, 1]$. By compactness, we then have $\bigcap_{y \in X} S_y \neq \varnothing$. But then, for any $t \in \bigcap_{y \in X} S_y$ and $x \in X$, we have,
$$f(x, t) \in \bigcap_{y \in X} T_y = \varnothing$$
This is a contradiction. Hence,
Theorem 1: $X$ is not contractible. Thus, there exists a nonempty ultraconnected space that is not contractible.
Here are two additional remarks regarding $X$:
Remark 1: Since $x \in \overline{\{y\}} = T_y$ iff $x \leq y$, the specialization preorder on $X$ coincide with $X$.
Remark 2: Here are some additional properties that $X$ enjoys:
- $X$ is $T_0$ but not $T_1$. Indeed, if $x \in \overline{\{y\}} = T_y$ and $y \in \overline{\{x\}} = T_x$, then $x \leq y$ and $y \leq x$, so $x = y$ and thus $X$ is $T_0$. For any $x \in X$, $\overline{\{x\}} = T_x$ contains infinitely many elements distinct from $x$, so no point in $X$ is closed and $X$ is not $T_1$.
- $X$ is second countable and thus also first countable. Indeed, the topology on $X$ is generated by a countable closed subbasis, whence also a countable open basis.
- $X$ is not compact, in fact, not even countably compact. Indeed, as $n$ decreases, $K_n$ is a decreasing sequence of nonempty closed sets whose intersection is empty, contradicting countable compactness.
- However, $X$ is locally compact, in the sense that every point $x \in X$ has a local basis of compact neighborhoods. Indeed, for any $n \in \mathbb{Z}$, we claim that any subset $L \subset K_n^c$ is compact. (In other words, $L \subset X$ is compact if there is a uniform lower bound on lengths of elements of $L$. This is clearly an if and only if, as the proof that $X$ is not compact can be easily adapted to show that any $L \subset X$ with no uniform lower bound on lengths of elements is not compact. This latter fact was also used in the proof of Lemma 2.) Since $K_n^c$ is open for all $n \in \mathbb{Z}$ and $\bigcup_{n \in \mathbb{Z}} K_n^c = X$, this is clearly enough to imply local compactness. By Alexander subbase theorem, it suffices to show that, if,
$$L \cap \left(\bigcap_{j \in J} T_{x_j}\right) \cap \left(\bigcap_{j’ \in J’} K_{n_{j’}}\right) = \varnothing$$
$\;\;\;\;\;\;$where $J, J’$ are possibly infinite index sets; for each $j \in J$, $x_j \in X$; and for each $j’ \in J’$, $n_{j’} \in \mathbb{Z}$; then there exists finite $J_0 \subset J$ and $J’_0 \subset J’$ s.t.,
$$L \cap \left(\bigcap_{j \in J_0} T_{x_j}\right) \cap \left(\bigcap_{j’ \in J’_0} K_{n_{j’}}\right) = \varnothing$$
$\;\;\;\;\;\;$There are several cases to consider:
$\;\;\;\;\;\;$ 1. If $\{n_{j’}: j’ \in J’\}$ is not bounded below, then there exists $j’ \in J’$ s.t. $n_{j’} \leq n$. But then $\varnothing = K_n^c \cap K_{n_{j’}} \supset L \cap K_{n_{j’}}$.
$\;\;\;\;\;\;$ 2. If $J$ is nonempty, consider the downward directed net,
$$\left\{\bigwedge_{j \in J_0} x_j: J_0 \subset J \text{ nonempty finite}\right\}$$
$\;\;\;\;\;\;\;\;\;\;$in $X$. If this net has no minimum, then there exists a sequence $J_0^{(k)}$ of nonempty finite subsets of $J$ s.t., $\bigwedge_{j \in J_0^{(k)}} x_j$ is strictly decreasing as $k \to \infty$. In particular, there exists some $k$ s.t. $l\left(\bigwedge_{j \in J_0^{(k)}} x_j\right) \leq n$. But then,
$$L \cap \left(\bigcap_{j \in J_0^{(k)}} T_{x_j}\right) \subset K_n^c \cap T_{\bigwedge_{j \in J_0^{(k)}} x_j} = \varnothing$$
$\;\;\;\;\;\;$ 3. If both $J$ and $J’$ are empty, then there is nothing to prove.
$\;\;\;\;\;\;$ 4. If $J$ is nonempty and $\left\{\bigwedge_{j \in J_0} x_j: J_0 \subset J \text{ nonempty finite}\right\}$ has a minimum, then there exists $J_0 \subset J$ nonempty finite s.t. $\bigwedge_{j_0 \in J_0} x_{j_0} \leq x_j$ for all $j \in J$, so,
$$\bigcap_{j \in J_0} T_{x_j} = T_{\bigwedge_{j \in J} x_j} \subset \bigcap_{j \in J} T_{x_j} \subset \bigcap_{j \in J_0} T_{x_j}$$
$\;\;\;\;\;\;\;\;\;\;$Now, if $J’$ is empty, then,
$$\varnothing = L \cap \left(\bigcap_{j \in J} T_{x_j}\right) \cap \left(\bigcap_{j’ \in J’} K_{n_{j’}}\right) = L \cap \left(\bigcap_{j \in J_0} T_{x_j}\right)$$
$\;\;\;\;\;\;\;\;\;\;$If, instead, $J’$ is nonempty, but $\{n_{j’}: j’ \in J’\}$ is bounded below, then $\min\{n_{j’}: j’ \in J’\}$ exists and there is some $j’_0 \in J’$ s.t. $n_{j’_0} = \min\{n_{j’}: j’ \in J’\}$. In this case, we have,
$$\bigcap_{j’ \in J’} K_{n_{j’}} = K_{n_{j’_0}}$$
$\;\;\;\;\;\;\;\;\;\;$So,
$$\varnothing = L \cap \left(\bigcap_{j \in J} T_{x_j}\right) \cap \left(\bigcap_{j’ \in J’} K_{n_{j’}}\right) = L \cap \left(\bigcap_{j \in J_0} T_{x_j}\right) \cap K_{n_{j’_0}}$$
$\;\;\;\;\;\;\;\;\;\;$Finally, if $J$ is empty, but $J’$ is nonempty and $\{n_{j’}: j’ \in J’\}$ is bounded below, then,
$$\varnothing = L \cap \left(\bigcap_{j \in J} T_{x_j}\right) \cap \left(\bigcap_{j’ \in J’} K_{n_{j’}}\right) = L \cap K_{n_{j’_0}}$$
$\;\;\;\;\;\;\;\;\;\;$where, again, $j’_0 \in J’$ is s.t. $n_{j’_0} = \min\{n_{j’}: j’ \in J’\}$.
- $X$ is path connected. Indeed, all ultraconncted spaces are path connected. See, for example, here.
- In fact, we even have $X$ is simply connected. It suffices to show any loop $f: S^1 \to X$ is null-homotopic. By Lemma 2, $\text{range}(f)$ has a minimum under $\leq$. Per Remark 1, $\text{range}(f)$ thus has a minimum under the specialization preorder. By the Theorem in the other answer of mine to this question (see also here), $\text{range}(f)$ is contractible. From there it is easy to see $f$ is indeed null-homotopic.
- Even better, $X$ is weakly contractible, i.e., all its homotopy groups vanish. Indeed, as Sierpiński's theorem holds for any compact connected Hausdorff space, it is easy to see that Lemma 2 still holds when $[0, 1]$ is replaced by any compact connected Hausdorff space, in particular $S^n$ for any $n \geq 1$. Then the same proof that $X$ is simply connected shows $\pi_n(X) = 0$ for all $n \geq 1$.
- $X$ is hyperconnected (also known as irreducible), i.e., any two nonempty open subsets of $X$ intersect. Given an open basis for the topology, in order to verify hyperconnectedness, it clearly suffices to show any two nonempty basic open sets intersect. Dualizing to closed basis, it suffices to show the union of any two basic closed proper subsets of $X$ cannot be $X$. Since the topology on $X$ is defined using a closed subbasis, we see that it suffices to show any finite union of elements of the closed subbasis is not the entire space. This is true because any finite union of $T_x$ and $K_n$ has a uniform upper bound on lengths of elements.
- $X$ is meager, i.e., it is a countable union of nowhere dense sets. Indeed, for each $n \in \mathbb{Z}$, $K_n$ is closed while $K_n^c$ is nonempty open. Since $X$ is hyperconnected, if $K_n$ has interior, then $K_n \cap K_n^c$ would be nonempty, which is a contradiction. Thus, $K_n$ is nowhere dense for all $n$. Now, just observe that $X = \bigcup_{n \in \mathbb{Z}} K_n$.
- $X$ is not Alexandrov. Indeed, fix $n \in \mathbb{Z}$ and $x \in X$ with $l(x) = n$. If $X$ were Alexandrov, then,
$$U = \bigcup_{y \in X: l(y) = n, y \neq x} T_y$$
$\;\;\;\;\;\;$would be closed and does not contain $x$. However, it is not hard to see that sets of the form,
$$K_{n-1}^c \cap \left(\bigcap_{i=1}^k T_{x_i}^c\right)$$
$\;\;\;\;\;\;$where $x_i \not\geq x$, form an open neighborhood basis of $x$. However, any set of the above form intersects $U$. Indeed, an element of the intersection can be constructed by modifying a $0$ at a sufficiently small index in $x \wedge \left(\bigwedge_{i=1}^k x_i\right)$ to $1$, then adding sufficiently many numbers at larger indices so that it has length exactly $n$. Thus, $x$ is in the closure of, but not in, $U$, so $U$ is not closed, a contradiction.