intros a b c nZa nZb nZppab H' H'0 p q Cpxa Cpxb.
cut (canonical A0 eqA ltM p);
[ intros Op | apply canonical_imp_canonical with (a := a) ];
auto.
cut (canonical A0 eqA ltM q);
[ intros Oq | apply canonical_imp_canonical with (a := b) ];
auto.
cut (~ zeroP (A:=A) A0 eqA (n:=n) c); [ intros Z2 | idtac ].
cut (divP A A0 eqA multA divA n c (ppc (A:=A) A1 (n:=n) a b));
[ intros div1 | idtac ].
apply
(eqp_trans _ _ _ _ _ _ _ _ _ cs n)
with
(y := mults (A:=A) multA (n:=n)
(divTerm (A:=A) (A0:=A0) (eqA:=eqA) divA (n:=n) c
(b:=ppc (A:=A) A1 (n:=n) a b) nZppab)
(minuspf A A0 A1 eqA invA minusA multA eqA_dec n ltM ltM_dec
(mults (A:=A) multA (n:=n)
(divTerm (A:=A) (A0:=A0) (eqA:=eqA) divA (n:=n)
(ppc (A:=A) A1 (n:=n) a b) (b:=a) nZa)
(pX a p))
(mults (A:=A) multA (n:=n)
(divTerm (A:=A) (A0:=A0) (eqA:=eqA) divA (n:=n)
(ppc (A:=A) A1 (n:=n) a b) (b:=b) nZb)
(pX b q)))).
apply mults_comp with (1 := cs); auto.
apply spoly_is_minus; auto.
apply
(eqp_trans _ _ _ _ _ _ _ _ _ cs n)
with
(y := minuspf A A0 A1 eqA invA minusA multA eqA_dec n ltM ltM_dec
(mults (A:=A) multA (n:=n)
(divTerm (A:=A) (A0:=A0) (eqA:=eqA) divA (n:=n) c
(b:=ppc (A:=A) A1 (n:=n) a b) nZppab)
(mults (A:=A) multA (n:=n)
(divTerm (A:=A) (A0:=A0) (eqA:=eqA) divA (n:=n)
(ppc (A:=A) A1 (n:=n) a b) (b:=a) nZa)
(pX a p)))
(mults (A:=A) multA (n:=n)
(divTerm (A:=A) (A0:=A0) (eqA:=eqA) divA (n:=n) c
(b:=ppc (A:=A) A1 (n:=n) a b) nZppab)
(mults (A:=A) multA (n:=n)
(divTerm (A:=A) (A0:=A0) (eqA:=eqA) divA (n:=n)
(ppc (A:=A) A1 (n:=n) a b) (b:=b) nZb)
(pX b q)))).
apply mults_dist_minuspf with (1 := cs); auto.
apply
(eqp_trans _ _ _ _ _ _ _ _ _ cs n)
with
(y := minuspf A A0 A1 eqA invA minusA multA eqA_dec n ltM ltM_dec
(mults (A:=A) multA (n:=n)
(multTerm (A:=A) multA (n:=n)
(divTerm (A:=A) (A0:=A0) (eqA:=eqA) divA (n:=n) c
(b:=ppc (A:=A) A1 (n:=n) a b) nZppab)
(divTerm (A:=A) (A0:=A0) (eqA:=eqA) divA (n:=n)
(ppc (A:=A) A1 (n:=n) a b) (b:=a) nZa))
(pX a p))
(mults (A:=A) multA (n:=n)
(multTerm (A:=A) multA (n:=n)
(divTerm (A:=A) (A0:=A0) (eqA:=eqA) divA (n:=n) c
(b:=ppc (A:=A) A1 (n:=n) a b) nZppab)
(divTerm (A:=A) (A0:=A0) (eqA:=eqA) divA (n:=n)
(ppc (A:=A) A1 (n:=n) a b) (b:=b) nZb))
(pX b q))).
apply minuspf_comp with (1 := cs); auto;
apply (eqp_sym _ _ _ _ _ _ _ _ _ cs n); auto.
apply minuspf_comp with (1 := cs); auto.
apply mults_comp with (1 := cs); auto.
apply (eqTerm_sym _ _ _ _ _ _ _ _ _ cs n); apply divTerm_compo with (1 := cs);
auto.
apply mults_comp with (1 := cs); auto.
apply (eqTerm_sym _ _ _ _ _ _ _ _ _ cs n); apply divTerm_compo with (1 := cs);
auto.
case ppc_is_ppcm with (1 := cs) (a := a) (b := b); auto.
apply (divP_inv1 _ A0 eqA multA divA n) with (b := a); auto.
Qed.
Inductive ReduStarConfluent (Q : list (poly A0 eqA ltM))
(p : list (Term A n)) : Prop :=
ReduStarConfluent0 :
(forall r s : list (Term A n),
reducestar A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec Q
p r ->
reducestar A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec Q
p s -> eqP A eqA n r s) -> ReduStarConfluent Q p.

(* Specifications: *)
Theorem confl_under :
forall (Q : list (poly A0 eqA ltM)) (a : Term A n) (p : list (Term A n)),
canonical A0 eqA ltM (pX a p) ->
(forall q : list (Term A n),
canonical A0 eqA ltM q ->
ltP (A:=A) (n:=n) ltM q (pX a p) -> ReduStarConfluent Q q) ->
forall r s : list (Term A n),
reduce A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec Q
(pX a p) (pX a r) ->
reduce A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec Q
(pX a p) (pX a s) ->
forall r1 s1 : list (Term A n),
reducestar A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec Q
(pX a r) r1 ->
reducestar A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec Q
(pX a s) s1 -> eqP A eqA n r1 s1.