intros p q r H' H'0 H'1 H'2.
apply
(eqp_trans _ _ _ _ _ _ _ _ _ cs n)
with
(y := multpf
(pluspf (A:=A) A0 (eqA:=eqA) plusA eqA_dec (n:=n) (ltM:=ltM)
ltM_dec q r) p); auto.
apply multpf_com; auto.
apply
(eqp_trans _ _ _ _ _ _ _ _ _ cs n)
with
(y := pluspf (A:=A) A0 (eqA:=eqA) plusA eqA_dec (n:=n) (ltM:=ltM) ltM_dec
(multpf q p) (multpf r p)); auto.
apply multpf_dist_plusr; auto.
apply eqp_pluspf_com with (1 := cs); auto.
apply multpf_com; auto.
apply multpf_com; auto.
Qed.

Theorem multpf_smultm_assoc :
forall (p q : list (Term A n)) (a : Term A n),
canonical A0 eqA ltM p ->
canonical A0 eqA ltM q ->
~ zeroP (A:=A) A0 eqA (n:=n) a ->
eqP A eqA n (mults (A:=A) multA (n:=n) a (multpf p q))
(multpf (mults (A:=A) multA (n:=n) a p) q).