Hint Extern 1 (RElim (forallp_rel _ _) _ _ _ _) =>
eapply forallp_relim : typeclass_instances.
(** TODO: A further specialization could be [foralln_rel], which does not even require that [v1], [v2] be related (let alone care about the proof). In other words, a [forallr v1 v2, R] which would essentially boil down to [forallr v1 v2 : ⊤, R]. *)
(** *** Sets ([A -> Prop]) *)
(** Sets of type [A -> Prop] can be related using the regular arrow relator, as in [R ++> impl]. This states that for any two elements related by [R], if the first is in the first set, then the second must be in the second set.  However, very often we need the following relator instead, which states that for any element of the first set, there exists an element of the second set which is related to it. This is useful for example when defining simulation diagrams. *)
Definition set_le {A B} (R: rel A B): rel (A -> Prop) (B -> Prop) :=
fun sA sB => forall a, sA a -> exists b, sB b /\ R a b.
Global Instance set_le_subrel {A B}:
Monotonic (@set_le A B) (subrel ++> subrel).
Global Instance set_le_subrel_params:
Params (@set_le) 3.

(* Specifications: *)
Lemma set_le_refl {A} (R : relation A) :
Reflexive R ->
Reflexive (set_le R).