intros x y z H H0; destruct (compare x z) as [Hlt|Heq|Hlt]; auto.
- elim (lt_not_eq H0); apply eq_trans with x...
- elim (lt_not_eq (lt_trans H0 Hlt))...
Qed.
#[global]
Instance lt_compat : Proper (eq==>eq==>iff) lt.
apply proper_sym_impl_iff_2; auto with *.
intros x x' Hx y y' Hy H.
apply eq_lt with x; auto with ordered_type.
apply lt_eq with y; auto.
Qed.

Lemma elim_compare_gt :
forall x y : t,
lt y x -> exists H : lt y x, compare x y = GT H.