Section ListDenoteInsert.
Context {A T : Type}.
Variables (f : A -> T) (g : T -> T -> T) (b : T).
Variable (gS : forall x y, g x y = g y x).
Variable (gA : forall x y z, g x (g y z) = g (g x y) z).
Proof with auto.
rewrite listd_perm with (l' := (a :: l))... apply perm_insert.
Qed.

Lemma listd_sort cmp l : listd f g b (rsort cmp l) = listd f g b l.