Add Parametric Relation A B : (A -> B) (@eqfun _ _)
  reflexivity proved by (@eqfun_refl A B)
  symmetry proved by (@eqfun_sym A B)
  transitivity proved by (@eqfun_trans A B) as eqfun_morph.Inductive image_spec b : Prop := Im_mem a of b = f a & a \In P.Inductive image_spec b : Prop := Im_mem a of b = f a & a \In P.Definition Image' : Pred B := image_spec.(* swap to make the notation consider P before E; helps inference *)
Notation Image f P := (Image' P f).Notation "[ 'Image' E | i <- s ]" := (Image (fun i => E) s)
  (at level 0, E at level 99, i ident,
   format "[ '[hv' 'Image'  E '/ '  |  i  <-  s ] ']'") : rel_scope.Notation "[ 'Image' E | i : T <- s ]" := (Image (fun i : T => E) s)
  (at level 0, E at level 99, i ident, only parsing) : rel_scope.

Lemma ImageIm A B C (f1 : B -> C) (f2 : A -> B) (X : Pred A) : Image f1 (Image f2 X) =p Image (f1 \o f2) X.