Definition functor_to_kleisli_cat_data {C : category} (m : Monad C) : functor_data (Kleisli_cat_monad m) (kleisli_cat m). Proof. use make_functor_data. - refine (λ x, free_alg_em m x ,, hinhpr (x ,, _)). apply identity_z_iso. - refine (λ x y f, _ ,, tt). use make_mor_eilenberg_moore. + exact (# m f · μ m y). + abstract (cbn ; rewrite !assoc ; refine (maponpaths (λ z, z · _) (!(nat_trans_ax (μ m) _ _ f)) @ _) ; cbn ; rewrite !functor_comp ; rewrite !assoc' ; apply maponpaths ; refine (!_) ; apply Monad_law3). Defined.
Require Import UniMath.Foundations.All. Require Import UniMath.MoreFoundations.All. Require Import UniMath.CategoryTheory.Core.Categories. Require Import UniMath.CategoryTheory.Core.Functors. Require Import UniMath.CategoryTheory.Core.NaturalTransformations. Require Import UniMath.CategoryTheory.Core.Isos. Require Import UniMath.CategoryTheory.Core.Univalence. Require Import UniMath.CategoryTheory.Categories.EilenbergMoore. Require Import UniMath.CategoryTheory.Subcategory.Core. Require Import UniMath.CategoryTheory.Subcategory.Full. Require Import UniMath.CategoryTheory.Monads.Monads. Require Import UniMath.CategoryTheory.Monads.KleisliCategory. Require Import UniMath.CategoryTheory.whiskering. Require Import UniMath.CategoryTheory.PrecompEquivalence.