proposition: Lemma pair_compare_trans : SymTrans cmpA -> Trans cmpB -> Trans pair_compare.
proof: Proof. intros HA HB c (x,x') (y,y') (z,z') Hxy Hyz. simpl in *. destruct (cmpA x y) eqn:Cxy; simpl. - rewrite SymTrans_CompatL; eauto. destruct (cmpA y z) eqn:Cyz; simpl; eauto. - subst c. destruct (cmpA y z) eqn:Cyz; simpl; try easy. + flipcmp Cyz. rewrite SymTrans_CompatR, Cxy; eauto. + rewrite tra; eauto. easy. - subst c. destruct (cmpA y z) eqn:Cyz; simpl; try easy. + flipcmp Cyz. rewrite SymTrans_CompatR, Cxy; eauto. + rewrite tra; eauto. easy. Qed.
imports: Coq(List)