(** - 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_all_elt_predicates : 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), (forall i : D, Pred_fun P (Map_embed v i)) -> forall j : D, Pred_fun P (Map_embed (cast_map_to_subset H) j).