Inductive reduceplus (Q : list (poly A0 eqA ltM)) :
list (Term A n) -> list (Term A n) -> Prop :=
  | Rstar_0 :
      forall x y : list (Term A n), eqP A eqA n x y -> reduceplus Q x y
  | Rstar_n :
      forall x y z : list (Term A n),
      reduce A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec Q x y ->
      reduceplus Q y z -> reduceplus Q x z.Inductive reduceplus (Q : list (poly A0 eqA ltM)) :
list (Term A n) -> list (Term A n) -> Prop :=
  | Rstar_0 :
      forall x y : list (Term A n), eqP A eqA n x y -> reduceplus Q x y
  | Rstar_n :
      forall x y z : list (Term A n),
      reduce A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec Q x y ->
      reduceplus Q y z -> reduceplus Q x z.Inductive reduceplus (Q : list (poly A0 eqA ltM)) :
list (Term A n) -> list (Term A n) -> Prop :=
  | Rstar_0 :
      forall x y : list (Term A n), eqP A eqA n x y -> reduceplus Q x y
  | Rstar_n :
      forall x y z : list (Term A n),
      reduce A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec Q x y ->
      reduceplus Q y z -> reduceplus Q x z.

Theorem reduce_plus_top : forall (Q : list (poly A0 eqA ltM)) (r : list (Term A n)), canonical A0 eqA ltM r -> forall (a b : Term A n) (nZb : ~ zeroP (A:=A) A0 eqA (n:=n) b) (p q : list (Term A n)), inPolySet A A0 eqA n ltM (pX b q) Q -> canonical A0 eqA ltM (pX a p) -> divP A A0 eqA multA divA n a b -> ex (fun s : list (Term A n) => reduceplus Q (pluspf (A:=A) A0 (eqA:=eqA) plusA eqA_dec (n:=n) (ltM:=ltM) ltM_dec (pX a p) r) s /\ reduceplus Q (pluspf (A:=A) A0 (eqA:=eqA) plusA eqA_dec (n:=n) (ltM:=ltM) ltM_dec (spminusf A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec a b nZb p q) r) s).