intros p; case p.
intros x; case x; simpl in |- *; auto.
intros a l; case a; simpl in |- *; auto.
Qed.
Definition nf : poly A0 eqA ltM -> list (poly A0 eqA ltM) -> poly A0 eqA ltM.
intros p L.
case
(Reducef A A0 A1 eqA plusA invA minusA multA divA cs eqA_dec n ltM ltM_dec
os L p).
intros x H'.
apply LetP with (A := poly A0 eqA ltM) (h := x).
intros u H'1; case u.
intros x0 H'2;
exists (mults (A:=A) multA (n:=n) (unit (mks A A0 eqA n ltM x0 H'2)) x0);
auto.
apply canonical_mults with (1 := cs); auto.
apply unit_nZ; auto.
Defined.

Theorem nf_irreducible :
forall (p : poly A0 eqA ltM) (aP : list (poly A0 eqA ltM)),
irreducible A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec aP
(s2p A A0 eqA n ltM (nf p aP)).