Inductive reduce (Q : list (poly A0 eqA ltM)) :
list (Term A n) -> list (Term A n) -> Prop :=
  | reducetop :
      forall (a b : Term A n) (nZb : ~ zeroP (A:=A) A0 eqA (n:=n) b)
        (p q r : list (Term A n)),
      inPolySet (pX b q) Q ->
      divP A A0 eqA multA divA n a b ->
      eqP A eqA n
        (spminusf A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec a
           b nZb p q) r -> reduce Q (pX a p) r
  | reduceskip :
      forall (a b : Term A n) (p q : list (Term A n)),
      reduce Q p q ->
      eqTerm (A:=A) eqA (n:=n) a b -> reduce Q (pX a p) (pX b q).Inductive reduce (Q : list (poly A0 eqA ltM)) :
list (Term A n) -> list (Term A n) -> Prop :=
  | reducetop :
      forall (a b : Term A n) (nZb : ~ zeroP (A:=A) A0 eqA (n:=n) b)
        (p q r : list (Term A n)),
      inPolySet (pX b q) Q ->
      divP A A0 eqA multA divA n a b ->
      eqP A eqA n
        (spminusf A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec a
           b nZb p q) r -> reduce Q (pX a p) r
  | reduceskip :
      forall (a b : Term A n) (p q : list (Term A n)),
      reduce Q p q ->
      eqTerm (A:=A) eqA (n:=n) a b -> reduce Q (pX a p) (pX b q).Inductive reduce (Q : list (poly A0 eqA ltM)) :
list (Term A n) -> list (Term A n) -> Prop :=
  | reducetop :
      forall (a b : Term A n) (nZb : ~ zeroP (A:=A) A0 eqA (n:=n) b)
        (p q r : list (Term A n)),
      inPolySet (pX b q) Q ->
      divP A A0 eqA multA divA n a b ->
      eqP A eqA n
        (spminusf A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec a
           b nZb p q) r -> reduce Q (pX a p) r
  | reduceskip :
      forall (a b : Term A n) (p q : list (Term A n)),
      reduce Q p q ->
      eqTerm (A:=A) eqA (n:=n) a b -> reduce Q (pX a p) (pX b q).

Theorem reduce_mults_inv_lem : forall (Q : list (poly A0 eqA ltM)) (p q : list (Term A n)), reduce Q p q -> forall r : list (Term A n), canonical A0 eqA ltM r -> p = mults (A:=A) multA (n:=n) (invTerm (A:=A) invA (n:=n) (T1 A1 n)) r -> reduce Q r (mults (A:=A) multA (n:=n) (invTerm (A:=A) invA (n:=n) (T1 A1 n)) q).