Coercion app_same_set : Same_set >-> Funclass.
(* TODO: rename it into preimage set *)
Definition respectful_set {A B: Type} (X: Ensemble B) (f: A -> B): Ensemble A := fun x => X (f x).
Inductive image_set {A B: Type}: Ensemble A -> (A -> B) -> Ensemble B :=
| image_set_intro: forall (X: Ensemble A) (f: A -> B) (x: A), X x -> image_set X f (f x).

(* Specifications: *)
Lemma image_set_spec: forall {A B: Type} f X (y: B),
image_set X f y <-> exists x: A, X x /\ y = f x.