The Formal Theory of Monads, Univalently

Type: Article
Publication Date: 2025-02-19
Citations: 0
DOI: https://doi.org/10.46298/lmcs-21(1:16)2025

Abstract

We develop the formal theory of monads, as established by Street, in univalent foundations. This allows us to formally reason about various kinds of monads on the right level of abstraction. In particular, we define the bicategory of monads internal to a bicategory, and prove that it is univalent. We also define Eilenberg-Moore objects, and we show that both Eilenberg-Moore categories and Kleisli categories give rise to Eilenberg-Moore objects. Finally, we relate monads and adjunctions in arbitrary bicategories. Our work is formalized in Coq using the UniMath library.

Locations

  • Logical Methods in Computer Science
  • arXiv (Cornell University)

Ask a Question About This Paper

Summary

This paper significantly advances the formal theory of monads within the framework of univalent foundations (UF). The central innovation is the development of a formalized treatment of monads that allows for reasoning about them at a high level of abstraction, capturing various kinds of monads within a single, coherent framework. Crucially, the authors formalize and prove that the bicategory of monads is univalent. This means equality between monads in the formalization corresponds to a suitable notion of equivalence, a crucial property in UF.

Key innovations and contributions include:

  1. Formalization in UF: Translating Street’s formal theory of monads into univalent foundations using Coq and the UniMath library. This enables the use of homotopy type theory (HoTT) principles like univalence for reasoning about monads.

  2. Univalence of the Bicategory of Monads: Demonstrating that the constructed bicategory of monads in UF is univalent. This is crucial for ensuring that the formal notion of equality between monads corresponds to equivalence, allowing for robust reasoning in UF.

  3. Eilenberg-Moore Objects: Defining Eilenberg-Moore objects within this framework and showing that both Eilenberg-Moore categories and Kleisli categories give rise to Eilenberg-Moore objects, bridging the gap between these two fundamental constructions.

  4. Monads and Adjunctions: Relating monads and adjunctions in arbitrary bicategories, proving both that every adjunction gives rise to a monad, and conversely, under certain conditions, every monad gives rise to an adjunction. This captures the fundamental connection between monads and adjunctions at a high level of generality.

  5. Kleisli Categories in UF: Addressing the challenges of defining Kleisli categories in UF, particularly in ensuring univalence, and providing a correct construction based on Rezk completion. The authors prove that in univalent foundations every monad gives rise to an adjunction via the Kleisli category.

Main prior ingredients needed for this work include:

  • Bicategory theory: An understanding of bicategories as a generalization of categories, including objects, 1-cells, and 2-cells, along with their composition laws and coherence conditions. Street’s original formal theory of monads relies on this structure.
  • Univalent Foundations (HoTT): Familiarity with UF, including the univalence axiom and its consequences, like function extensionality and proof relevance.
  • Formalization in Coq: Expertise in using the Coq proof assistant for formalizing mathematical concepts and proving theorems, as the work is implemented using Coq and relies on the UniMath library.
  • Eilenberg-Moore categories: Familiarity with Eilenberg-Moore categories (aka the category of algebras for a monad).
  • Kleisli categories: Familiarity with Kleisli categories (aka the category of free algebras for a monad).

Similar Works

Action Title Date Authors
The Formal Theory of Monads, Univalently 2022-01-01 Niels van der Weide
+
Towards a Formal Theory of Graded Monads 2016-01-01 Soichiro Fujii Shin-ya Katsumata Paul-André Melliès
Univalent Monoidal Categories 2022-01-01 Kobe Wullaert Ralph Matthes Benedikt Ahrens
Univalent Monoidal Categories 2023-07-28 Kobe Wullaert Ralph Matthes Benedikt Ahrens
+
The formal theory of monads II 2002-11-01 Stephen Lack Ross Street
+
The graphical theory of monads 2025-01-01 Ralf Hinze Dan Marsden
The internal languages of univalent categories 2024-11-10 Niels van der Weide
Eilenberg–Moore Monoids and Backtracking Monad Transformers 2016-04-01 Maciej Piróg
Bicategories in univalent foundations 2021-11-01 Benedikt Ahrens Dan Frumin Marco Maggesi Niccolò Veltri Niels van der Weide
+
Strong functors and monoidal monads 1972-12-01 Anders Kock
Induction, Coinduction, and Fixed Points in Order Theory, Set Theory, (PL) Type Theory, Logic, and Category Theory: A Concise Survey (and Tutorial) 2018-12-25 Moez A. AbdelGawad
Monads Need Not Be Endofunctors 2010-01-01 Thorsten Altenkirch James Chapman Tarmo Uustalu
Bicategories in Univalent Foundations 2019-03-04 Benedikt Ahrens Dan Frumin Marco Maggesi Niccolò Veltri Niels van der Weide
Monads need not be endofunctors 2015-03-06 Thosten Altenkirch James Chapman Tarmo Uustalu
+
Monads and their Eilenberg-Moore algebras in functional analysis 1973-01-01 Zbigniew Semadeni
Induction, Coinduction, and Fixed Points: A Concise Survey (and Tutorial) 2018-12-25 Moez A. AbdelGawad
Univalent Double Categories 2023-01-01 Niels van der Weide Nima Rasekh Benedikt Ahrens Paige Randall North
Induction, Coinduction, and Fixed Points: A Concise Survey 2018-12-25 Moez A. AbdelGawad
Implementing a category-theoretic framework for typed abstract syntax 2022-01-11 Benedikt Ahrens Ralph Matthes Anders Mörtberg
From Signatures to Monads in UniMath 2018-07-11 Benedikt Ahrens Ralph Matthes Anders Mörtberg

Cited by (0)

Action Title Date Authors

Citing (0)

Action Title Date Authors