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_lt :
forall x y : t,
lt x y -> exists H : lt x y, compare x y = LT H.