(** - 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_respects_predicates_per_elt : forall (A D : Setoid) (B C : part_set A) (v : MAP D B) (P : Predicate A) (H : forall i : D, in_part (Map_embed v i) C) (i : D), Pred_fun P (Map_embed v i) -> Pred_fun P (Map_embed (cast_map_to_subset H) i).