Proposition nat_trans_from_kleisli_cat_monad_enrichment {C' : category} (E' : enrichment C' V) {G₁ G₂ : Kleisli_cat_monad M ⟶ C'} (EG₁ : functor_enrichment G₁ Kleisli_cat_monad_enrichment E') (EG₂ : functor_enrichment G₂ Kleisli_cat_monad_enrichment E') {α : Left_Kleisli_functor M ∙ G₁ ⟹ Left_Kleisli_functor M ∙ G₂} (Eα : nat_trans_enrichment α (functor_comp_enrichment Left_Kleisli_functor_enrichment EG₁) (functor_comp_enrichment Left_Kleisli_functor_enrichment EG₂)) (p : ∏ (x : C), # G₁ (kleisli_monad_nat_trans M x) · α x = α (M x) · # G₂ (kleisli_monad_nat_trans M x)) : nat_trans_enrichment (nat_trans_from_kleisli_cat_monad M α p) EG₁ EG₂. Proof. use nat_trans_enrichment_via_comp. intros x y ; cbn. pose (maponpaths (λ z, z · postcomp_arr _ _ (#G₂ (kleisli_monad_nat_trans M y))) (nat_trans_enrichment_to_comp Eα x _)) as q ; cbn in q. refine (_ @ q @ _) ; clear q. - rewrite !assoc'. rewrite precomp_postcomp_arr. rewrite !assoc. apply maponpaths_2. rewrite !assoc'. refine (!_). etrans. { apply maponpaths. apply (functor_enrichment_postcomp_arr EG₂). } rewrite !assoc. refine (_ @ id_left _). apply maponpaths_2. rewrite Kleisli_cat_enrichment_postcomp_arr. refine (!(postcomp_arr_comp E _ _) @ _ @ postcomp_arr_id _ _ _). apply maponpaths. rewrite !assoc. etrans. { apply maponpaths_2. exact (!(nat_trans_ax (η M) _ _ _)). } cbn. rewrite id_left. apply Monad_law1. - rewrite !assoc'. rewrite <- postcomp_arr_comp. etrans. { do 3 apply maponpaths. exact (!(p y)). } cbn. rewrite postcomp_arr_comp. rewrite !assoc. apply maponpaths_2. rewrite !assoc'. etrans. { apply maponpaths. apply (functor_enrichment_postcomp_arr EG₁). } rewrite !assoc. refine (_ @ id_left _). apply maponpaths_2. rewrite Kleisli_cat_enrichment_postcomp_arr. refine (!(postcomp_arr_comp E _ _) @ _ @ postcomp_arr_id _ _ _). apply maponpaths. rewrite !assoc. etrans. { apply maponpaths_2. exact (!(nat_trans_ax (η M) _ _ _)). } cbn. rewrite id_left. apply Monad_law1. Qed.
Require Import UniMath.Foundations.All. Require Import UniMath.MoreFoundations.All. Require Import UniMath.CategoryTheory.Core.Categories. Require Import UniMath.CategoryTheory.Core.Isos. Require Import UniMath.CategoryTheory.Core.Univalence. Require Import UniMath.CategoryTheory.Core.Functors. Require Import UniMath.CategoryTheory.Core.NaturalTransformations. Require Import UniMath.CategoryTheory.EnrichedCats.Enrichment. Require Import UniMath.CategoryTheory.EnrichedCats.EnrichmentFunctor. Require Import UniMath.CategoryTheory.EnrichedCats.EnrichmentTransformation. Require Import UniMath.CategoryTheory.EnrichedCats.EnrichmentMonad. Require Import UniMath.CategoryTheory.Monoidal.Categories. Require Import UniMath.CategoryTheory.Monads.Monads. Require Import UniMath.CategoryTheory.Monads.KleisliCategory. Section FunctorFromKleisli. End FunctorFromKleisli.