Compact Hausdorff spaces w.o isolated points and having countable bases consisting of clopen sets are homeomorphic? I'm trying to understand how 
Any two non-empty compact Hausdorff spaces without isolated points and having countable bases consisting of clopen sets are homeomorphic to each other.
I noticed it on the wikipedia page for Cantor Spaces and I'm quite baffled reading the citation they give. I can't find the proof anywhere online either. 
 A: Let $X$ be a nonempty compact Hausdorff space without isolated points and with a countable basis of clopen sets.  We will prove that $X$ is homeomorphic to the Cantor set $K=\{0,1\}^\mathbb{N}$.
First, let us say that a sequence $(B_n)$ of clopen subsets of $X$ is a free pre-basis if:


*

*the set $\{B_n\}\cup\{B_n^c\}$ generates the topology of $X$, and

*for any $n$ and any function $e:\{1,\dots,n\}\to\{0,1\}$, the set $$B_e=\bigcap_{e(m)=1} B_m\cap\bigcap_{e(m)=0} B_m^c$$ is nonempty.


If $X$ has a free pre-basis, then we can construct a homeomorphism $F:X\to K$ as follows.  Define $F(x)(n)=1$ if $x\in B_n$, and $F(x)(n)=0$ if $x\not\in B_n$.  This map $F$ is continuous since each $B_n$ is clopen.
If $x,y\in X$ and $x\neq y$, then there is some open set that contains $x$ but not $y$ since $X$ is Hausdorff, so by assumption (1) there must be some open set of the form $B_n$ or $B_n^c$ that contains $x$ but not $y$.  For that value of $n$, then, the $n$th coordinates of $F(x)$ and $F(y)$ will be different.  Thus $F$ is injective.
Assumption (2) says exactly that the image of $F$ is dense (it intersects any basic open subset of $K$).  Since $X$ is compact, the image of $F$ is compact, and hence closed.  Thus $F$ is surjective.
Thus $F:X\to K$ is a continuous bijection.  Since $X$ is compact and $K$ is Hausdorff, we conclude that $F$ is a homeomorphism.

So now we just have to prove that a free pre-basis exists.  Let $\{C_n\}$ be a countable basis for $X$ consisting of clopen sets.  We will construct clopen sets $B_n$ by induction such that for each $n$ they satisfy condition (2) above for $n$ and $C_n$ is in the topology generated by $\{B_1,\dots,B_n\}\cup\{B_1^c,\dots,B_n^c\}$.  This will guarantee condition (1) holds, since the $C_n$ generate the topology of $X$.
The base case of the induction is $n=0$. In that case, we just need to check that (2) holds for the unique function $e:\emptyset\to\{0,1\}$.  For that function, $B_e=X$, which is nonempty by assumption.
Now, having defined $B_1,\dots,B_{n-1}$, we need to define $B_n$.  By induction, we know that $B_f\neq\emptyset$ for every $f:\{1,\dots,n-1\}\to\{0,1\}$.  Note also that the sets $B_f$ are disjoint and their union is $X$.  Given a function $e:\{1,\dots,n\}\to\{0,1\}$, let $f=e|_{\{1,\dots,n-1\}}$.  Then $B_e$ is either $B_f\cap B_n$ or $B_f\cap B_n^c$, depending on the value of $e(n)$.  So to guarantee that $B_e\neq\emptyset$ for any $e$, we just have to arrange that $B_f\cap B_n$ is a nonempty proper subset of $B_f$ for each $f:\{1,\dots,n-1\}\to\{0,1\}$.
So let us define $B_n$ as follows.  For each $f:\{1,\dots,n-1\}\to\{0,1\}$, let $A_f=C_n\cap B_f$ if $C_n\cap B_f$ is a nonempty proper subset of $B_f$.  Otherwise, take a point $x\in B_f$.  Since $x$ is not isolated, there exists some other point $y\in B_f$ such that $x\neq y$.  Since $X$ is Hausdorff, there exists some basic open set $C_m$ such that $x\in C_m$ and $y\not\in C_m$.  Now define $A_f=B_f\cap C_m$.
We have defined $A_f$ for each $f$ such that $A_f$ is a nonempty proper clopen subset of $B_f$.  Now define $$B_n=\bigcup_{f:\{1,\dots,n-1\}\to\{0,1\}} A_f.$$  For each $f$ we have $B_n\cap B_f=A_f$, so condition (2) will hold.
All that is left to check is that $C_n$ is in the topology generated by $\{B_1,\dots,B_n\}\cup\{B_1^c,\dots,B_n^c\}$.  Let $S$ be the set of $f$ such that $C_n\cap B_f$ is a nonempty proper subset of $B_f$ and let $T$ be the set of $f$ such that $C_n\cap B_f=B_f$.  Then we have $$C_n=\bigcup_{f\in S} A_f\cup\bigcup_{f\in T} B_f.$$  The right-hand side is in the topology generated by $\{B_1,\dots,B_n\}\cup\{B_1^c,\dots,B_n^c\}$, since each $B_f$ is an intersection of such sets and $A_f=B_f\cap B_n$.  Thus $C_n$ is in the topology generated by $\{B_1,\dots,B_n\}\cup\{B_1^c,\dots,B_n^c\}$, as desired.
A: You can try to prove it directly: Think of bases of clopen sets as "breaking up" your topological space, in finer and finer manners: Let $X$ one of your topological spaces, and $\left\{U_1,U_2,\ldots\right\}$ a countable clopen basis (assume $U_1\neq X,\varnothing$). We define a sequence $\cal{P}_1,\cal{P}_2,\ldots$ with the following properties:


*

*Each $B\in\mathcal{P}_n$ is the union of two elements $B_1,B_2\in\mathcal{P}_{n+1}$

