Mac Lane’s Comparison Theorem for the Kleisli Construction Formalized in Coq

Burak Ekici, Cezary Kaliszyk

Mathematics in Computer Science, 14, pp. 533 – 549, 2020.


(co)Monads are used to encapsulate impure operations of a computation. A (co)monad is determined by an adjunction and further determines a specific type of adjunction called the (co)Kleisli adjunction. Mac Lane introduced the comparison theorem which allows comparing these adjunctions bridged by a (co)monad through a unique comparison functor. In this paper we specify the foundations of category theory in Coq and show that the chosen representations are useful by certifying Mac Lane’s comparison theorem and its basic consequences. We also show that the foundations we use are equivalent to the foundations by Timany. The formalization makes use of Coq classes to implement categorical objects and the axiom uniqueness of identity proofs to close the gap between the contextual equality of objects in a categorical setting and the judgmental Leibniz equality of Coq. The theorem is used by Duval and Jacobs in their categorical settings to interpret the state effect in impure programming languages.


  PDF |    doi:10.1007/s11786-020-00450-8  


author = {Burak Ekici and Cezary Kaliszyk},
title = {{M}ac {L}ane's Comparison Theorem for the {K}leisli Construction Formalized in {C}oq},
journal = {Math. Comput. Sci.},
volume = {14},
number = {3},
pages = {533--549},
year = {2020},
url = {},
doi = {10.1007/s11786-020-00450-8},
Nach oben scrollen