Definition Elt: Prop := Ecmp _ x y = Lt.Definition Egt: Prop := Ecmp _ x y = Gt.Definition Ele: Prop := Ecmp _ x y <> Gt.Definition Ege: Prop := Ecmp _ x y <> Lt.Definition Eltb: bool := match Ecmp _ x y with Lt => true | _ => false end.Definition Egtb: bool := match Ecmp _ x y with Gt => true | _ => false end.Definition Eleb: bool := match Ecmp _ x y with Gt => false | _ => true end.Definition Egeb: bool := match Ecmp _ x y with Lt => false | _ => true end.

(* Specifications: *)
Lemma Eltb_true: Elt <-> Eltb = true.
Lemma Egtb_true: Egt <-> Egtb = true.
Lemma Eleb_true: Ele <-> Eleb = true.
Lemma Egeb_true: Ege <-> Egeb = true.
Lemma Elt_irrefl x: ~ Elt x x.
Lemma Ele_dec x y: decision (Ele x y).
Lemma Ecmp_refl x: Ecmp e x x = Eq.
Lemma Ele_le_dec x y: { Ele x y } + { Ele y x }.
Lemma Ecmp_inv_sym x y c: Ecmp e x y <> CompOpp c -> Ecmp e y x <> c.
Lemma Ele_Ege x y: Ele x y -> Ege y x.
Lemma Ege_Ele x y: Ege x y -> Ele y x.
Lemma Ecmp_le_lt_trans: forall x y z, Ele x y -> Ecmp e y z = Lt -> Ecmp e x z = Lt.
Lemma Ecmp_lt_le_trans: forall x y z, Ecmp e x y = Lt -> Ele y z -> Ecmp e x z = Lt.
Lemma Ecmp_ge_gt_trans: forall x y z, Ege x y -> Ecmp e y z = Gt -> Ecmp e x z = Gt.
Lemma EO: preorder _ Ele.
Lemma Ege_preorder: preorder _ Ege.
Lemma preorder_impl X (P Q: relation X): (forall x y, P x y <-> Q x y) -> preorder _ P -> preorder _ Q.
Lemma Eleb_preorder: preorder _ (fun x y => Eleb x y = true).
Lemma Egeb_preorder: preorder _ (fun x y => Egeb x y = true).
Lemma Ele_nlt x y: Ele x y -> ~ Elt y x.
Lemma Enle_le x y: ~ Ele x y -> Ele y x.