Inductive reducehead (Q : list (poly A0 eqA ltM)) :
list (Term A n) -> list (Term A n) -> Prop :=
    reduceheadO :
      forall (a b : Term A n) (nZb : ~ zeroP (A:=A) A0 eqA (n:=n) b)
        (p q : list (Term A n)),
      pickinSetp a (pX b q) Q ->
      reducehead Q (pX a p)
        (spminusf A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec a
           b nZb p q).Inductive reducehead (Q : list (poly A0 eqA ltM)) :
list (Term A n) -> list (Term A n) -> Prop :=
    reduceheadO :
      forall (a b : Term A n) (nZb : ~ zeroP (A:=A) A0 eqA (n:=n) b)
        (p q : list (Term A n)),
      pickinSetp a (pX b q) Q ->
      reducehead Q (pX a p)
        (spminusf A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec a
           b nZb p q).

(* Specifications: *)
Lemma pick_inv_in : forall (Q : list (poly A0 eqA ltM)) (a : Term A n) (p : list (Term A n)), pickinSetp a p Q -> inPolySet p Q.
Lemma pick_inv_eqT_lem : forall (Q : list (poly A0 eqA ltM)) (a : Term A n) (p : list (Term A n)), pickinSetp a p Q -> forall (b : Term A n) (q : list (Term A n)), p = pX b q -> divP A A0 eqA multA divA n a b.
Lemma pick_inv_eqT : forall (Q : list (poly A0 eqA ltM)) (a b : Term A n) (p q : list (Term A n)), pickinSetp a (pX b q) Q -> divP A A0 eqA multA divA n a b.
Theorem reducehead_imp_reduce : forall (Q : list (poly A0 eqA ltM)) (p q : list (Term A n)), reducehead Q p q -> reduce Q p q.