Given a set $X$, let $\beta X$ denote the set of ultrafilters. The following theorems are known:

  • $X$ canonically embeds into $\beta X$ (by taking principal ultrafilters);
  • If $X$ is finite, then there are no non-principal ultrafilters, so $\beta X = X$.
  • If $X$ is infinite, then (assuming choice) we have $|\beta X| = 2^{2^{|X|}}$.

These are reminiscent of similar claims that can be made about vector spaces and double duals:

  • $V$ canonically embeds into $V^{\star \star}$;
  • If $V$ is finite-dimensional, then we have $V = V^{\star \star}$;
  • If $V$ is infinite-dimensional, then (assuming choice) we have $\dim(V^{\star \star}) = 2^{2^{\dim(V)}}$.

This suggests that the operation of taking the collection of ultrafilters on a set can be viewed as a double iterate of some 'duality' of sets. Can this be made precise: that is to say, is there some notion of a 'dual' of a set $X$, $\delta X$, such that the following are true?

  • The double dual $\delta \delta X$ is (canonically isomorphic to) the set $\beta X$ of ultrafilters on $X$;
  • If $X$ is finite, then $|\delta X| = |X|$ (but not canonically so);
  • If $X$ is infinite, then (assuming choice) $|\delta X| = 2^{|X|}$.

Apart from the tempting analogy between $\beta X$ and $V^{\star \star}$, further evidence for this conjecture is that $\beta$ can be given the structure of a monad (the 'ultrafilter monad'), and monads can be obtained from a pair of adjunctions.

  • 29
    $\begingroup$ Well, one of the very first things that comes to mind that's sort of in this vein is that $\beta X = \hom_{\text{Bool}}(\hom_{\text{Set}}(X, 2), 2)$. But if you want to pursue your analogy at a deeper level, try golem.ph.utexas.edu/category/2012/09/…, where both the ultrafilter monad and the double dualization monad are reckoned to be codensity monads induced by the full inclusions of finitary objects. $\endgroup$
    – Todd Trimble
    Mar 7, 2019 at 15:43
  • 3
    $\begingroup$ Close to Todd's comment, I'd view $\beta X$ as $F(X)=\mathrm{hom}_{\mathrm{Bool}}(\mathrm{hom}_{\mathrm{Top}}(X,\mathbf{Z}/2\mathbf{Z}))$. In general, I guess that for a topological space $X$, the map $X\to F(X)$ is the initial object for the category of continuous maps from $X$ to compact Hausdorff totally disconnected topological spaces. A difference with taking biduals is that $F(F(X))=F(X)$ by Stone duality. $\endgroup$
    – YCor
    Mar 7, 2019 at 16:17
  • 3
    $\begingroup$ Well, one major difference is that without choice it is always the case that $X$ embeds into $\beta X$, it's just not provable that the embedding is not surjective; whereas $V^*$ might be trivial, let alone $V^{**}$, even though $V$ isn't. $\endgroup$
    – Asaf Karagila
    Mar 7, 2019 at 16:30
  • $\begingroup$ (My point above, is that the canonical embedding of $V$ into $V^{**}$ uses choice in a subtle way, whereas the canonical embedding of $X$ into $\beta X$ does not.) $\endgroup$
    – Asaf Karagila
    Mar 8, 2019 at 8:57
  • $\begingroup$ @AsafKaragila Interesting, never thought of it - can one prove anything about the kernel of $V\to V^{**}$ without choice? Could you recommend a text about those things? $\endgroup$ Mar 8, 2019 at 11:55

2 Answers 2


This is a quite standard idea in functional analysis. Let $X$ be any set and let $c_0(X)$ be the space of all functions from $X$ to $\mathbb{C}$ which go to zero at infinity. Then the algebra homomorphisms from $c_0(X)$ to $\mathbb{C}$ are precisely the point evaluations at elements of $X$, i.e., the spectrum of $c_0(X)$ is naturally identified with $X$.

Going to the second dual we get $l^\infty(X)$, the space of all bounded functions from $X$ to $\mathbb{C}$, whose spectrum is naturally identified with $\beta X$.

