intros p q a; elim p; simpl in |- *; auto.
intros a0 l H' H'0 H'1 H'2.
cut (~ zeroP (A:=A) A0 eqA (n:=n) a0);
[ intros nZ0 | apply canonical_nzeroP with (ltM := ltM) (p := l) ];
auto.
cut (canonical A0 eqA ltM l);
[ intros Op0 | apply canonical_imp_canonical with (a := a0) ];
auto.
apply
(eqp_trans _ _ _ _ _ _ _ _ _ cs n)
with
(y := pluspf (A:=A) A0 (eqA:=eqA) plusA eqA_dec (n:=n) (ltM:=ltM) ltM_dec
(mults (A:=A) multA (n:=n) a (mults (A:=A) multA (n:=n) a0 q))
(mults (A:=A) multA (n:=n) a (multpf l q)));
auto.
apply eqp_pluspf_com with (1 := cs); auto.
apply (eqp_sym _ _ _ _ _ _ _ _ _ cs n); auto.
Qed.

Theorem multpf_assoc :
forall p q r : list (Term A n),
canonical A0 eqA ltM p ->
canonical A0 eqA ltM q ->
canonical A0 eqA ltM r ->
eqP A eqA n (multpf p (multpf q r)) (multpf (multpf p q) r).