Instance respectful_set_proper {A B: Type}: Proper (Same_set ==> pointwise_relation A (@eq B) ==> Same_set) respectful_set.
Instance image_set_proper2 {A B: Type}: Proper (Same_set ==> eq ==> Same_set) (@image_set A B).

Lemma resp_Same_set: forall {A B: Type} (X Y: Ensemble B) (f: A -> B),
Same_set X Y ->
Same_set (respectful_set X f) (respectful_set Y f).