Require Export Logic.lib.Relation_ext.
Instance list_Reflexive {A R} {EqA: @Equivalence A R}: Reflexive (Forall2 (@equiv A _ _)).
Instance list_Symmetric {A R} {EqA: @Equivalence A R}: Symmetric (Forall2 (@equiv A _ _)).
Instance list_Transitive {A R} {EqA: @Equivalence A R}: Transitive (Forall2 (@equiv A _ _)).
Instance list_Equivalence {A R} {EqA: @Equivalence A R}: Equivalence (Forall2 (@equiv A _ _)).
(* The Instances-Searching for type classes are type oriented. As resp_Equivalence is a (Equvalence B), it should not be involved in Instances-Searching. Or else, searching engine will apply this Instance, and do never terminate. *)

(* Specifications: *)
Lemma resp_Reflexive {A B} (f: A -> B) (R: relation B) {RR: Reflexive R}: Reflexive (respectful_relation f R).
Lemma resp_Symmetric {A B} (f: A -> B) (R: relation B) {SR: Symmetric R}: Symmetric (respectful_relation f R).
Lemma resp_Transitive {A B} (f: A -> B) (R: relation B) {TR: Transitive R}: Transitive (respectful_relation f R).
Lemma resp_Equivalence {A B} (f: A -> B) (R: relation B) {ER: Equivalence R}: Equivalence (respectful_relation f R).