Hint Extern 0 (Coreflexive (psat _)) =>
eapply psat_corefl : typeclass_instances.
(** ** Relation versions of [ex] and [all] *)
(** Ideally we would overload the [forall] and [exists] notation to use the relation version under the [rel] scope. But as long as we keep [rel_scope] open globally, we can't really do that without breaking everything. So we use our own keyword [rexists] and [rforall] instead. *)
Definition rel_all {A B C} (R: C -> rel A B): rel A B :=
fun x y => forall c, R c x y.
Notation "'rforall' x .. y , p" :=
(rel_all (fun x => .. (rel_all (fun y => p%rel)) .. ))
(at level 200, x binder, right associativity)
: rel_scope.

Lemma rel_all_rintro {A B C} (R: C -> rel A B) m n:
RIntro (forall c : C, R c m n) (rel_all R) m n.