Global Instance set_ge_compose `(RCompose) :
  RCompose (set_ge RAB) (set_ge RBC) (set_ge RAC).(** ** Inductive types *)

(** For inductive types, there is a systematic way of converting their
  definition into that of the corresponding relator. Where the
  original inductive definition quantifies over types, the
  corresponding relator will quantify over pairs of types and
  relations between them. Then, the constructors of the relator will
  essentially be [Proper] instances for the original constructors.
  In other words, the resulting relation will be the smallest one such
  that the constructors are order-preserving. *)

(** *** Nullary type constructors *)

(** As a proof-of-concept, we start with the most elementary types
  [Empty_set] and [unit], which can be considered as nullary type
  constructors related to [sum] and [prod] below. *)

Inductive Empty_set_rel: rel Empty_set Empty_set := .Inductive unit_rel: rel unit unit :=
  tt_rel: Proper unit_rel tt.Inductive unit_rel: rel unit unit :=
  tt_rel: Proper unit_rel tt.Infix "+" := sum_rel : rel_scope.Global Instance sum_subrel_params:
  Params (@sum) 4.

(* Specifications: *)
Lemma sum_rel_refl {A B} (R1: rel A A) (R2: rel B B): Reflexive R1 -> Reflexive R2 -> Reflexive (R1 + R2).
Lemma sum_rel_corefl {A B} (R1: rel A A) (R2: rel B B): Coreflexive R1 -> Coreflexive R2 -> Coreflexive (R1 + R2).
Lemma sum_rel_trans {A B} (R1: rel A A) (R2: rel B B): Transitive R1 -> Transitive R2 -> Transitive (R1 + R2).
Lemma sum_rel_sym {A B} (R1: rel A A) (R2: rel B B): Symmetric R1 -> Symmetric R2 -> Symmetric (R1 + R2).
Lemma sum_rel_preorder {A B} (R1: rel A A) (R2: rel B B): PreOrder R1 -> PreOrder R2 -> PreOrder (R1 + R2).