[deleted an additional comment which wasn't accurate]

  • 5
    $\begingroup$ What does it mean for a function from a set $X$ to $\mathbb{C}$ to "go to zero at infinity"? $\endgroup$ Mar 7, 2019 at 19:28
  • 11
    $\begingroup$ For any $\epsilon > 0$, there is a finite subset of $X$ off of which $|f(x)| \leq \epsilon$. $\endgroup$
    – Nik Weaver
    Mar 7, 2019 at 19:36
  • 8
    $\begingroup$ Equivalently, the extension of $f$ to the one point compactification of $X$ (with the discrete topology) which sets $f(\infty) = 0$ is continuous. Hence "goes to zero at infinity". $\endgroup$
    – Nik Weaver
    Mar 7, 2019 at 19:38
  • 3
    $\begingroup$ @NikWeaver Elegant! This essentially answers both of my questions, namely why the analogy exists, and also why the 'half-iterate' $\delta X$ cannot be defined: when you take the first dual of $c_0(X)$, the result is not a C*-algebra, so you can't take its spectrum. But the double dual $l^{\infty}(X)$ is a C*-algebra, so you can indeed take its spectrum, and you get $\beta X$. $\endgroup$ Mar 8, 2019 at 14:57
  • 2
    $\begingroup$ Yes, that's right. The first duals generally don't even have a preferred product, so there's nothing like a spectrum. $\endgroup$
    – Nik Weaver
    Mar 8, 2019 at 16:25

This is an elaboration on Todd Trimble's comment about Tom Leinster's lovely posts about codensity monads. I quite like the codensity monad story; here is my preferred way of telling it.

Suppose you have a functor $F : C \to D$. A general question to ask about it is this:

What additional structure, beyond being objects in $D$, do the objects $F(c) \in D$ canonically have, by virtue of having been spit out by $F$?

A simple construction is that the objects $F(c)$ canonically admit an action by the automorphism group $\text{Aut}(F)$ of $F$ as a functor, more or less by definition, and more generally by the endomorphism monoid of $F$. This observation can already be used to motivate Weyl groups and Hecke algebras.

A more elaborate construction is that if $F$ admits a left adjoint $G : D \to C$, then the objects $F(c)$ canonically admit an action by the monad $T = FG : D \to D$, by which I mean they are canonically algebras over this monad. In nice cases (see monadic adjunction and monadicity theorem) this completely characterizes $C$ in terms of $D$ and $T$, for example if $D = \text{Set}$ and $C$ is a typical algebraic category such as groups, rings, modules. A more unusual example here is that $C$ can be compact Hausdorff spaces, and then $T$ is the ultrafilter monad.

But there's an even more general construction than this, which can be motivated in several ways. Here's one. Suppose a monoidal category $M$ acts by endomorphisms on a category $E$, meaning we have a monoidal functor $M \to [E, E]$, where $[E, E]$ is the monoidal category of endofunctors $E \to E$. This is the minimal setup we need to talk about a monoid $m \in M$ acting on an object $e \in E$; see this blog post where I use this setup to motivate the definition of a monad.

Now, given an object $e \in E$, we can ask for the universal monoid in $M$ which acts on $e$, which is an "$M$-internal" notion of the endomorphism monoid of $e$. This monoid $m \in M$, if it exists, is defined by the universal property that maps $n \to m$ of monoids are in natural bijection with actions of $n$ on $e$. If $M = [E, E]$, then this construction, when it exists, recovers the endomorphism monad of $e$. If $E = M$ acting on itself by left multiplication, then this construction, when it exists, recovers the internal endomorphism object of $e$.

In our setting we want to apply this construction to $E = [C, D]$ and $M = [D, D]$, where $[D, D]$ acts on $[C, D]$ by postcomposition. That is, we want a monad $T : D \to D$ which universally acts on a functor $F : C \to D$ in the sense that maps of monads to $T$ are in natural bijection with actions of monads on $F$.

Claim: This monad, if it exists, is the codensity monad of $F$.

(I don't have a reference for this, although it's closely related to the definition of the codensity monad as the right Kan extension of $F$ along itself; I remember convincing myself of this a few years ago, around the time I wrote this blog post on monads, and then I never wrote up the details. Welp.)

Now the really fun fact, which Todd Trimble alludes to above, is:

The codensity monad of the inclusion $\text{FinSet} \to \text{Set}$ is the ultrafilter monad, and the codensity monad of the inclusion $\text{FinVect} \to \text{Vect}$ is the double dual monad.

This sets up a lovely analogy between compact Hausdorff spaces (algebras over the ultrafilter monad) and whatever algebras over the double dual monad are; Tom and Todd call them "linearly compact vector spaces" but my preferred terminology here is just "profinite vector spaces," in that the category is precisely $\text{Pro}(\text{FinVect})$.

  • $\begingroup$ There is a kind of "double dual" in this story, by the way: one way to describe the codensity monad of $F : C \to D$, if $C$ is essentially small and $D$ has small limits, is that it's the monad associated to the adjunction between $D$ and $[C, \text{Set}]^{op}$ whose left adjoint sends $d \in D$ to the functor $\text{Hom}(d, F(-)) : C \to \text{Set}$. When $F$ is the inclusion of finite sets into sets this is a disguised form of $\beta X$ and when $F$ is the inclusion of finite-dimensional vector spaces into vector spaces this is a disguised form of taking the dual. $\endgroup$ Mar 9, 2019 at 20:39
  • $\begingroup$ (Then the right adjoint is the "second dual," although it's a bit trickier to describe.) $\endgroup$ Mar 9, 2019 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.