intros A B v.
elim v.
simpl in |- *.
auto with algebra.
Qed.
Hint Resolve cast_doesn't_change: algebra.
(** %\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.
intros.
cut (fun_compatible (cast_to_subset_fun H)).
intro.
exact (Build_Map H0).
red in |- *.
simpl in |- *.
red in |- *.
intros.
apply Trans with (v x); auto with algebra.
apply Trans with (v y); auto with algebra.
Defined.

(* Specifications: *)
Lemma cast_map_to_subset_doesn't_change :
forall (A B : Setoid) (v : MAP B A) (W : part_set A)
(H : forall i : B, in_part (v i) W) (i : B),
subtype_elt (cast_map_to_subset H i) =' v i in _.