Proposition prod_monad_algebra_laws : monad_algebra_laws prod_monad_algebra_map. Proof. split. - use (BinProductArrowsEq _ _ _ (BinProductsHSET X Y)). + rewrite !assoc'. etrans. { apply maponpaths. apply (BinProductPr1Commutes _ _ _ (BinProductsHSET X Y)). } rewrite !assoc. rewrite id_left. rewrite <- (nat_trans_ax (η M) _ _ p₁). rewrite !assoc'. rewrite (monad_algebra_unit f). apply idpath. + rewrite !assoc'. etrans. { apply maponpaths. apply (BinProductPr2Commutes _ _ _ (BinProductsHSET X Y)). } rewrite !assoc. rewrite id_left. rewrite <- (nat_trans_ax (η M) _ _ p₂). rewrite !assoc'. rewrite (monad_algebra_unit g). apply idpath. - use (BinProductArrowsEq _ _ _ (BinProductsHSET X Y)). + rewrite !assoc'. etrans. { apply maponpaths. apply (BinProductPr1Commutes _ _ _ (BinProductsHSET X Y)). } refine (!_). etrans. { apply maponpaths. apply (BinProductPr1Commutes _ _ _ (BinProductsHSET X Y)). } rewrite !assoc. rewrite <- functor_comp. etrans. { apply maponpaths_2. apply maponpaths. apply (BinProductPr1Commutes _ _ _ (BinProductsHSET X Y)). } rewrite <- (nat_trans_ax (μ M) _ _ p₁). rewrite functor_comp. rewrite !assoc'. rewrite (monad_algebra_mu f). apply idpath. + rewrite !assoc'. etrans. { apply maponpaths. apply (BinProductPr2Commutes _ _ _ (BinProductsHSET X Y)). } refine (!_). etrans. { apply maponpaths. apply (BinProductPr2Commutes _ _ _ (BinProductsHSET X Y)). } rewrite !assoc. rewrite <- functor_comp. etrans. { apply maponpaths_2. apply maponpaths. apply (BinProductPr2Commutes _ _ _ (BinProductsHSET X Y)). } rewrite <- (nat_trans_ax (μ M) _ _ p₂). rewrite functor_comp. rewrite !assoc'. rewrite (monad_algebra_mu g). apply idpath. Qed.
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.Adjunctions.Core. Require Import UniMath.CategoryTheory.Categories.HSET.All. Require Import UniMath.CategoryTheory.Limits.BinProducts. Require Import UniMath.CategoryTheory.Limits.BinCoproducts. Require Import UniMath.CategoryTheory.Limits.Equalizers. Require Import UniMath.CategoryTheory.Limits.Coequalizers. Require Import UniMath.CategoryTheory.Limits.Products. Require Import UniMath.CategoryTheory.Limits.Preservation. Require Import UniMath.CategoryTheory.DisplayedCats.Core. Require Import UniMath.CategoryTheory.DisplayedCats.Structures.CartesianStructure. Require Import UniMath.CategoryTheory.DisplayedCats.Structures.StructureLimitsAndColimits. Require Import UniMath.CategoryTheory.Monads.Monads.