Definition tmults : Term A n -> list (Term A n) -> list (Term A n).

(* Specifications: *)
Theorem tmults_zerop_eqp_pO : forall p a, zeroP (A:=A) A0 eqA (n:=n) a -> eqP A eqA n (tmults a p) (pO A n).
Theorem mults_eqp_pO_pO : forall p a, eqP A eqA n p (pO A n) -> eqP A eqA n (mults a p) (pO A n).
Theorem eqp_invT1_pO_is_pO : forall p : list (Term A n), eqP A eqA n (mults (invTerm (A:=A) invA (n:=n) (T1 A1 n)) p) (pO A n) -> eqP A eqA n p (pO A n).
Theorem mults_eqp_zpO : forall a : Term A n, ~ zeroP (A:=A) A0 eqA (n:=n) a -> forall p : list (Term A n), eqP A eqA n (mults a p) (pO A n) -> eqP A eqA n p (pO A n).
Theorem mults_dist1 : forall p a b, eqT a b -> ~ zeroP (A:=A) A0 eqA (n:=n) a -> ~ zeroP (A:=A) A0 eqA (n:=n) b -> ~ zeroP (A:=A) A0 eqA (n:=n) (plusTerm (A:=A) plusA (n:=n) a b) -> canonical A0 eqA ltM p -> eqP A eqA n (mults (plusTerm (A:=A) plusA (n:=n) a b) p) (pluspf (A:=A) A0 (eqA:=eqA) plusA eqA_dec (n:=n) (ltM:=ltM) ltM_dec (mults a p) (mults b p)).
Theorem mults_dist2 : forall (p : list (Term A n)) (a b : Term A n), eqT a b -> ~ zeroP (A:=A) A0 eqA (n:=n) a -> ~ zeroP (A:=A) A0 eqA (n:=n) b -> zeroP (A:=A) A0 eqA (n:=n) (plusTerm (A:=A) plusA (n:=n) a b) -> canonical A0 eqA ltM p -> eqP A eqA n (pO A n) (pluspf (A:=A) A0 (eqA:=eqA) plusA eqA_dec (n:=n) (ltM:=ltM) ltM_dec (mults a p) (mults b p)).
Theorem mults_T1 : forall (p : list (Term A n)) (a : Term A n), eqTerm (A:=A) eqA (n:=n) a (T1 A1 n) -> eqP A eqA n (mults a p) p.
Theorem mults_invTerm : forall (p : list (Term A n)) (a : Term A n), eqTerm (A:=A) eqA (n:=n) a (T1 A1 n) -> eqP A eqA n (pluspf (A:=A) A0 (eqA:=eqA) plusA eqA_dec (n:=n) (ltM:=ltM) ltM_dec p (mults (invTerm (A:=A) invA (n:=n) a) p)) (pO A n).
Theorem mults_multTerm : forall (p : list (Term A n)) (a b : Term A n), eqP A eqA n (mults (multTerm (A:=A) multA (n:=n) a b) p) (mults a (mults b p)).
Theorem mults_com : forall (p : list (Term A n)) (a b : Term A n), eqP A eqA n (mults (multTerm (A:=A) multA (n:=n) a b) p) (mults (multTerm (A:=A) multA (n:=n) b a) p).
Theorem mults_comp : forall (a b : Term A n) (p q : list (Term A n)), eqTerm (A:=A) eqA (n:=n) a b -> eqP A eqA n p q -> eqP A eqA n (mults a p) (mults b q).
Theorem mults_ltP_comp : forall (a : Term A n) (p q : list (Term A n)), ltP (A:=A) (n:=n) ltM p q -> ltP (A:=A) (n:=n) ltM (mults a p) (mults a q).
Theorem multlm_comp_canonical : forall (p : list (Term A n)) (a b : Term A n), canonical A0 eqA ltM (pX a p) -> ~ zeroP (A:=A) A0 eqA (n:=n) b -> canonical A0 eqA ltM (pX (multTerm (A:=A) multA (n:=n) b a) (mults b p)).