simple induction n.
simpl in |- *.
auto with algebra.
intros.
apply Trans with (r mX sum (hdtl a)); auto with algebra; unfold hdtl in |- *.
apply Trans with (r mX (head a +' sum (Seqtl a))); auto with algebra.
apply Trans with (r mX head a +' r mX sum (Seqtl a)); auto with algebra.
apply
Trans
with
(r mX head a +'
sum (mult_by_scalars (Seqtl (const_seq (S n0) r)) (Seqtl a))).
apply SGROUP_comp; auto with algebra.
apply Trans with (sum (mult_by_scalars (const_seq n0 r) (Seqtl a)));
auto with algebra.
apply sum_comp.
apply toMap.
apply mult_by_scalars_comp; auto with algebra.
apply Sym.
change (Seqtl (const_seq (S n0) r) =' const_seq (pred (S n0)) r in _) in |- *.
apply Seqtl_const_seq.
apply Trans with (sum (hdtl (mult_by_scalars (const_seq (S n0) r) a)));
auto with algebra.
unfold hdtl in |- *.
apply
Trans
with
(head (mult_by_scalars (const_seq (S n0) r) a) +'
sum (mult_by_scalars (Seqtl (const_seq (S n0) r)) (Seqtl a)));
auto with algebra.
apply
Trans
with
(head (mult_by_scalars (const_seq (S n0) r) a) +'
sum (Seqtl (mult_by_scalars (const_seq (S n0) r) a)));
auto with algebra.
Qed.
Hint Resolve RING_sum_mult_dist_l MODULE_sum_mult_dist_l: algebra.

Lemma pointwise_module_assoc :
forall (R : ring) (M : module R) (n : Nat) (r r' : seq n R) (m : seq n M),
let rmult := uncurry (RING_comp (R:=R)) in
mult_by_scalars r (mult_by_scalars r' m) ='
mult_by_scalars (pointwise rmult r r') m in _.