The title sounds tautological, right? Perhaps I'm missing something completely trivial here ...


Assume $X$ is a compact totally disconnected hausdorff space. It is known that $X$ can be written as directed inverse limit of finite discrete spaces $X\_i$ with surjective transition maps (i.e. $X$ is profinite). How do you prove that every map from $X$ to a finite discrete space factors through some projection $X \to X\_i$?


I know that the fibers of the projections are a basis of the topology of $X$ (not only a subbasis). The corresponding result for profinite groups is true, but I cannot adopt the proof.


Of course you could use Stone duality to reduce the assertions to a completely trivial one (a finite boolean ring in a directed limit of boolean subrings lies in some of these boolean subrings), but I want a direct topological proof.



profinite spaces are the pro-completion of finite sets
Let $f:X \to Z$ be a map to a finite discrete space. Note that each fiber, $f^{-1}(z)$, is both open and closed in $X$. Let $p\_i: X \to X\_i$ be the projection maps. 


Fix some $z \in Z$. Since $f^{-1}(z)$ is open, and the fibers of the maps are a basis, there is an open cover of $f^{-1}(z)$ by sets of the form $p\_i^{-1}(x)$, for $x$ in various $X\_i$. 
Since $f^{-1}(z)$ is closed in a compact space, it is compact. So we can take a finite subcover of this cover. Thus, there is some single index $i$ for which $f^{-1}(z)$ is covered by sets of the form $p\_i^{-1}(x)$, $x \in X\_i$. 


Since $Z$ is finite, there is a single $i$ such that, for every $z \in Z$, the fiber $f^{-1}(z)$ is covered by sets of the form $p\_i^{-1}(x)$, $x \in X\_i$. The map $f$ factors through $X\_i$.


