Definition T: MonadTrans := Build_MonadTrans M lift.Definition NatAddMonoid: Monoid.Definition SimplyProfiled: Monad := MonoidMonadTrans.M NatAddMonoid IdMonad.ext.Definition cost {X: Set}: prod nat X -> nat := @fst _ _.Definition result X: SimplyProfiled X -> X := @snd _ _.

Lemma bind_cost (T U: Set) (a: SimplyProfiled T) (b: T -> SimplyProfiled U): cost (bind a b) = cost a + cost (b (result a)).