1 #ifndef CoCoA_GReductor_H
2 #define CoCoA_GReductor_H
3 
4 //   Copyright (c)  2005-2017  John Abbott, Anna M. Bigatti
5 //   Author2:  2005-2010  Massimo Caboara, 2010-2017 Anna M. Bigatti
6 
7 //   This file is part of the source of CoCoALib, the CoCoA Library.
8 
9 //   CoCoALib is free software: you can redistribute it and/or modify
10 //   it under the terms of the GNU General Public License as published by
11 //   the Free Software Foundation, either version 3 of the License, or
12 //   (at your option) any later version.
13 
14 //   CoCoALib is distributed in the hope that it will be useful,
15 //   but WITHOUT ANY WARRANTY; without even the implied warranty of
16 //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 //   GNU General Public License for more details.
18 
19 //   You should have received a copy of the GNU General Public License
20 //   along with CoCoALib.  If not, see <http://www.gnu.org/licenses/>.
21 
22 
23 //#include "CoCoA/CpuTimeLimit.H"
24 #include "CoCoA/GBEnv.H"
25 #include "CoCoA/TmpGPoly.H"
26 #include "CoCoA/TmpGPair.H"
27 #include "CoCoA/TmpGRStats.H"
28 //#include "CoCoA/CoCoA4io.H"
29 
30 
31 namespace CoCoA
32 {
33 
34   //  void ReadInt(std::istream&,int&,SkipTagType);
35 
36   class FreeModule;     // forward declaration -- defined in FreeModule.H
37   class SparsePolyRing; // forward declaration -- defined in SparsePolyRing.H
38 
39 class GBCriteria
40 {
41 public:
42   enum CoprimeFlag   { UseCoprime, DontUseCoprime };
43   enum GMFlag        { UseGM, DontUseGM };
44   enum BackFlag      { UseBack, DontUseBack };
45   enum DivFlag       { UseDiv, DontUseDiv }; ///< remove poly if its LPP is divisible by LPP of new poly; true except for RingWeyl
46   enum AllSetMarker  { AllSet };
47 
48 public:
GBCriteria(AllSetMarker)49   GBCriteria(AllSetMarker) {myBack=true; myCoprime=true; myDiv=true; myGM=true;}
GBCriteria(CoprimeFlag c,GMFlag gm,BackFlag b,DivFlag d)50   GBCriteria(CoprimeFlag c, GMFlag gm, BackFlag b, DivFlag d)
51   {
52     myCoprime = (c == UseCoprime);
53     myBack = (b == UseBack);
54     myDiv = (d == UseDiv);
55     myGM = (gm == UseGM);
56   }
57 public:
58   bool myBack;
59   bool myCoprime;
60   bool myDiv;
61   bool myGM;
62 };
63 
64   class GReductor
65   {
66   public:
67 
68     enum UseDynamicAlgFlag    { UseDynamicAlg, DontUseDynamicAlg };
69     enum BuchbergerOpTypeFlag { HomogeneousAlg, SaturatingAlg, AffineAlg };
70 
71 
72     GReductor(const GRingInfo&,
73               const PolyList&,
74 //              const CpuTimeLimit& CheckForTimeOut=NoCpuTimeLimit(),
75               const BuchbergerOpTypeFlag theBuchbergerOpType=HomogeneousAlg,
76               const Reductors::UseBorelFlag=Reductors::DontUseBorel,
77               const UseDynamicAlgFlag IsDynamic=DontUseDynamicAlg,
78               const GBCriteria criteria=GBCriteria(GBCriteria::AllSet));
79 
80     GReductor(const GRingInfo&,
81               const GPolyList&,
82 //              const CpuTimeLimit& CheckForTimeOut=NoCpuTimeLimit(),
83               const BuchbergerOpTypeFlag theBuchbergerOpType=HomogeneousAlg,
84               const Reductors::UseBorelFlag=Reductors::DontUseBorel,
85               const UseDynamicAlgFlag IsDynamic=DontUseDynamicAlg,
86               const GBCriteria criteria=GBCriteria(GBCriteria::AllSet));
87     GReductor(const GReductor&);// copy ctor not working, to be fixed
~GReductor()88     ~GReductor(){};
89     void myCtorAux(const BuchbergerOpTypeFlag theBuchbergerOpType,
90                    const UseDynamicAlgFlag IsDynamic);
91     GReductor(const GRingInfo&,
92               GPolyList&,
93               const ClearMarker,
94 //              const CpuTimeLimit& CheckForTimeOut=NoCpuTimeLimit(),
95               const BuchbergerOpTypeFlag theBuchbergerOpType=HomogeneousAlg,
96               const Reductors::UseBorelFlag=Reductors::DontUseBorel,
97               const UseDynamicAlgFlag IsDynamic=DontUseDynamicAlg,
98               const GBCriteria criteria=GBCriteria(GBCriteria::AllSet));
myReductorsLen()99     long myReductorsLen()const {return myTrueReductors.myLen();};
myGBasisLen()100     long myGBasisLen()const {return myGB.size();};
myPairsLen()101     long myPairsLen() const{return myPairs.size();};
myPreparationDone()102     bool myPreparationDone() const{return myPrepared;};
IsDynamic()103     bool IsDynamic() const{return IsDynamicAlgorithm;};
myGetBuchbergerOpType()104     BuchbergerOpTypeFlag myGetBuchbergerOpType() const{return myBuchbergerOpType;};
mySetBuchbergerOpType(const BuchbergerOpTypeFlag theBuchbergerOpType)105     void mySetBuchbergerOpType(const BuchbergerOpTypeFlag theBuchbergerOpType)
106         {myBuchbergerOpType=theBuchbergerOpType;};
WrongLPPFound()107     bool WrongLPPFound() const{return myWrongLPPFoundValue;};
myStats()108     const Stats& myStats() const{return myStat;}
109     void myGBasis(PolyList&);// GB output
110     void myMinGens(PolyList&);// GB output
111     void myGBasis(GPolyList&);// GB output in GPoly form
112     void myGBasisClear(GPolyList&); ///< GB output in GPoly form
113     void myGBasis(VectorList& outGBasis);
114     void myMinGens(VectorList& outMinGens);
115     void myDoAFFGBasis(); // I am working on sugar selection strategies
116     void myDoGBasis(); ///< flag may be set for using Borel reductors
117     void myDoGBasisTEST(); ///< flag may be set for using Borel reductors
118     RingElem myDoGBasisElimFirst(ConstRefPPMonoidElem ElimIndsProd);
119     void myReduceCurrentSPoly();
120     void myPrepareGBasis(); ///< flag may be set for using Borel reductors
121     void myFinalizeGBasis();//Last operations (stats at the moment) immediately before shutting down a GB computation
122     void myDoGBasis(const int ReductionNumber); // Performs ReductionNumber reductions, -1 means unlimited
123     void myReduceUntilNonZeroRedSPoly(); // Reduces until an SPoly does not reduces to zero. Stop immediately when that happens (no updates)
124      // DYNAMIC ALG: reduces until a non zero SPoly has a LPP with is different from the best possibile LPP w.r.t. HPoly.
125      // In that case, settles the WrongLPP filed in the reductor.
126     void myReduceUntilWrongLPPFound(RefPPMonoidElem,
127                                     std::vector<RingElem>& );
GetSPoly()128     GPoly GetSPoly()const{return mySPoly;};// Reads the SPoly
129     void GetCandidateGBasis(PolyList&)const;// the polys computed up to now and the non processed generators
myAge()130     long myAge() const {return myAgeValue;}
GetNReductions()131     long GetNReductions()const{return myStat.myNReductions;};
SetSPoly(GPoly & p)132     void SetSPoly(GPoly& p){mySPoly=p;};// Sets the SPoly
133     void myDoGBasisRealSolve();
134     void myDoGBasisSelfSatCore(); ///< dehomog algorithm
135     ////    void _myDoSATGBasis(); ///< dehomog algorithm
136     ////    void myDoSATMixGBasis(); ///< dehomog mix algorithm
137     void myStampaPPGB(std::ostream&)const; ///< print ?
138     void myStampaGB(std::ostream&)const; ///< print ?
139     void myStampaPairs(std::ostream&)const; ///< print ?
140     void myStampaReductors(std::ostream&)const; ///< print ?
myStampaStats(std::ostream & out)141     void myStampaStats(std::ostream& out) const{myStat.myStampa(out);}; ///< print ?
142     friend std::ostream& operator<<(std::ostream& out, const GReductor& GR);
myPRing()143     const SparsePolyRing& myPRing()const{return myGRingInfoValue.myNewSPR();};
myGRingInfo()144     const GRingInfo& myGRingInfo()const{return myGRingInfoValue;};
145     void Rebuild(const PolyList&);///< rebuild the GReductor initliazinig it with the PL
146     void myUpdateBasisOnly();///<Updates the Basis only.
147     void myCreatePairs();// this should be const, but this requires
148                                    //the GPair ctor to be const, and I have to think about that
149     void myCreateInputPolyPairs(GPolyList&);
150     void myDoGBasisByBatch();//Tmp, DYNAMIC
151     void myPrepareGBasisPairsExcluded();//Tmp, DYNAMIC
152     void myBuildNewPairsAll(GPairList&);//Tmp, DYNAMIC
153 
154 
155   public:
156     static int ourDefaultStatLevel; ///< default verbosity level for statistics
157   private:
158     const GRingInfo myGRingInfoValue;
159     GPairList myPairs;// here the polys are ptrs to myPolys
160     Reductors myTrueReductors;// the true reductors.
161     GPolyPtrList myGB;// the candidate Gbasis - NB polys are ptrs to myPolys
162     GPolyList myPolys;// the REAL Polys, the other are ptrs
163     GPoly mySPoly;
164     degree myOldDeg;// used for flow control and stats. The degree it refers to is the degree of the pair
165     degree myCurrentPairDeg;// used for flow control and stats. The degree itrefers is that of the pair
166     Stats myStat;// the statistics
167     bool myPrepared; // Default false. True after a myPrepareGBasis has been performed
168     long myAgeValue;
169     bool IsDynamicAlgorithm;
170     bool myWrongLPPFoundValue; // DYNAMIC ALGORITHM
171     GBCriteria myCriteria;
172     BuchbergerOpTypeFlag myBuchbergerOpType; // Type of operation performed on the reductor
173 //    CpuTimeLimit myCheckForTimeout;
174 
175     long myGMInsert(GPairList&,GPair);
176     void myBuildNewPairs(GPairList&);
177     void myUpdateBasisAndPairs();
178     void myUpdateBasisAndPairs(const GPoly& inPoly);
179     void myApplyBCriterion();
180 
181 // These two should go in GPoly (interface) with the
182 // real body in PolyRing
183 //void smart_dehomog(GPoly&,long);
184 //void smart_dehomog_DRL(GPoly&,long);
185 
186   };// End class GReductor
187 
188    void monic(PolyList&);
189 
190    const GRingInfo& GetGRI(const GPolyList& theGPL);
191    FreeModule owner(const VectorList& theVL);
192 
193     enum ModOrdTypeForcing {NoForcing,PosWDegTO,WDegTOPos,WDegPosTO};
194     SparsePolyRing MakeNewPRingFromModule(const FreeModule& FM);
195     SparsePolyRing MakeNewPRingFromModule(const FreeModule& FM,ModOrdTypeForcing MOType);
196     SparsePolyRing MakeNewPRingForSimpleEmbedding(const SparsePolyRing& theOldP);
197     SparsePolyRing MakeNewPRingForSimpleEmbedding(const SparsePolyRing& theOldP,ModOrdTypeForcing MOType);
198     FreeModule MakeNewFreeModuleForSyz(const GPolyList& GPL);
199     FreeModule MakeNewFreeModuleForSyz(const VectorList& VL);
200     FreeModule MakeNewFreeModuleForSyz(const PolyList& PL);
201     SparsePolyRing MakeElimRingFromOld(const SparsePolyRing& theOldP,
202                                        const std::vector<long>& theElimVars,
203 				       const bool IsHomog);
204     SparsePolyRing MakeNewPRingFromModulePosFirst(const FreeModule& FM,
205 					          bool HomogInput);
206 
207     SparsePolyRing MakeNewPRingForSimpleEmbeddingPosFirst(const SparsePolyRing& OldP,
208                                                           bool HomogInput);
209     // Embed p in the CompIndex component, grading given by the embedding
210     GPoly EmbedPoly(ConstRefRingElem p,
211                     const GRingInfo& theGRI,
212                     const long CompIndex);
213     // Embed p in the CompIndex component, grading given by the_d
214     GPoly EmbedPoly(ConstRefRingElem p,
215                     const GRingInfo& theGRI,
216                     const degree& the_d,
217                     const long CompIndex);
218 
219    // Embed v
220     GPoly EmbedVector(const ModuleElem& v,
221     		      const GRingInfo& theGRI);
222 
223    // Embed v starting from the StartingFromCompIndex component
224     GPoly EmbedVector(const ModuleElem& v,
225                       const GRingInfo& theGRI,
226                       const long StartingFromCompIndex);
227 
228    // Embed theVL
229     GPolyList EmbedVectorList(const VectorList& theVL,
230                               const GRingInfo& theGRI);
231     // Embed theVL starting from the StartingFromCompIndex component
232     GPolyList EmbedVectorList(const VectorList& theVL,
233                               const GRingInfo& theGRI,
234                               const long StartingFromCompIndex);
235 
236     // Just transform the PolyList in a GPolyList
237     GPolyList EmbedPolyList(PolyList& thePL,
238                             const GRingInfo& theGRI);
239 
240 
241     GPolyList EmbedPolyList(const PolyList& thePL,
242                             const GRingInfo& theGRI,
243                             const degree& the_d,
244                             const long CompIndex);
245 
246     // Embed with the shifts Shifts
247     GPolyList EmbedPolyList(const PolyList& InputPolyList,
248                             const GRingInfo& theGRI,
249                             const long CompIndex);
250 
251     // The embedding used in syzygy computations
252     GPolyList SyzEmbedVectorList(const VectorList& InputVectorList,
253                                  const GRingInfo& theGRI);
254   // The embedding used in syzygy computations
255     GPolyList SyzEmbedPolyList(const PolyList& InputPolyList,
256                                  const GRingInfo& theGRI);
257 
258     // The embedding used in intersection computations
259     GPolyList IntEmbedVectorLists(const VectorList& VL1,
260                                   const VectorList& VL2,
261                                   const GRingInfo& theGRI);
262 
263     // The embedding used in intersection computations
264     GPolyList IntEmbedPolyLists(const PolyList& PL1,
265                                 const PolyList& PL2,
266                                 const GRingInfo& theGRI);
267 
268   // The special poly embedding used in colon computations
269     GPolyList ColonEmbedVectorLists(const VectorList& VL1,
270                                     const VectorList& VL2,
271                                     const GRingInfo& theGRI);
272 
273     GPolyList ColonEmbedPolyLists(const PolyList& PL1,
274                                   const PolyList& PL2,
275                                   const GRingInfo& theGRI);
276 
277     void SyzEmbedGPolyList(GPolyList& theGPL);
278 
279     void IntEmbedGPolyList(GPolyList& theGPL1, GPolyList& theGPL2);
280 
281     void ColonEmbedGPolyList(GPolyList& theGPL, GPoly& the_gp);
282 
283   ModuleElem DeEmbedPoly(ConstRefRingElem p,
284                          const GRingInfo& theGRI,
285                          const long ComponentsLimit); // the component in p that goes to the 0 component of the output vector v. Lesser components of p go to higher component of v
286 
287     ModuleElem DeEmbedPoly(ConstRefRingElem p,
288                            const GRingInfo& theGRI);
289 
290     VectorList DeEmbedPolyList(const PolyList& PL,
291                                const GRingInfo& theGRI);
292 
293     VectorList DeEmbedPolyList(const PolyList& PL,
294                                const GRingInfo& theGRI,
295                                const long ComponentsLimit); // Poly whose LPP has last var degree bigger than this number disappear on DeEmbedding
296 
297 
298 
299     void DeEmbedPoly(ModuleElem& theOutputP,
300                      const GPoly& the_gp,
301                      const long ComponentsLimit); // the component in p that goes to the 0 component of the output vector v. Lesser components of p go to higher component of v
302 
303     void DeEmbedPoly(ModuleElem& theOutputP,
304                      GPoly& the_gp);
305 
306     void DeEmbedPolyList(VectorList& theOutputVL,
307                          GPolyList& theGPL);
308 
309     void DeEmbedPolyList(VectorList& theOutputVL,
310                          const GPolyList& theGPL,
311                          const long ComponentsLimit); // Poly whose LPP has last var degree bigger than this number disappear on DeEmbedding
312 
313     void DeEmbedPoly(RingElem& theOutputP,
314                       GPoly& the_gp); // Poly whose LPP has last var degree bigger than this number disappear on DeEmbedding
315 
316     void DeEmbedPolyList(PolyList& theOutputPL,
317                          GPolyList& theGPL,
318                          const long ComponentsLimit); // Poly whose LPP has last var degree bigger than this number disappear on DeEmbedding
319 
320     // input are embedded polys, output true (OldP) Polys
321     // this is done directly and not passing through a VectorList to avoid copying
322     RingElem DeEmbedPolyToP(ConstRefRingElem the_p,
323                             const GRingInfo& theGRI);
324 
325     PolyList DeEmbedPolyListToPL(const PolyList& PL,
326                                  const GRingInfo& theGRI,
327                                  const long ComponentsLimit); // Poly whose LPP has last var degree bigger than this number disappear on DeEmbedding
328 
329 
330     void PolyList2GPolyList(const PolyList&,GPolyList&,const GRingInfo&);
331     void GPolyList2PolyList(const GPolyList&,PolyList&);
332     void PolyList2GPolyListClear(PolyList&,GPolyList&,const GRingInfo&);
333     void GPolyList2PolyListClear(GPolyList&,PolyList&);
334     RingElem homog(ConstRefRingElem the_p, const std::vector<RingElem>& the_Y); ///< hp = hom(p,y) in the ring with the y's
335     void homogenized(ModuleElem& the_hv,
336                      const ModuleElem& the_v,
337                      const GRingInfo& theGRI);
338     std::vector<long> PolyList2IndexList(const PolyList&);
339     PPMonoidElem IndexList2PPMonoidElem(const PPMonoid&,
340                                         const std::vector<long>&);
341     std::vector<long> PPMonoidElem2IndexList(ConstRefPPMonoidElem);
342     bool IsHomog(const PolyList&);
343     bool IsHomog(const VectorList&);
344     std::vector<degree> DegStructure(ConstRefRingElem);
345     std::vector<std::vector<degree> > DegStructure(const ModuleElem&);
346     std::vector<std::vector<degree> > DegStructure(const PolyList&);
347     std::vector<std::vector<std::vector<degree> > > DegStructure(const VectorList&);
348     PolyList MakePolyList(ConstRefRingElem);
349     VectorList MakeVectorList(const ModuleElem&);
350     RingElem CoeffCommonDenominator(ConstRefRingElem f);
351     PolyList WithoutDenominators(const PolyList& PL, SparsePolyRing Rx);
352     PolyList WithDenominator1Hom(const PolyList& PL, SparsePolyRing P);
353 
354 
355 }// end namespace cocoa
356 
357 
358 
359 // $Header: /Volumes/Home_1/cocoa/cvs-repository/CoCoALib-0.99/include/CoCoA/TmpGReductor.H,v 1.37 2018/06/27 12:15:18 abbott Exp $
360 // $Log: TmpGReductor.H,v $
361 // Revision 1.37  2018/06/27 12:15:18  abbott
362 // Summary: Renamed RealSolveCore to RealSolve
363 //
364 // Revision 1.36  2018/06/27 08:50:39  abbott
365 // Summary: Revised to work with new CpuTimeLimit
366 //
367 // Revision 1.35  2018/05/25 09:24:46  abbott
368 // Summary: Major redesign of CpuTimeLimit (many consequences)
369 //
370 // Revision 1.34  2017/11/29 17:48:15  bigatti
371 // -- added GBasisRealSolveCore
372 // -- added myUpdateBasisAndPairs with one arg
373 // -- some comments
374 //
375 // Revision 1.33  2017/11/24 17:46:40  bigatti
376 // -- renamed GBasisSelfSat --> GBasisSelfSatCore
377 // -- added GBasisSelfSat in cpkg5
378 //
379 // Revision 1.32  2017/11/23 12:37:40  bigatti
380 // -- added GBasisSelfSat
381 //
382 // Revision 1.31  2017/05/02 12:16:02  bigatti
383 // -- removed NewSparsePolyRing (now NewPolyRing does the same)
384 //
385 // Revision 1.30  2017/04/28 13:54:19  bigatti
386 // -- minor cleaning
387 // -- renamed AllGraded --> HOMOG, AllAffine --> NOGRADING
388 //
389 // Revision 1.29  2017/04/18 09:28:03  bigatti
390 // -- removed StatLevel member field (now using VerbosityLevel)
391 //
392 // Revision 1.28  2015/03/04 10:17:34  bigatti
393 // -- added (..)ElimFirst
394 //
395 // Revision 1.27  2014/03/26 15:23:44  bigatti
396 // -- added MinGens for submodules
397 //
398 // Revision 1.26  2013/10/28 13:16:47  bigatti
399 // -- myCreateSpecialPairs --> myCreateInputPolyPairs
400 //
401 // Revision 1.25  2013/06/12 08:51:43  bigatti
402 // -- added mySetMinimalGen
403 // -- commented out unused code
404 //
405 // Revision 1.24  2013/01/31 11:42:14  bigatti
406 // -- added myStats()
407 //
408 // Revision 1.23  2012/10/16 09:54:27  abbott
409 // Replaced  RefRingElem  by  RingElem&
410 // Modified many calls to  myAppendClear  (because a temporary value will
411 // not match a non-const reference in a fn call).
412 //
413 // Revision 1.22  2012/10/03 12:26:08  bigatti
414 // -- changed homogenized --> homog: now returns a RingElem (instead of void)
415 //
416 // Revision 1.21  2011/12/05 16:54:40  bigatti
417 // -- changed: MachineInteger --> MachineInt (just in comment)
418 //
419 // Revision 1.20  2011/03/22 11:25:49  bigatti
420 // -- unsigned long --> long
421 //
422 // Revision 1.19  2011/03/11 17:42:09  bigatti
423 // -- changed  unsigned int --> long
424 //
425 // Revision 1.18  2011/03/11 15:46:50  bigatti
426 // -- only whitespaces
427 //
428 // Revision 1.17  2011/03/11 15:31:58  bigatti
429 // -- indentation
430 //
431 // Revision 1.16  2011/03/11 14:50:39  abbott
432 // Changed some size_t into long.
433 //
434 // Revision 1.15  2011/03/10 16:39:34  abbott
435 // Replaced (very many) size_t by long in function interfaces (for rings,
436 // PPMonoids and modules).  Also replaced most size_t inside fn defns.
437 //
438 // Revision 1.14  2010/07/27 07:37:13  bigatti
439 // -- new class GBCriteria, simplified GReductor ctor
440 //
441 // Revision 1.13  2010/07/16 09:29:58  bigatti
442 // -- minor cleaning and coding conventions
443 //
444 // Revision 1.12  2010/05/14 09:53:09  bigatti
445 // -- removed empty ctor for SugarDegree
446 // -- added marker for SugarDegree(uninitialized)
447 // -- SugarDegree for GBasis input is initialized by myPrepareGBasis
448 //
449 // Revision 1.11  2010/03/23 14:43:07  bigatti
450 // -- class GRingInfo estracted from TmpGPoly
451 //
452 // Revision 1.10  2009/04/27 13:16:13  bigatti
453 // -- added BuchbergerOpTypeMarker
454 //
455 // Revision 1.9  2009/03/20 17:37:18  bigatti
456 // -- added IsCopCriterionActive
457 //
458 // Revision 1.8  2009/01/30 13:41:50  bigatti
459 // -- enum instead of bool arguments
460 //
461 // Revision 1.7  2008/09/19 14:08:16  bigatti
462 // -- modified GRStats (M.Caboara)
463 //
464 // Revision 1.6  2008/07/09 16:08:40  abbott
465 // Added missing ampersand (for C++ const reference).
466 //
467 // Revision 1.5  2008/04/21 12:32:54  abbott
468 // Corrected size_t into std::size_t in several header files; in some cases,
469 // replaced size_t with MachineInt (with consequent changes to impl files).
470 //
471 // Revision 1.4  2008/03/12 16:35:18  bigatti
472 // -- changed: IsHomogeneous --> IsHomog
473 // -- changed: ERR:ZeroPoly --> ERR::ZeroRingElem
474 //
475 // Revision 1.3  2007/11/09 10:45:52  bigatti
476 // -- [caboara] preparation for self-saturating algorithm
477 //
478 // Revision 1.2  2007/10/30 17:14:11  abbott
479 // Changed licence from GPL-2 only to GPL-3 or later.
480 // New version for such an important change.
481 //
482 // Revision 1.1  2007/03/09 18:56:56  bigatti
483 // -- added Tmp prefix to Groebner related files
484 //
485 // Revision 1.1.1.1  2007/03/09 15:16:11  abbott
486 // Imported files
487 //
488 // Revision 1.13  2007/03/08 18:42:06  cocoa
489 // Cleaned up whitespace.
490 //
491 // Revision 1.12  2007/03/07 22:24:03  bigatti
492 // -- reintroduced TmpGTypes.H (waiting for a better solution)
493 //
494 // Revision 1.11  2007/03/07 17:04:31  cocoa
495 // -- several changes by M.Caboara: more operations on ideals,
496 //    exception cleaner, coding conventions, WSugar, dynamic
497 //
498 // Revision 1.10  2006/12/06 17:11:16  cocoa
499 // -- removed #include "config.H"
500 //
501 // Revision 1.9  2006/11/24 17:20:07  cocoa
502 // -- reorganized includes of header files
503 //
504 // Revision 1.8  2006/11/22 15:33:39  cocoa
505 // -- changed handling of timings and number of reductions (M.Caboara)
506 //
507 // Revision 1.7  2006/11/20 14:57:17  cocoa
508 // -- added: (standard) sugar for modules
509 // -- fixed: non-homogeneous sysygies
510 // -- minor fixes     [M.Caboara]
511 //
512 // Revision 1.6  2006/10/06 16:46:17  cocoa
513 // -- syzygies for non-homogenous polynomials (Max)
514 // -- wip: evolution of Groebner Framework (Max)
515 //
516 // Revision 1.5  2006/10/06 14:04:16  cocoa
517 // Corrected position of #ifndef in header files.
518 // Separated CoCoA_ASSERT into assert.H from config.H;
519 // many minor consequential changes (have to #include assert.H).
520 // A little tidying of #include directives (esp. in Max's code).
521 //
522 // Revision 1.4  2006/08/17 09:32:26  cocoa
523 // -- added: flags for homogeneous input
524 //
525 // Revision 1.3  2006/08/07 21:23:25  cocoa
526 // Removed almost all publicly visible references to SmallExponent_t;
527 // changed to long in all PPMonoid functions and SparsePolyRing functions.
528 // DivMask remains to sorted out.
529 //
530 // Revision 1.2  2006/07/19 07:13:00  cocoa
531 // -- moved "IsHomogeneous" to SparsePolyRing/FreeModule
532 //
533 // Revision 1.1.1.1  2006/05/30 11:39:36  cocoa
534 // Imported files
535 //
536 // Revision 1.16  2006/05/16 09:01:26  cocoa
537 // -- added "const" to arg of homogenized
538 // -- changed ordering matrix for modules (compatibility with GradedFreeModule)
539 //
540 // Revision 1.15  2006/05/12 17:03:16  cocoa
541 // -- swapped arguments in homogenized
542 //
543 // Revision 1.14  2006/05/11 16:00:22  cocoa
544 // -- fixed spelling of "homogenize"
545 //
546 // Revision 1.13  2006/05/04 14:25:16  cocoa
547 // -- major cleaning of FreeModule: created GradedFreeModule and moved
548 //    some code around
549 //
550 // Revision 1.12  2006/04/27 14:03:27  cocoa
551 // -- tidied up include files
552 //
553 // Revision 1.11  2006/04/26 09:50:40  cocoa
554 // -- added GReductor::ourDefaultStatLevel variable to allow CoCoAServer
555 //    to set statistics level
556 //
557 // Revision 1.10  2006/04/21 16:45:17  cocoa
558 // -- new functions by Max
559 //
560 // Revision 1.9  2006/04/11 16:42:31  cocoa
561 // -- added functions for Elim
562 //
563 // Revision 1.8  2006/03/13 16:56:53  cocoa
564 // -- changed: member data  myGRingInfoValue  is no longer a reference
565 //
566 // Revision 1.7  2006/03/02 13:45:57  cocoa
567 // -- changes by Max
568 //
569 // Revision 1.6  2006/02/13 14:46:45  cocoa
570 // -- changes by Max
571 //
572 // Revision 1.5  2006/02/13 13:45:04  cocoa
573 // -- changes by Max (GRingInfo)
574 //
575 // Revision 1.4  2006/01/18 15:58:20  cocoa
576 // -- new changes my Max
577 //
578 // Revision 1.3  2006/01/17 15:44:56  cocoa
579 // -- chamges by Max for operations with modules
580 //
581 // Revision 1.2  2006/01/17 10:23:08  cocoa
582 // Updated DivMask; many consequential changes.
583 // A few other minor fixes.
584 //
585 // Revision 1.1.1.1  2005/10/17 10:46:54  cocoa
586 // Imported files
587 //
588 // Revision 1.2  2005/07/01 16:08:16  cocoa
589 // Friday check-in.  Major change to structure under PolyRing:
590 // now SparsePolyRing and DUPolyRing are separated (in preparation
591 // for implementing iterators).
592 //
593 // A number of other relatively minor changes had to be chased through
594 // (e.g. IndetPower).
595 //
596 // Revision 1.1.1.1  2005/05/03 15:47:30  cocoa
597 // Imported files
598 //
599 // Revision 1.2  2005/04/19 14:06:04  cocoa
600 // Added GPL and GFDL licence stuff.
601 //
602 // Revision 1.1.1.1  2005/01/27 15:12:13  cocoa
603 // Imported files
604 //
605 // Revision 1.5  2004/10/29 16:02:52  cocoa
606 // -- added field myDivMaskImplPtr for creating GPolys with the same
607 //    DivMask::base
608 // -- calls to LCMwMask (instead of LCM) for fast divisibility tests
609 // -- function IsDivisible had wrong semantics --> swapped arguments everywhere
610 //
611 // Revision 1.4  2004/06/16 16:13:41  cocoa
612 // Improved I/O facilities with knock-on changes
613 //
614 // Revision 1.3  2004/03/04 11:37:17  cocoa
615 // -- updated code for Borel reductors:
616 //    ReductorData fields: myGPoly->myGPolyPtr;  new: myCount, IamBorelUpdated
617 //    myBorelReductors is now in Reductors (was in GReductor)
618 //    Reductors: field: IhaveBorelReductors;  type: enum UseBorelMarker
619 //
620 // Revision 1.2  2003/10/09 12:16:38  cocoa
621 // New coding convention for rings.
622 //
623 // Revision 1.11  2003/06/23 17:09:54  abbott
624 // Minor cleaning prior to public release.
625 // Improved the include directives,
626 //
627 // Revision 1.10  2003/05/29 16:49:58  bigatti
628 // - change: myRingSpecialIndex is now an int
629 // - added:  flag for criterion (to be disables for non-comm Groebner)
630 //
631 // Revision 1.9  2003/05/28 14:23:09  bigatti
632 // - new code for modules
633 //
634 // Revision 1.8  2003/05/14 17:06:07  bigatti
635 // - new functions for "BorelReductorsPolys" and saturating algorithm
636 //
637 // Revision 1.7  2002/09/19 17:25:28  bigatti
638 // - Cleaner code based on PolyRing
639 //
640 // Revision 1.6  2002/05/13 11:47:34  bigatti
641 // - new data structure for "Reductors"
642 //
643 // Revision 1.5  2002/04/15 17:17:30  bigatti
644 // - Max's new code
645 //
646 // Revision 1.4  2002/04/09 14:21:57  bigatti
647 // - CKR criterion
648 //
649 // Revision 1.3  2002/01/31 17:29:47  bigatti
650 // - new function: Stampa_Reductors_Stats
651 //
652 // Revision 1.2  2001/12/12 18:19:55  bigatti
653 // - new structure of reduction
654 //
655 // Revision 1.1  2001/12/05 13:27:48  bigatti
656 // Initial revision
657 //
658 
659 #endif
660