(** Transitivity rules : first, a generic formulation, then instances*)

Ltac subst_eqns :=
 match goal with
   | H : _==_ |- _ => (rewrite H || rewrite <- H); clear H; subst_eqns
   | _ => idtac
 end.Definition interp_ord o :=
 match o with OEQ => O.eq | OLT => O.lt | OLE => O.le end.Local Notation "#" := interp_ord.

Lemma trans o o' x y z : #o x y -> #o' y z -> #(o+o') x z.