Section contents.
Variable E: sort_order.E.
Definition M: Monad := MonoidMonadTrans.M NatAddMonoid ne_tree_monad.ext.
Definition cmp (x y: E): M comparison :=
@ret ne_tree_monad.M _ (1%nat, sort_order.Ecmp E x y).
Definition pick := monoid_tree_monad.pick NatAddMonoid.
Proof MonoidMonadTrans.Mext NatAddMonoid ne_tree_monad.ext.

Lemma partition d l: partition M cmp d l = ne_tree.Leaf (length l, qs_definitions.simplerPartition E d l).