proposition: Proposition mor_from_free_alg_eq {X : hSet} {Y : category_of_monad_algebra} {f g : monad_free_alg_functor X --> Y} (p : η M X · pr1 f = η M X · pr1 g) : f = g.
proof: Proof. refine (!(id_left _) @ _ @ id_left _). etrans. { apply maponpaths_2. refine (!_). exact (triangle_id_left_ad (pr2 monad_underlying_is_right_adjoint) X). } refine (!_). etrans. { apply maponpaths_2. refine (!_). exact (triangle_id_left_ad (pr2 monad_underlying_is_right_adjoint) X). } refine (!_). rewrite !assoc'. use subtypePath. { intro ; apply homset_property. } enough (# M (η M X · η M (M X)) · μ M (M X) · (# M (identity _) · μ M X · pr1 f) = # M (η M X · η M (M X)) · μ M (M X) · (# M (identity _) · μ M X · pr1 g)) as q. { exact q. } rewrite !functor_id. rewrite id_left. etrans. { apply maponpaths. exact (pr2 f). } refine (!_). etrans. { apply maponpaths. exact (pr2 g). } refine (!_). rewrite !assoc. apply maponpaths_2. rewrite !functor_comp. rewrite !assoc'. rewrite !(maponpaths (λ z, _ · z) (assoc _ _ _)). etrans. { apply maponpaths. apply maponpaths_2. exact (@Monad_law2 _ M (M X)). } refine (!_). etrans. { apply maponpaths. apply maponpaths_2. exact (@Monad_law2 _ M (M X)). } refine (!_). rewrite !id_left. rewrite <- !functor_comp. apply maponpaths. exact p. Qed.
imports: UniMath.MoreFoundations.All UniMath.CategoryTheory.Core.Categories UniMath.CategoryTheory.Core.Functors UniMath.CategoryTheory.Core.NaturalTransformations UniMath.CategoryTheory.Adjunctions.Core UniMath.CategoryTheory.Categories.HSET.All UniMath.CategoryTheory.Limits.BinProducts UniMath.CategoryTheory.Limits.BinCoproducts UniMath.CategoryTheory.Limits.Equalizers UniMath.CategoryTheory.Limits.Coequalizers UniMath.CategoryTheory.Limits.Products UniMath.CategoryTheory.Limits.Preservation UniMath.CategoryTheory.DisplayedCats.Core UniMath.CategoryTheory.DisplayedCats.Structures.CartesianStructure UniMath.CategoryTheory.DisplayedCats.Structures.StructureLimitsAndColimits UniMath.CategoryTheory.Monads.Monads