https://hal.inria.fr/hal-03112866Katsumata, Shin-YaShin-YaKatsumataNII - National Institute of InformaticsRivas, ExequielExequielRivasPROSECCO - Programming securely with cryptography - Inria de Paris - Inria - Institut National de Recherche en Informatique et en AutomatiqueUustalu, TarmoTarmoUustaluReykjavík University - Reykjavík UniversityTTÜ - Tallinn University of TechnologyInteraction Laws of Monads and ComonadsHAL CCSD2020[INFO.INFO-LO] Computer Science [cs]/Logic in Computer Science [cs.LO][INFO.INFO-PL] Computer Science [cs]/Programming Languages [cs.PL]Rivas Gadda, Exequiel2021-01-17 19:12:052022-07-05 08:39:092021-01-17 19:12:05enConference papers10.1145/3373718.33948081We introduce and study functor-functor and monad-comonad interaction laws as math-ematical objects to describe interaction of effectful computations with behaviors of effect-performingmachines. Monad-comonad interaction laws are monoid objects of the monoidal category of functor-functor interaction laws. We show that, for suitable generalizations of the concepts of dual andSweedler dual, the greatest functor resp. monad interacting with a given functor or comonad is itsdual while the greatest comonad interacting with a given monad is its Sweedler dual. We relatemonad-comonad interaction laws to stateful runners. We show that functor-functor interaction lawsare Chu spaces over the category of endofunctors taken with the Day convolution monoidal struc-ture. Hasegawa’s glueing endows the category of these Chu spaces with a monoidal structure whosemonoid objects are monad-comonad interaction laws.