constructive mathematics, realizability, computability
propositions as types, proofs as programs, computational trinitarianism
internalization and categorical algebra
algebra object (associative, Lie, …)
natural deduction metalanguage, practical foundations
type theory (dependent, intensional, observational type theory, homotopy type theory)
computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory
In a category with internal homs , given an object , the continuation monad is the endofunctor .
In computer science this monad (in computer science) is used to model continuation-passing style of programming, and therefore this is called the continuation monad. The idea here is that a morphism in the Kleisli category of the continuation monad, hence a morphism in the original category of the form is much like a map from to only that instead of “returning” its output directly it instead feeds it into a given function which hence continues the computation.
On the category of sets, the functor is monadic (with left adjoint ) whenever .
Thus the Eilenberg-Moore algebras of the continuation monad are equivalent to complete atomic Boolean algebras, as the category of these is equivalent to the opposite of the category of sets.
(This incidentally illustrates the fact that a category can be monadic over in multiple ways. In other words, one should not refer to a category as monadic over , unless everyone agrees to which “forgetful functor” is being considered – better is to refer to a functor as monadic.)
This boils down to the assertion that such an is an injective cogenerator in the category of sets. It is injective because it is a retract of an injective object (using the fact that the subobject classifier is injective), and it cogenerates because there is an injection and cogenerates.
In more detail: an object is (internally) injective if takes (coreflexive) equalizers in to coequalizers in . The subobject classifier is injective (by, for example, the proof of Paré’s theorem for constructing finite colimits in an elementary topos). Since preserves connected limits such as equalizers, we have that takes equalizers to coequalizers, i.e., is injective for any . Then , being a retract of , has the property that takes equalizers in to coequalizers, i.e., preserves coequalizers .
Also reflects isomorphisms. This is because isomorphisms in are precisely epi-monos, and being an internal cogenerator means exactly that is faithful, and faithful functors reflect monos and epis.
Since preserves coequalizers and reflects isomorphisms, we conclude that it is monadic by Beck’s crude monadicity theorem.
As a monad in computer science:
Eugenio Moggi, Exp. 1.1 in: Notions of computation and monads, Information and Computation, 93 1 (1991) [doi:10.1016/0890-5401(91)90052-4, pdf]
Bartosz Milewski, §21.2.7 in: Category Theory for Programmers, Blurb (2019) [pdf, github, webpage, ISBN:9780464243878]
Tarmo Uustalu, p.27 of: Monads and Interaction Lecture 1 [pdf, pdf], lecture notes for MGS 2021 (2021):
The continuation monad is discussed in the generality of linear type theory as the linear double negation monad in
Paul-André Melliès, Nicolas Tabareau, Linear continuation and duality, 2008 (pdf)
Paul-André Melliès, The parametric continuation monad, Mathematical Structures in Computer Science, Festschrift in honor of Corrado Böhm for his 90th birthday (2013). (pdf)
The characterization of algebras is Proposition 10 of
A characterisation of (enriched) monads isomorphic to continuation monads is given in:
Last revised on December 30, 2023 at 12:46:12. See the history of this page for a list of all contributions to it.