intros.
red in |- *; red in H.
inversion_clear H; inversion_clear H0.
exists x.
assert (forall i : fin x, in_part (x0 i) B).
simpl in H; red in H; simpl in H.
intros.
elim (H (x0 i)).
intros p q; (apply q; auto with algebra).
exists i; auto with algebra.
exists (cast_map_to_subset H0).
simpl in |- *; red in |- *; simpl in |- *; split; intro; auto.
unfold subtype_image_equal in |- *.
simpl in H; red in H; simpl in H.
elim (H (subtype_elt x1)).
intros.
assert (in_part (subtype_elt x1) B).
auto with algebra.
elim (H2 H4).
intros.
exists x2.
apply Trans with (x0 x2); auto with algebra.
Qed.

(* Specifications: *)
Lemma is_finite_set_then_is_finite_subset :
forall (A : Setoid) (B : part_set A), is_finite_set B -> is_finite_subset B.