(* todo: all of this is awkward. see if it can be replaced with an ordinary (pre)order that happens to be decideable with a three-way Lt/Eq/Gt decider *)
Set Implicit Arguments.
Section contents.
Record E: Type :=
{ Ec:> Set
; Ecmp: Ec -> Ec -> comparison
; Ecmp_sym: forall x y, Ecmp x y = CompOpp (Ecmp y x)
; Ecmp_trans: forall x y z c, Ecmp x y = c -> Ecmp y z = c -> Ecmp x z = c
; Ecmp_eq_trans_l: forall x y z c, Ecmp x y = Eq -> Ecmp y z = c -> Ecmp x z = c
}.
Context {e: E}.

(* Specifications: *)
Lemma Ecmp_apply_sym x y c: Ecmp e x y = CompOpp c -> Ecmp e y x = c.
Section shorthands.