repeat constructor; repeat intro.
(* irreflexive *)
destruct x; simpl in *...
(* transitive *)
destruct x; destruct y; destruct z; simpl in *...
do_comp (list_cspec _ pure_atom_cspec) gamma gamma0...
do_comp (list_cspec _ pure_atom_cspec) gamma0 gamma1...
do_comp (list_cspec _ pure_atom_cspec) gamma0 gamma1...
replace (compare_list pure_atom_cmp gamma gamma1)  with Lt by (eapply comp_trans; eauto)...
do_comp (list_cspec _ pure_atom_cspec) gamma gamma0...
do_comp (list_cspec _ pure_atom_cspec) gamma0 gamma1...
do_comp (list_cspec _ pure_atom_cspec) delta delta0...
do_comp (list_cspec _ pure_atom_cspec) delta0 delta1...
do_comp (list_cspec _ pure_atom_cspec) delta0 delta1...
replace (compare_list pure_atom_cmp delta delta1)  with Lt by (eapply comp_trans; eauto)...
do_comp (list_cspec _ pure_atom_cspec) gamma0 gamma1...
replace (compare_list pure_atom_cmp gamma gamma1)  with Lt by (eapply comp_trans; eauto)...
do_comp (list_cspec _ pure_atom_cspec) gamma gamma0...
do_comp (list_cspec _ pure_atom_cspec) gamma0 gamma1...
do_comp (list_cspec _ pure_atom_cspec) delta delta0...
do_comp (list_cspec _ pure_atom_cspec) delta0 delta1...
do_comp (list_cspec _ pure_atom_cspec) delta0 delta1...
replace (compare_list pure_atom_cmp delta delta1)  with Lt by (eapply comp_trans; eauto)...
do_comp (list_cspec _ pure_atom_cspec) gamma0 gamma1...
replace (compare_list pure_atom_cmp gamma gamma1)  with Lt by (eapply comp_trans; eauto)...
(* CompSpec *)
destruct x; destruct y; simpl in *...
do_comp (list_cspec _ pure_atom_cspec) gamma gamma0...
do_comp (list_cspec _ pure_atom_cspec) delta delta0...
do_comp (list_cspec _ pure_atom_cspec) gamma gamma0...
do_comp (list_cspec _ pure_atom_cspec) delta delta0...
do_comp (list_cspec _ space_atom_cspec) sigma sigma0...
do_comp (list_cspec _ pure_atom_cspec) gamma gamma0...
do_comp (list_cspec _ pure_atom_cspec) delta delta0...
do_comp (list_cspec _ space_atom_cspec) sigma sigma0...
Qed.
Hint Resolve clause_cspec.
Definition rev_cmp {A : Type} (cmp : A -> A -> comparison) :=
fun a b => match cmp a b with Eq => Eq | Lt => Gt | Gt => Lt end.

(* Specifications: *)
Lemma rev_cmp_cspec {A} (c: A -> A -> comparison) :
CompSpec' c -> CompSpec' (rev_cmp c).