I have been thinking a bit about rings of continuous functions of various kinds -- how they motivate the more modern notion of the Zariski topology on the prime spectrum as well as how they fit into a more general picture. (The commutative algebra course that I had mentioned in an earlier question has recently begun.) Here are two constructions which I have been thinking a lot about:

For $X$ an arbitrary topological space, let $C(X)$ be the ring of continuous $\mathbb{R}$-valued functions on $X$. One has a canonical map $\mathcal{M}: X \rightarrow \operatorname{MaxSpec} C(X)$ by taking $x$ to the maximal ideal $\mathfrak{m}_x$ of all functions vanishing at $x$. This map is continuous when the codomain is given the Zariski topology (e.g. as a subspace of the Zariski topology on the prime spectrum: but really, just take the same definition and restrict to maximal ideals.)

When $X$ is compact (by which I mean quasi-compact and Hausdorff) I proved in class that $\mathcal{M}$ is a homeomorphism. This was not as graceful as I might have hoped: I found myself having to introduce an auxiliary topology on the maximal spectrum -- the "initial", "weak" or "Gelfand" topology -- to see that it was Hausdorff and then only after having shown that $\mathcal{M}$ is a homeomorphism with the Gelfand topology did I deduce that the Gelfand topology coincides with the Zariski topology (using the characteristic property of Tychonoff spaces that any closed set is an intersection of zero sets of continuous functions).

I mentioned that the following are true in the general case:

(i) $\operatorname{MaxSpec} C(X)$ is compact in the Zariski topology. Therefore $X_T := \mathcal{M}(X)$, endowed with the subspace topology is Tychonoff.

(ii) In fact $\mathcal{M}: X \rightarrow X_T$ is the universal Tychonoff space on $X$ and the induced map $C(X_T) \rightarrow C(X)$ is an isomorphism of rings. (So we may as well assume $X$ is Tychonoff.)

(iii) For any Tychonoff space $X$, $\mathcal{M}: X \rightarrow \operatorname{MaxSpec} C(X)$ is nothing else than the **Stone-Cech compactification**.

I am still looking for a nice, self-contained reference for these facts. Gillman and Jerison's classic text has most of them, but spread out over a fairly large number of pages. For instance, can it be so hard to see that $\operatorname{MaxSpec} C(X)$ is Hausdorff no matter what $X$ is? I am struggling even with that!

The upshot here is that taking the ring of $\mathbb{R}$-valued functions and then the maximal spectrum has the effect of passing from an arbitrary space $X$ to its universal compact space. I find this very interesting.

Now consider $C_2(X)$, the ring of continuous functions from $X$ to $\mathbb{F}_2$ (the latter endowed with the discrete topology: what else?). It now seems that the above discussion goes through with "universal compact space" replaced by "universal Boolean (= compact and totally disconnected) space", and that this is a slightly different (better?) take on Stone duality than the one I wrote up in my notes.

But actually in between $\mathbb{R}$ and $\mathbb{F}_2$ I did something that is maybe silly: I threw off a remark to my students that it seemed interesting to think about the case of $\mathbb{Q}_p$-valued functions. But (without having written anything down, so I could well be mistaken) I now think that although the rings one gets in this way are of course not Boolean, their spectra still comprise precisely the Boolean spaces...and that maybe the same holds for functions with values in any totally disconnected topological field. Is this really the case?

The above is pretty rambly, so let me end with one crisp question which is at least part of what's eating me:

Can one characterize the commutative rings with Hausdorff maximal spectrum? Or with Boolean maximal spectrum? Or with maximal spectrum some other interesting class of compact spaces?