Section Pmult.
Load "hCoefStructure".
Load "hOrderStructure".
Load "hMults".
Fixpoint multpf (p : list (Term A n)) : list (Term A n) -> list (Term A n) :=
fun q : list (Term A n) =>
match p with
| nil => pO A n
| a :: p' =>
pluspf (A:=A) A0 (eqA:=eqA) plusA eqA_dec (n:=n) (ltM:=ltM) ltM_dec
(mults (A:=A) multA (n:=n) a q) (multpf p' q)
end.
intros l1; elim l1; simpl in |- *; auto.
intros a l H' l2 H'0 H'1; try assumption.
apply canonical_pluspf; auto.
apply canonical_mults with (1 := cs); auto.
apply canonical_nzeroP with (ltM := ltM) (p := l); auto.
apply H'; auto.
apply canonical_imp_canonical with (a := a); auto.
Qed.
Hint Resolve canonical_multpf.

Theorem pluspf_pX :
forall (p : list (Term A n)) (a : Term A n),
canonical A0 eqA ltM (pX a p) ->
eqP A eqA n (pX a p)
(pluspf (A:=A) A0 (eqA:=eqA) plusA eqA_dec (n:=n) (ltM:=ltM) ltM_dec
(pX a (pO A n)) p).