End Transitive.
Hypothesis leT_total : total leT.
Fixpoint merge s1 :=
if s1 is x1 :: s1' then
let fix merge_s1 s2 :=
if s2 is x2 :: s2' then
if leT x2 x1 then x2 :: merge_s1 s2' else x1 :: merge s1' s2
else s1 in
merge_s1
else id.

Lemma rev_sorted (T : eqType) (leT : rel T) s :
sorted leT (rev s) = sorted (fun y x => leT x y) s.