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 _ _.

(* Specifications: *)
Lemma bind_cost (T U: Set) (a: SimplyProfiled T) (b: T -> SimplyProfiled U): cost (bind a b) = cost a + cost (b (result a)).
Lemma return_cost (T: Set) (x: T): cost (@ret SimplyProfiled T x) = 0.
Lemma SimplyProfiled_ext: extMonad SimplyProfiled.