Hint Extern 1 (RElim (forall_pointwise_rel _) _ _ _ _) =>
eapply forall_pointwise_relim : typeclass_instances.
(** *** Dependent products (restricted version) *)
(** This is a restricted version of [forall_rel] with [E] in [Prop], when the codomain relation only depends on the arguments. *)
Definition forallp_rel {V1 V2} (E: rel V1 V2) {FV1: V1->Type} {FV2: V2->Type}:
(forall v1 v2, rel (FV1 v1) (FV2 v2)) ->
rel (forall v1, FV1 v1) (forall v2, FV2 v2) :=
fun FE f g =>
forall v1 v2, E v1 v2 -> FE v1 v2 (f v1) (g v2).
Arguments forallp_rel {V1%type V2%type} E%rel {FV1%type FV2%type} FE%rel _ _.
Notation "'forallr' v1 v2 : E , R" :=
(forallp_rel E (fun v1 v2 => R))
(at level 200, v1 ident, v2 ident, right associativity)
: rel_scope.

Lemma forallp_rintro {V1 V2} {E: rel V1 V2} {F1 F2} (FE: forall v1 v2, rel _ _) f g:
RIntro
(forall v1 v2, E v1 v2 -> FE v1 v2 (f v1) (g v2))
(@forallp_rel V1 V2 E F1 F2 FE) f g.