proposition: Lemma LModule_comp_law2 {D : category} {T : Monad C} {S : Monad C} {a : T ∙ S ⟹ S ∙ T} (l : monad_dist_laws a) (L : LModule T D) : ∏ x : C, #L (#S (μ T x)) · (#L (a x) · lm_mult T L (S x)) = (#L (a (T x)) · lm_mult T L (S (T x))) · (#L (a x) · lm_mult T L (S x)).
proof: Proof. intro x. rewrite assoc. rewrite <- functor_comp. rewrite <- (monad_dist_law3 l). rewrite !functor_comp. rewrite <- assoc. rewrite (LModule_law2 T (S x)). rewrite assoc. rewrite <- (assoc _ (#L (#T (a x)))). etrans. { apply cancel_postcomposition. apply cancel_precomposition. apply (nat_trans_ax (lm_mult T L)). } now rewrite !assoc. Defined.
imports: UniMath.Foundations.PartD UniMath.Foundations.Propositions UniMath.Foundations.Sets UniMath.MoreFoundations.Tactics UniMath.CategoryTheory.Core.Categories UniMath.CategoryTheory.Core.Isos UniMath.CategoryTheory.Core.Functors UniMath.CategoryTheory.Core.NaturalTransformations UniMath.CategoryTheory.Monads.Monads UniMath.CategoryTheory.Limits.BinCoproducts UniMath.CategoryTheory.PrecategoryBinProduct UniMath.CategoryTheory.whiskering UniMath.CategoryTheory.Monads.LModules