intros Q a b nZb p q r Op1 dviP_ab in_br Rec red1 red2 r1 s1 red3 red4.
cut (canonical A0 eqA ltM (pX b r));
[ intros Op2 | apply inPolySet_imp_canonical with (L := Q); auto ].
cut (reduce A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec Q p q);
[ intros H'6 | apply reduce_inv with (1 := cs) (3 := red1); auto ].
cut (canonical A0 eqA ltM p);
[ intros Op3 | apply canonical_imp_canonical with (a := a); auto ].
cut (canonical A0 eqA ltM r);
[ intros Op4 | apply canonical_imp_canonical with (a := b); auto ].
cut (canonical A0 eqA ltM q);
[ intros Op5 | apply canonical_reduce with (1 := cs) (3 := H'6); auto ].
case
one_minus_reduceplus
with
(plusA := plusA)
(3 := H'6)
(r := mults (A:=A) multA (n:=n)
(divTerm (A:=A) (A0:=A0) (eqA:=eqA) divA (n:=n) a (b:=b) nZb) r);
auto.
intros s H; elim H; intros H0 H1; clear H.
cut (canonical A0 eqA ltM s);
[ intros Op6 | apply canonical_reduceplus with (1 := cs) (3 := H1); auto ].
elim
reduce0_reducestar
with (Q := Q) (p := s) (1 := cs) (ltM_dec := ltM_dec) (eqA_dec := eqA_dec);
auto; intros t E.
apply (eqp_trans _ _ _ _ _ _ _ _ _ cs n) with (y := t); auto.
lapply (Rec (pX a q));
[ intros H'0; lapply H'0; [ intros H'1; elim H'1; clear H'0 | clear H'0 ]
| idtac ]; auto.
intros PH'0; apply PH'0; auto.
apply
(reducestar_trans A A0 A1 eqA plusA invA minusA multA divA cs eqA_dec n ltM
ltM_dec os Q) with (y := s); auto.
apply canonical_reduce with (1 := cs) (3 := red1); auto.
apply
Rstar_n
with
(y := minuspf A A0 A1 eqA invA minusA multA eqA_dec n ltM ltM_dec q
(mults (A:=A) multA (n:=n)
(divTerm (A:=A) (A0:=A0) (eqA:=eqA) divA (n:=n) a (b:=b) nZb)
r)); auto.
apply reducetop with (b := b) (nZb := nZb) (q := r); auto.
apply ltP_reduce with (1 := cs) (3 := red1); auto.
apply canonical_reduce with (1 := cs) (3 := red1); auto.
lapply
(Rec
(spminusf A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec a b
nZb p r));
[ intros H'0; lapply H'0; [ intros H'1; elim H'1; clear H'0 | clear H'0 ]
| idtac ]; auto.
intros PH'0; apply PH'0; auto.
apply
(reducestar_trans A A0 A1 eqA plusA invA minusA multA divA cs eqA_dec n ltM
ltM_dec os Q) with (y := s); auto.
apply canonical_spminusf with (1 := cs); auto.
apply ltP_reduce with (1 := cs) (3 := red2); auto.
apply canonical_spminusf with (1 := cs); auto.
Qed.
Hint Resolve pO_irreducible.

(* Specifications: *)
Theorem confl_restar :
forall Q : list (poly A0 eqA ltM),
SpolyQ Q ->
forall p : poly A0 eqA ltM, ReduStarConfluent Q (s2p A A0 eqA n ltM p).