(** - if $\forall b\in B, f(b)\in W\subset A$ for $f:B\to A$ then $f$ can be seen as
 $f:B\to W$. This is done by cast_map_to_subset. *)

Definition cast_to_subset_fun :
  forall (A B : Setoid) (v : MAP B A) (W : part_set A),
  (forall i : B, in_part (v i) W) -> (B -> W:Type).(** %\label{castmaptosubset}% *)
Definition cast_map_to_subset :
  forall (A B : Setoid) (v : MAP B A) (W : part_set A),
  (forall i : B, in_part (v i) W) -> MAP B W.

Lemma cast_subset_seq_nice : forall (A D : Setoid) (B C : part_set A) (v : MAP D B) (H : forall i : D, in_part (Map_embed v i) C) (P : Predicate (MAP D A)), Pred_fun P (Map_embed v) -> Pred_fun P (Map_embed (cast_map_to_subset H)).