Section BuchAux.
Load "hCoefStructure".
Load "hOrderStructure".
Load "hComb".
Definition red (a : poly A0 eqA ltM) (P : list (poly A0 eqA ltM)) :=
reducestar A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec P
(s2p A A0 eqA n ltM a) (pO A n).
Definition addEnd :
poly A0 eqA ltM -> list (poly A0 eqA ltM) -> list (poly A0 eqA ltM).
intros a H'0; elim H'0.
exact (a :: nil).
intros b L1 Rec; exact (b :: Rec).
Defined.
intros a b aL; elim aL; simpl in |- *; auto.
intros H'; case H'; [ intros H'0; rewrite <- H'0 | intros H'0; clear H' ];
auto.
intros a0 l H' H'0; case H'0;
[ intros H'1; rewrite <- H'1; clear H'0 | intros H'1; clear H'0 ];
auto.
case (H' H'1); auto.
Qed.
intros a aL; elim aL; simpl in |- *; auto.
Qed.
intros a b aL; elim aL; simpl in |- *; auto.
intros a0 l H' H'0; case H'0; auto.
Qed.
intros a P; elim P; simpl in |- *; auto.
intros a0 l H'; elim H'; auto.
Qed.
Definition spolyp : poly A0 eqA ltM -> poly A0 eqA ltM -> poly A0 eqA ltM.
intros p q; case p; case q.
intros x Cpx x0 Cpx0;
exists
(spolyf A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec x x0 Cpx
Cpx0); auto.
apply spolyf_canonical with (1 := cs); auto.
Defined.

Theorem red_com :
forall (a b : poly A0 eqA ltM) (aL : list (poly A0 eqA ltM)),
red (spolyp a b) aL -> red (spolyp b a) aL.