(* Now we are ready!! We start with the definition of genCpC *)
 
Inductive cpRes : Set :=
  | Keep : forall P : list (poly A0 eqA ltM), cpRes
  | DontKeep : forall P : list (poly A0 eqA ltM), cpRes.(* Now we are ready!! We start with the definition of genCpC *)
 
Inductive cpRes : Set :=
  | Keep : forall P : list (poly A0 eqA ltM), cpRes
  | DontKeep : forall P : list (poly A0 eqA ltM), cpRes.(* Now we are ready!! We start with the definition of genCpC *)
 
Inductive cpRes : Set :=
  | Keep : forall P : list (poly A0 eqA ltM), cpRes
  | DontKeep : forall P : list (poly A0 eqA ltM), cpRes.Definition getRes : cpRes -> list (poly A0 eqA ltM).Definition addRes : poly A0 eqA ltM -> cpRes -> cpRes.Definition slice :
  poly A0 eqA ltM -> poly A0 eqA ltM -> list (poly A0 eqA ltM) -> cpRes.Definition slicef :
  poly A0 eqA ltM ->
  poly A0 eqA ltM -> list (poly A0 eqA ltM) -> list (poly A0 eqA ltM).

(* Specifications: *)
Theorem slicef_incl : forall (a b : poly A0 eqA ltM) (P : list (poly A0 eqA ltM)), incl (slicef a b P) P.
Theorem slice_inv : forall (a b : poly A0 eqA ltM) (P : list (poly A0 eqA ltM)) (c : poly A0 eqA ltM), In c P -> In c (getRes (slice a b P)) \/ divp A A0 eqA multA divA n ltM (ppcp A A0 A1 eqA plusA invA minusA multA divA cs n ltM a c) b.
Theorem slice_cons : forall (i a : poly A0 eqA ltM) (aP Q : list (poly A0 eqA ltM)), slice i a aP = DontKeep Q -> (exists c : poly A0 eqA ltM, In c Q /\ divp A A0 eqA multA divA n ltM (ppcp A A0 A1 eqA plusA invA minusA multA divA cs n ltM i a) c) \/ foreigner A A0 A1 eqA multA n ltM i a.