Inductive genPcP :
poly A0 eqA ltM ->
list (poly A0 eqA ltM) ->
list (poly A0 eqA ltM) -> list (poly A0 eqA ltM) -> Prop :=
  | genPcP0 :
      forall (i : poly A0 eqA ltM) (L : list (poly A0 eqA ltM)),
      genPcP i nil L L
  | genPcP1 :
      forall (L L1 L2 L3 : list _) (a i : poly A0 eqA ltM),
      slice i a L1 = Keep L2 ->
      genPcP i L2 L L3 ->
      genPcP i (a :: L1) L
        (addEnd A A0 eqA n ltM
           (spolyp A A0 A1 eqA plusA invA minusA multA divA cs eqA_dec n ltM
              ltM_dec os i a) L3)
  | genPcP2 :
      forall (L L1 L2 L3 : list _) (a i : poly A0 eqA ltM),
      slice i a L1 = DontKeep L2 ->
      genPcP i L2 L L3 -> genPcP i (a :: L1) L L3.Inductive genPcP :
poly A0 eqA ltM ->
list (poly A0 eqA ltM) ->
list (poly A0 eqA ltM) -> list (poly A0 eqA ltM) -> Prop :=
  | genPcP0 :
      forall (i : poly A0 eqA ltM) (L : list (poly A0 eqA ltM)),
      genPcP i nil L L
  | genPcP1 :
      forall (L L1 L2 L3 : list _) (a i : poly A0 eqA ltM),
      slice i a L1 = Keep L2 ->
      genPcP i L2 L L3 ->
      genPcP i (a :: L1) L
        (addEnd A A0 eqA n ltM
           (spolyp A A0 A1 eqA plusA invA minusA multA divA cs eqA_dec n ltM
              ltM_dec os i a) L3)
  | genPcP2 :
      forall (L L1 L2 L3 : list _) (a i : poly A0 eqA ltM),
      slice i a L1 = DontKeep L2 ->
      genPcP i L2 L L3 -> genPcP i (a :: L1) L L3.Inductive genPcP :
poly A0 eqA ltM ->
list (poly A0 eqA ltM) ->
list (poly A0 eqA ltM) -> list (poly A0 eqA ltM) -> Prop :=
  | genPcP0 :
      forall (i : poly A0 eqA ltM) (L : list (poly A0 eqA ltM)),
      genPcP i nil L L
  | genPcP1 :
      forall (L L1 L2 L3 : list _) (a i : poly A0 eqA ltM),
      slice i a L1 = Keep L2 ->
      genPcP i L2 L L3 ->
      genPcP i (a :: L1) L
        (addEnd A A0 eqA n ltM
           (spolyp A A0 A1 eqA plusA invA minusA multA divA cs eqA_dec n ltM
              ltM_dec os i a) L3)
  | genPcP2 :
      forall (L L1 L2 L3 : list _) (a i : poly A0 eqA ltM),
      slice i a L1 = DontKeep L2 ->
      genPcP i L2 L L3 -> genPcP i (a :: L1) L L3.Inductive genPcP :
poly A0 eqA ltM ->
list (poly A0 eqA ltM) ->
list (poly A0 eqA ltM) -> list (poly A0 eqA ltM) -> Prop :=
  | genPcP0 :
      forall (i : poly A0 eqA ltM) (L : list (poly A0 eqA ltM)),
      genPcP i nil L L
  | genPcP1 :
      forall (L L1 L2 L3 : list _) (a i : poly A0 eqA ltM),
      slice i a L1 = Keep L2 ->
      genPcP i L2 L L3 ->
      genPcP i (a :: L1) L
        (addEnd A A0 eqA n ltM
           (spolyp A A0 A1 eqA plusA invA minusA multA divA cs eqA_dec n ltM
              ltM_dec os i a) L3)
  | genPcP2 :
      forall (L L1 L2 L3 : list _) (a i : poly A0 eqA ltM),
      slice i a L1 = DontKeep L2 ->
      genPcP i L2 L L3 -> genPcP i (a :: L1) L L3.

(* Specifications: *)
Theorem genPcP_spolyp1 : forall (i : poly A0 eqA ltM) (L L1 L2 : list _), genPcP i L1 L L2 -> forall a : poly A0 eqA ltM, In a L2 -> (exists b : poly A0 eqA ltM, In b L1 /\ a = spolyp A A0 A1 eqA plusA invA minusA multA divA cs eqA_dec n ltM ltM_dec os i b) \/ In a L.
Theorem genPcP_incl : forall (i : poly A0 eqA ltM) (L L1 L2 : list _), genPcP i L1 L L2 -> incl L L2.
Lemma spolyp_cons_genPcP0 : forall (aP R Q : list _) (i : poly A0 eqA ltM), genPcP i aP R Q -> ~ BuchAux.zerop A A0 eqA n ltM i -> forall b : poly A0 eqA ltM, In b aP -> ~ BuchAux.zerop A A0 eqA n ltM b -> exists c : poly A0 eqA ltM, In c aP /\ (In (spolyp A A0 A1 eqA plusA invA minusA multA divA cs eqA_dec n ltM ltM_dec os i c) Q \/ foreigner A A0 A1 eqA multA n ltM i c) /\ divp A A0 eqA multA divA n ltM (ppcp A A0 A1 eqA plusA invA minusA multA divA cs n ltM i b) c.
Lemma spolyp_cons_genPcP : forall (aP R Q : list _) (i : poly A0 eqA ltM), genPcP i aP R Q -> ~ BuchAux.zerop A A0 eqA n ltM i -> forall b : poly A0 eqA ltM, In b aP -> ~ BuchAux.zerop A A0 eqA n ltM b -> exists c : poly A0 eqA ltM, In c aP /\ (In (spolyp A A0 A1 eqA plusA invA minusA multA divA cs eqA_dec n ltM ltM_dec os i c) Q \/ red A A0 A1 eqA invA minusA multA divA eqA_dec n ltM ltM_dec (spolyp A A0 A1 eqA plusA invA minusA multA divA cs eqA_dec n ltM ltM_dec os i c) (addEnd A A0 eqA n ltM i aP)) /\ divp A A0 eqA multA divA n ltM (ppcp A A0 A1 eqA plusA invA minusA multA divA cs n ltM i b) c.
Theorem Cb_genPcP : forall (i : poly A0 eqA ltM) (P Q R S : list (poly A0 eqA ltM)), genPcP i P R Q -> Cb A A0 eqA plusA multA eqA_dec n ltM ltM_dec i S -> (forall a : poly A0 eqA ltM, In a P -> Cb A A0 eqA plusA multA eqA_dec n ltM ltM_dec a S) -> (forall a : poly A0 eqA ltM, In a R -> Cb A A0 eqA plusA multA eqA_dec n ltM ltM_dec a S) -> forall a : poly A0 eqA ltM, In a Q -> Cb A A0 eqA plusA multA eqA_dec n ltM ltM_dec a S.