Algebras for the continuation monad?

195 Views Asked by At

Given a monad $(T,\mu,\eta)$, a map $\alpha : TA\to A$ commuting with $\mu$ and $\eta$ is a $T$-algebra.

Given a set $D$, the continuation monad is given by the functor $C:X\mapsto D^{(D^X)}$ (see also here). So an algebra for the continuation monad is a map $D^{(D^A)}\to A$. Interestingly, if we take $D=0$, this corresponds to the law of the excluded middle in logic: $\neg\neg A\to A$. This seems to imply that algebras for the continuation monad can't be constructed easily.

From the question What are the algebras of the double powerset monad?, it seems that for $D=2$ we can take $X$ to be a complete boolean algebra, ie. $X=2^Y$: $$f\mapsto(y\mapsto f(\eta_Y(y))) \quad:\quad 2^{(2^{(2^Y)})}\to2^Y.$$

There is also the free algebra $$\mu_X:CCX\to CX$$

but both of these examples seem a bit contrived. For $D=0$ and $D=1$ there only seem to be trivial examples.

Are there simpler but nontrivial/interesting examples?

1

There are 1 best solutions below

2
On

I asked this same question on zulip some time ago, and we concluded (well, Todd Trimble did teach us ;D) that if $D$ has at least two elements the category of algebras for the continuation monad is $Set^{op}$, or to put it more precisely, $[-,B] : Set^{op}\to Set$ is monadic (note that the continuation monad is the monad of the self-adjoint functor $[-,B]$).

Proof: check each condition in Beck's monadicity.