intros.
change (in_part x (span W')) in |- *.
elim (span_idempotent W' x).
intros.
apply H2; auto with algebra; clear H1 H2.
simpl in |- *.
assert (forall w : W, in_part (subtype_elt w) (span_set W')).
auto.
clear H0.
inversion_clear H.
inversion_clear H0.
inversion_clear H.
red in |- *.
exists x0.
exists x1.
assert (forall i : fin x0, in_part (Map_embed x2 i) (span_set W')).
intro i.
change (in_part (subtype_elt (x2 i)) (span_set W')) in |- *.
auto.
exists (cast_map_to_subset H).
apply Trans with (sum (mult_by_scalars x1 (Map_embed x2))); auto with algebra.
Qed.
(** - If all $w\in W$ are linear combinations of $W'$ then $span(W)\subset span(W')$ *)

Lemma span_casting :
forall (F : field) (V : vectorspace F) (W W' : part_set V),
(forall w : W, is_lin_comb (subtype_elt w) W') ->
included (span W) (span W').