(** * Theorems for [ITree.Indexed.Function] *)
(* begin hide *)
Setoid
Morphisms.
Basics.Basics
Indexed.Function
Indexed.Relation.
Set Universe Polymorphism.
(* end hide *)
Instance Proper_apply_IFun {E F : Type -> Type} {T : Type}
(RE : forall T, E T -> E T -> Prop)
(RF : forall T, F T -> F T -> Prop)
: Proper (i_respectful RE RF ==> RE T ==> RF T) apply_IFun.

Lemma fold_apply_IFun {E F : Type -> Type} {T : Type}
: forall (f : E ~> F) (t : E T),
f _ t = apply_IFun f t.