*$\mathcal{P}=\bigcup_n\mathcal{P}_n$ is a basis of $X$.

*$|\mathcal{P}_n|=2^n$.


For this, set $\mathcal{P}_1=\left\{U_1,X\setminus U_1\right\}$. Given $\mathcal{P}_n$ and $B\in\mathcal{P}_n$, define $B_1,B_2$ as follows: If $B\cap U_{n+1}$ and $B\setminus U_{n+1}$ are both nonempty, $B_1,B_2$ as these two sets. If one of these sets is empty (say, $B\setminus U_{n+1}$), let $B_1,B_2$ be a nontrivial clopen partition of $B\cap U_{n+1}$ (if $B\cap U_{n+1}$ is the empty one, take a clopen partition of $B\setminus U_{n+1}$). Set
$$\mathcal{P}_{n+1}=\left\{B_1,B_2:B\in\mathcal{P}_n\right\}$$
Then 1. and 3. are immediate from the construction. The partition $\mathcal{P}_{n+1}$ is finer than $\left\{B\cap U_{n+1},B\setminus U_{n+1}:B\in\mathcal{P}_n\right\}$, so $U_{n+1}$ is a union of elements of $\mathcal{P}_{n+1}$, from which 2. follows.
Now if you're given two topological spaces $X$ and $Y$, take sequences of partitions $\mathcal{P}_n^X$ and $\mathcal{P}_n^Y$ as above. Define a sequence $\varphi_n:\mathcal{P}_n^X\to\mathcal{P}_n^Y$ as follows: $\varphi_1$ is any bijection. Given $\varphi_n$ and $B\in\mathcal{P}^X_n$, we can write $B$ as a union $B=B_1\cup B_2$ where $B_i\in \mathcal{P}_{n+1}^X$, and $\varphi_n(B)$ as a union $\varphi_n(B)=B_1'\cup B_2'$ where $B_i'\in\mathcal{P}_{n+1}^Y$. Set $\varphi_{n+1}(B_i)=B_i'$.
Then $\varphi=\bigcup\varphi_n:\mathcal{P}^X=\bigcup\mathcal{P}_n^X\to\mathcal{P}^Y=\bigcup\mathcal{P}_n^Y$ is a bijection with the property that
$$B\subseteq C\iff\varphi(B)\subseteq\varphi(C).$$
Given $x\in X$, the family $\mathcal{P}^X_x=\left\{B\in\bigcup\mathcal{P}_n^X:x\in B\right\}$ has the following property: 


*For every finite family $B_1,\ldots,B_n\in\mathcal{P}^X_x$, there is $B\in\mathcal{P}_x^X$ with $B\subseteq B_1\cap\cdots\cap B_n$;


In particular this is preserved by $\varphi$, so $\varphi(\mathcal{P}^X_x)$ has the finite intersections property, so $\bigcap\varphi(\mathcal{P}^X_x)$ has at least one point. Let's show that there is actually only one point: Let $\alpha\neq \beta\in\bigcap\varphi(\mathcal{P}^X_x)$. Choose disjoint clopen neighbourhoods $B'_\alpha, B'_\beta\in\mathcal{P}^Y$ of $\alpha$ and $\beta$, respectively. One of $\varphi^{-1}(B'_\alpha),\varphi^{-1}(B'_\beta)$, say the first one, does not contain $x$, and so it is disjoint with some $B\in\mathcal{P}^X_x$, and so $B'_\alpha$ does not intersect $\varphi(B)$, a contradictions because both should contain $\alpha$.
Thus, define $\phi(x)$ as the only point in that intersection. More precisely, $\phi:X\to Y$ is defined with the property that
$$\left\{\phi(x)\right\}=\bigcap\left\{\varphi(B):x\in B\right\}\tag{$\star$}$$
If we show that $\phi(B)=\varphi(B)$ then we are done, since from this it follows that $\phi$ is a bijection and that it takes topological bases to bases, so it is a homeomorphism. Let's show that
$$x\in B\iff\phi(x)\in\varphi(B)\tag{$\star\star$}$$
Implication $\Rightarrow$ is immediate from ($\star$). For the converse, suppose $x\not\in B$. Find $C\in\mathcal{P}^X_x$ with $C\cap B=\varnothing$. Then $x\in\varphi(C)$, which is disjoint with $\varphi(B)$ and thus $x\not\in\varphi(B)$.
Inclusion $\phi(B)\subseteq\varphi(B)$ is immediate from ($\star$). For the converse, let $\psi:Y\to X$ be the map we obtain, with same construction, in the other direction (i.e., with $\varphi^{-1}$ instead of $\varphi$). Then $\psi$ has analogue properties as $\phi$, but with $\varphi^{-1}$ in place of $\varphi$. Then for every $y\in \varphi(B)$,
$$\left\{y\right\}=\bigcap\left\{\varphi(B):y\in\varphi(B)\right\}=\bigcap\left\{\varphi(B):\phi(\psi(y))\in\phi(\psi(\varphi(B))\right\}$$
where we use ($\star\star$) twice above, with $\phi$ and $\psi$. Now use ($\star$) with both $\psi$ and $\phi$ to obtain
$$\phi(\psi(\varphi(B))\subseteq\phi(\varphi^{-1}(\varphi(B)))=\phi(B)\subseteq\varphi(B)$$
and conclude that
$$\left\{y\right\}\subseteq\bigcap\left\{\varphi(B):\phi(\psi(y))\in\varphi(B)\right\}=\left\{\phi(\psi(y))\right\}$$
so $y=\phi(\psi(y))$ and $\psi(y)\in\varphi^{-1}\varphi(B)=B$.
