intros F M n.
induction  n as [| n Hrecn].
intros.
inversion Hi.
intros.
apply Trans with (sum (hdtl (mult_by_scalars (Basisvec_Fn F Hi) v)));
auto with algebra.
unfold hdtl in |- *.
generalize Hi; clear Hi.
generalize Hi'; clear Hi'.
elim i.
intros Hi' Hi.
apply Trans with (head (mult_by_scalars (Basisvec_Fn F Hi) v) +' (zero M)).
apply Trans with (head (mult_by_scalars (Basisvec_Fn F Hi) v));
auto with algebra.
simpl in |- *.
apply Trans with (head v); auto with algebra.
apply
Trans
with
(head (mult_by_scalars (Basisvec_Fn F Hi) v) +'
sum (Seqtl (mult_by_scalars (Basisvec_Fn F Hi) v)));
auto with algebra.
apply SGROUP_comp; auto with algebra.
apply Trans with (sum (const_seq n (zero M))).
apply Sym.
apply sum_of_zeros; auto with algebra.
apply sum_comp.
apply Trans with (mult_by_scalars (Seqtl (Basisvec_Fn F Hi)) (Seqtl v)).
apply
Trans
with
(mult_by_scalars (R:=F) (V:=M) (N:=n) (const_seq n (zero F):Map _ _)
(Seqtl v:Map _ _)); auto with algebra.
unfold mult_by_scalars in |- *.
apply pointwise_Seqtl; auto with algebra.
(**)
intros.
apply Trans with (hdtl v (Build_finiteT Hi)).
apply Ap_comp; auto with algebra.
apply
Trans with (sum ((zero M);; Seqtl (mult_by_scalars (Basisvec_Fn F Hi) v))).
apply
Trans with ((zero M) +' sum (Seqtl (mult_by_scalars (Basisvec_Fn F Hi) v)));
auto with algebra.
apply Trans with (sum (Seqtl (mult_by_scalars (Basisvec_Fn F Hi) v)));
auto with algebra.
unfold hdtl in |- *.
apply Trans with (Seqtl v (Build_finiteT (lt_S_n _ _ Hi))); auto with algebra.
apply Trans with (sum (mult_by_scalars (Seqtl (Basisvec_Fn F Hi)) (Seqtl v))).
apply
Trans with (sum (mult_by_scalars (Basisvec_Fn F (lt_S_n _ _ Hi)) (Seqtl v)));
auto with algebra.
2: apply sum_comp.
2: simpl in |- *.
2: red in |- *.
2: auto with algebra.
apply sum_comp.
simpl in |- *.
red in |- *.
simpl in |- *.
intro x; case x.
auto with algebra.
Qed.
End proj_via_mult_by_scalars.
(** - $\sum_i (v_i+v'_i) = \sum_i v_i + \sum_i v'_i$ *)

Lemma sum_of_sums :
forall (n : Nat) (M : abelian_monoid) (v v' : seq n M),
sum (pointwise (sgroup_law_map M) v v') =' sum v +' sum v' in _.