Let me add one more edit to help explain why this is a serious question. Theorem 5 below is a sort of lattice version of Urysohn's lemma, and *it has essentially the same proof*. Theorem 6, the famous theorem of Raney characterizing completely distributive lattices, is an easy consequence of this result. In other words, a result of basic importance in lattice theory is somehow at heart "the same" as Urysohn's lemma. But "the same" in what sense?

I noticed this weird analogy a long time ago. Is there a good explanation?

A *lattice* is a partially ordered set in which every pair of elements has a least upper bound and a greatest lower bound. Now let me set up some very nonstandard terminology which will show what I am talking about. Say that a lattice is *compact* if every subset has a least upper bound (join) and a greatest lower bound (meet). A map between lattices is *continuous* if it preserves arbitrary (i.e., possibly infinite) joins and meets whenever these exist in the domain. A subset $C$ of a lattice is *closed* if $$x \in C,\,x \leq y \quad\Rightarrow\quad y \in C$$ and $C$ is stable under the formation of arbitrary meets whenever these exist. A subset $U$ is *open* if $x \in U,\,x \leq y \,\Rightarrow \,y \in U$ and the complement of $U$ is stable under the formation of arbitrary joins whenever these exist. A subset is *clopen* if it is both closed and open. A lattice is *totally disconnected* if for every $x \not\leq y$ there is a clopen subset containing $x$ but not $y$. A lattice is *Hausdorff* if for every $x \not\leq y$ there exist a closed set $C$ and an open set $U$ whose union is the whole space and such that $x \in U$, $y \not\in C$.

Note that "closed" and "open" do not refer to any topology. For instance, the union of two closed sets need not be closed. I am aware that every poset carries a natural topology, but that does not seem particularly relevant here.

Now here are some theorems.

**Theorem 1.** Any union of open sets is open, and any intersection of closed sets is closed.

**Theorem 2.** A map between two spaces is continuous if and only if the inverse image of any closed subset is closed and the inverse image of any open set is open.

**Theorem 3.** Any continuous image of a compact space is compact.

**Theorem 4.** A space is totally disconnected if and only if it embeds in a power of the two-element space.

**Theorem 5.** If a space is compact Hausdorff and $x \not\leq y$ then there is a continuous map into $[0,1]$ taking $x$ to $1$ and $y$ to $0$.

**Theorem 6.** Every compact Hausdorff space embeds in a power of $[0,1]$.

**Theorem 7.** Every compact Hausdorff space is the continuous image of a totally disconnected compact Hausdorff space.

(In the usual terminology, a "compact Hausdorff" lattice is a completely distributive complete lattice.)

Each of these statements is true both of topological spaces (replacing $x \not\leq y$ with $x \neq y$ in Theorem 5) and, with my terminology, also of lattices. I am not sure what form a satisfying explanation would take. Is there a broader theory of which topological spaces and lattices are both special cases? Is there some other way of understanding this? Or is it not as remarkable as it seems, and needs no special explanation.

(I'm including a category theory tag because I suspect that may be an arena in which an explanation could be found.)

Edit: I'm getting some feedback (Wallman's generalization of Stone duality, Scott continuity) describing other, as far as I can tell unrelated, connections between lattice theory and topology. Obviously that's not what I'm asking for.

Maybe I should emphasize that Theorem 6 is a serious result about completely distributive lattices, discovered in 1952 by G. N. Raney. From my point of view it is rather easy ... if anyone can show me how to get it out of Wallman's theory, I will retract the preceding comment.