Definition plain_leb: nat -> nat -> IdMonad.M bool := leb.Definition mle (x y: T): SimplyProfiled bool := (1, le x y).

(* Specifications: *)
Lemma insert_cost (l: list T) (x: T): cost (insert _ mle l x) <= length l.
Lemma fold_insert_cost : forall (x y: list T), cost (foldlM (insert _ mle) y x) <= length y * length x + div2 (sqrd (length x)).
Theorem insertion_sort_quadratic: forall (l: list T), cost (isort _ mle l) <= div2 (sqrd (length l)).