Hint Extern 1 (Reflexive (- ==> _)) =>
eapply arrow_pointwise_refl : typeclass_instances.
Global Instance arrow_pointwise_rel_compose {T} `(RCompose) :
RCompose (A := T -> A) (- ==> RAB) (- ==> RBC) (- ==> RAC).
(** *** Dependent pointwise extension *)
(** Like we did for non-dependent functions, we can provide a simpler definition for the special case where [E] is [eq]. *)
Definition forall_pointwise_rel {V: Type} {FV1 FV2: V -> Type}:
(forall v, rel (FV1 v) (FV2 v)) ->
rel (forall v, FV1 v) (forall v, FV2 v) :=
fun FE f g =>
forall v, FE v (f v) (g v).
Arguments forall_pointwise_rel {V%type FV1%type FV2%type} FE%rel _ _.
Notation "'forallr' - @ v : V , FE" :=
(forall_pointwise_rel (V := V) (fun v => FE))
(v ident, at level 200).
Notation "'forallr' - @ v , FE" :=
(forall_pointwise_rel (fun v => FE))
(v ident, at level 200).
Notation "'forallr' - : V , FE" :=
(forall_pointwise_rel (V := V) (fun _ => FE))
(at level 200).
Notation "'forallr' - , FE" :=
(forall_pointwise_rel (fun _ => FE))
(at level 200).

(* Specifications: *)
Lemma forall_pointwise_rintro {V FV1 FV2} (FE: forall v, rel _ _) f g:
RIntro
(forall v, FE v (f v) (g v))
(@forall_pointwise_rel V FV1 FV2 FE) f g.