I'm starting to feel a little bad about using this website as my own personal counterexample generator, but here I go again...
Terminology:
Let's call a space zero-dimensional if it is $T_0$ and admits a basis of clopen sets. By a standard embedding argument, a space is zero-dimensional if and only if it is homeomorphic to a subspace of some (possibly uncountable) power of the two-point discrete space $\{0,1\}$. In particular, zero-dimensional implies Hausdorff, or even completely regular.
Let's call a space $X$ totally separated if, given distinct points $x,y \in X$, there exists a separation $U,V$ of $X$ (ie. $U,V$ partition $X$ and are open) such that $x \in U$ and $y \in V$. In particular, a totally separated space is Hausdorff. Clearly zero-dimensional implies totally separated.
Finally, let's call a space totally disconnected if all its connected components are singletons. Clearly totally separated implies totally disconnected (conversely, totally disconnected need not even imply Hausdorff).
My question:
Let $X$ be a countable, totally disconnected Hausdorff space. Can $X$ fail to be totally separated? If yes, can $X$ fail to be zero-dimensional?
Some discussion:
If we replace "countable" with "compact, the answer to both questions is "no". For a compact Hausdorff space, the components and quasicomponents coincide, so $X$ is totally separated. Then, by applying basic compactness arguments, we can prove even that for all $A,B \subset X$, disjoint closed sets, there is a separation $U,V$ of $X$ with $A \subset U, B \subset V$. In particular, $X$ is zero-dimensional. The hypothesis of compactness cannot be dropped though. For example Cantor's leaky tent is a (noncompact, noncountable) subspace of the Euclidean plane which can be shown, with some effort, to be totally disconnected - but not totally separated. Since the hypothesis of compactness cannot be dropped, I wondered whether it could be replaced with something else. In particular, I wondered whether countable would do.
Added: Here's another counterexample. The main idea is the same as in Brian's example, but I thought this space seemed somehow more concrete.
As a set, let $X := \mathbb{Q} \cup \{p_0,p_1\}$ where $p_0,p_1$ are two distinct points not in $\mathbb{Q}$. For $n=0,1,2,\ldots$, let $I_n := (n,n+1) \cap \mathbb{Q}$. We put $U \subset X$ open if and only if the following are satisfied:
- $U \cap \mathbb{Q}$ is open in the standard topology on $\mathbb{Q}$.
- If $p_0 \in U$, then $U$ contains all but finitely many of $I_0,I_2,I_4,\ldots$
- If $p_1 \in U$, then $U$ contains all but finitely many of $I_1,I_3,I_5,\ldots$
It is easy to see this topology is Hausdorff. To see it is totally disconnected, suppose that $C \subset X$ is connected with more than one point. Intervals with irrational endpoints are still clopen, and these can be used to separate a fixed rational number from any other point in $X$. It follows that $C$ contains no rationals. Thus $C = \{p_0,q_0\}$, but this space is discrete ($X$ is Hausdorff), so no such $C$ exists. However, $X$ is not totally separated. Neighbourhoods of $p_0$ and $q_0$ cannot have disjoint closures.