intros.
simpl in |- *.
auto with algebra.
Qed.
Hint Resolve cast_map_to_subset_doesn't_change: algebra.

Lemma Map_embed_cast_map_to_subset_inv :
forall (A B : Setoid) (v : MAP B A) (W : part_set A)
(H : forall i : B, in_part (v i) W),
Map_embed (cast_map_to_subset H) =' v in _.