(* The Quicksort we'll use is the monadic determinstic one that uses a partition pass, instantiated with the SimplyProfiled monad: *)

Definition counted_cmp (x y: X): SimplyProfiled comparison := (1%nat, Ecmp _ x y).

Lemma partition_result c p l: proj1_sig (result (part p l)) c = filter (fun x => unsumbool (cmp_cmp (Ecmp _ x p) c)) l.