intros.
split.
intro.
inversion_clear H.
generalize H0; clear H0.
generalize v.
induction  x as [| x Hrecx].
intros v0 H0.
inversion_clear H0.
inversion_clear H.
simpl in H0.
unfold lin_comb_ind in |- *.
simpl in |- *.
exists (Zerovector S).
simpl in |- *.
assumption.
(* Induction step *)
intros.
inversion_clear H0.
inversion_clear H.
unfold lin_comb_ind in |- *.
simpl in |- *.
(********)
set (x0_0 := head x0) in *.
set (x1_0 := head x1) in *.
set (vhd := x0_0 mX S x1_0) in *.
set (vtl := mult_by_scalars (Seqtl x0) (Map_embed (Seqtl x1)):seq x V) in *.
cut (v0 =' vhd +' sum vtl in _).
intro.
generalize (Hrecx (sum vtl)).
intro.
cut
(exists a : seq x F,
(exists w : seq x S,
sum vtl =' sum (mult_by_scalars a (Map_embed w)) in _)).
intro.
generalize (H1 H2).
intro.
unfold lin_comb_ind in H3.
simpl in H3.
inversion H3.
exists (Plusvector (Multvector x0_0 (Immediately x1_0)) x2).
simpl in |- *.
apply Trans with (x0_0 mX S x1_0 +' sum vtl); auto with algebra.
(* that was the real work *)
exists (Seqtl x0).
exists (Seqtl x1).
unfold vtl in |- *.
apply sum_comp; auto with algebra.
(**)
unfold vhd, vtl, x0_0, x1_0 in |- *.
apply Trans with (sum (mult_by_scalars x0 (Map_embed x1))); auto with algebra.
apply Trans with (sum (mult_by_scalars (hdtl x0) (Map_embed (hdtl x1)))).
unfold mult_by_scalars in |- *.
apply sum_comp.
apply toMap.
apply pointwise_comp; auto with algebra.
unfold hdtl in |- *.
unfold mult_by_scalars in |- *.
apply
Trans
with
(sum
(uncurry (MODULE_comp (R:=F) (Mod:=V))
(couple (head x0) (S (head x1)));;
pointwise (uncurry (MODULE_comp (R:=F) (Mod:=V)))
(Seqtl x0) (Map_embed (Seqtl x1)))); auto with algebra.
intros.
inversion_clear H.
generalize H0; clear H0.
generalize v; clear v.
elim x.
intros.
unfold is_lin_comb in |- *.
exists 0.
exists (const_seq 0 (zero F)).
simpl in |- *.
exists (empty_seq S).
assumption.
intros.
unfold is_lin_comb in |- *.
exists 1.
exists (const_seq 1 (one:F)).
exists (const_seq 1 c).
simpl in |- *.
apply Trans with (subtype_elt c); auto with algebra.
apply Trans with (one mX subtype_elt c); auto with algebra.
unfold is_lin_comb in |- *.
intros.
generalize (H _ (Refl (span_ind_injection s))).
generalize (H0 _ (Refl (span_ind_injection s0))).
clear H H0.
intros.
inversion_clear H0.
inversion_clear H2.
inversion_clear H0.
inversion_clear H.
inversion_clear H0.
inversion_clear H.
exists (x0 + x3).
exists (x1 ++ x4).
exists (x2 ++ x5).
apply Trans with (span_ind_injection s +' span_ind_injection s0);
auto with algebra.
apply
Trans
with (sum (mult_by_scalars x1 (Map_embed x2)) +' span_ind_injection s0);
auto with algebra.
apply
Trans
with
(sum (mult_by_scalars x1 (Map_embed x2)) +'
sum (mult_by_scalars x4 (Map_embed x5))); auto with algebra.
apply
Trans
with
(sum
(mult_by_scalars x1 (Map_embed x2) ++
mult_by_scalars x4 (Map_embed x5))); auto with algebra.
unfold mult_by_scalars in |- *.
apply sum_comp; auto with algebra.
apply
Trans
with
(pointwise (uncurry (MODULE_comp (R:=F) (Mod:=V)))
(x1 ++ x4) (Map_embed x2 ++ Map_embed x5));
auto with algebra.
intros.
generalize (H _ (Refl (span_ind_injection s))).
unfold is_lin_comb in |- *.
intro.
inversion_clear H1.
inversion_clear H2.
inversion_clear H1.
exists x0.
exists (pointwise (uncurry (RING_comp (R:=F))) (const_seq x0 c) x1).
exists x2.
simpl in H0.
apply Trans with (c mX span_ind_injection s); auto with algebra.
apply Trans with (c mX sum (mult_by_scalars x1 (Map_embed x2)));
auto with algebra.
apply
Trans
with
(sum
(mult_by_scalars (const_seq x0 c) (mult_by_scalars x1 (Map_embed x2))));
auto with algebra.
Qed.

(* Specifications: *)
Lemma span_is_span_ind :
forall S : part_set V, span S =' span_ind S in part_set V.