Definition deriv_dist (T : Monad C) : (T ∙ maybe_monad) ⟹ (maybe_monad ∙ T) := coproduct_nat_trans C C co (constant_functor C C o) T (functor_deriv T) (nat_trans_comp _ _ _ (coproduct_nat_trans_in1 C C co (constant_functor C C o) (functor_identity C)) (pre_whisker maybe_monad (η T))) (post_whisker (coproduct_nat_trans_in2 C C co (constant_functor C C o) (functor_identity C)) T). Local Lemma deriv_dist_law1 (T : Monad C) : ∏ x : C, BinCoproductIn2 (co o (T x)) · BinCoproductArrow _ (BinCoproductIn1 _ · η T _) (#T (BinCoproductIn2 _)) = #T (BinCoproductIn2 (co o x)). Proof. intro x. now rewrite BinCoproductIn2Commutes. Defined.
Require Import UniMath.Foundations.PartD. Require Import UniMath.Foundations.Propositions. Require Import UniMath.Foundations.Sets. Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.CategoryTheory.Core.Categories. Require Import UniMath.CategoryTheory.Core.Isos. Require Import UniMath.CategoryTheory.Core.Functors. Require Import UniMath.CategoryTheory.Core.NaturalTransformations. Require Import UniMath.CategoryTheory.Monads.Monads. Require Import UniMath.CategoryTheory.Limits.BinCoproducts. Require Import UniMath.CategoryTheory.PrecategoryBinProduct. Require Import UniMath.CategoryTheory.whiskering. Require Import UniMath.CategoryTheory.Monads.LModules.