proposition: Proposition prod_monad_algebra_laws : monad_algebra_laws prod_monad_algebra_map.
proof: 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.
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