Skip to main content Accessibility help
×
Hostname: page-component-848d4c4894-v5vhk Total loading time: 0 Render date: 2024-07-04T18:22:15.125Z Has data issue: false hasContentIssue false

5 - Monads, Comonads and Distributive Laws

Published online by Cambridge University Press:  22 December 2016

Bart Jacobs
Affiliation:
Radboud Universiteit Nijmegen
Get access

Summary

Monads and comonads – the duals of monads – form one of the basic notions in category theory, like adjunction. A monad is a special kind of endofunctor with some additional structure (unit and multiplication), a bit like for a monoid. Various computationally relevant functors are actually monads: lift, list, powerset, multiset, distribution. Associated with a (co)monad two categories are of interest.

  1. • The Kleisli category captures the computations associated with a (co)monad. Coalgebras can be described within such Kleisli categories, namely as endomaps, and the Kleisli structure can be used for sequential composition of coalgebras. A prominent application involves final coalgebra inside such Kleisli categories. It gives a systematic description of so-called trace semantics; see Section 5.3.

  2. • The Eilenberg–Moore category contains (co)algebras for a (co)monad as objects. They are the mathematical structures associated with the (co)monad. Where (co)algebras of a functor describe only operations, (co)algebras of a (co)monad additionally capture constraints, in the form of equations or other assertions. Many standard mathematical structures, such as monoids, vector spaces and complete lattices, are algebras of a monad. A systematic, uniform description of such structures is convenient, since it gives many results at once, such as the existence of limit and colimits.

Most of the material in this chapter is standard (basic) category theory. It is presented here with a special focus on the context of coalgebras as dynamical state-based systems. Section 5.1 introduces the basic definitions, together with the main examples. Kleisli categories will be discussed in Section 5.2, with an emphasis on the lifting of functors to such categories. These liftings play an important role in Section 5.3, on trace semantics. Section 5.4 describes Eilenberg–Moore categories, together with their basic properties. Section 5.5 concludes this chapter with bialgebras, combining both algebras (structure) and coalgebras (behaviour), for the operational semantics of programming languages.

The topic of algebras and coalgebras in combination with assertions is postponed until Chapter 6. Assertions require the notion of invariant, in the coalgebraic case. Once this concept is in place, (co)algebraic specifications can be introduced, as descriptions of (co)algebras satisfying certain logical properties.

Type
Chapter
Information
Introduction to Coalgebra
Towards Mathematics of States and Observation
, pp. 246 - 333
Publisher: Cambridge University Press
Print publication year: 2016

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×