1 #include "vektor.h" 2 #include "printer.h" 3 #include "parser.h" 4 #include "gfanapplication.h" 5 #include "newtonpolytope.h" 6 #include "buchberger.h" 7 #include "wallideal.h" 8 #include "log.h" 9 10 class IsMarkedGroebnerBasisApplication : public GFanApplication 11 { 12 public: helpText()13 const char *helpText() 14 { 15 return "This program checks if a set of marked polynomials is a Groebner basis with respect to its marking. First it is checked if the markings are consistent with respect to a positive vector. Then Buchberger's S-criterion is checked. The output is boolean value.\n"; 16 } IsMarkedGroebnerBasisApplication()17 IsMarkedGroebnerBasisApplication() 18 { 19 registerOptions(); 20 } name()21 const char *name() 22 { 23 return "_ismarkedgroebnerbasis"; 24 } main()25 int main() 26 { 27 FileParser P(Stdin); 28 PolynomialSet g=P.parsePolynomialSetWithRing(); 29 30 bool isConsistent=isMarkingConsistent(g); 31 32 log1 fprintf(Stderr,"Is marking consistent:%i\n",isConsistent); 33 bool isGroebnerBasis=isConsistent; 34 if(isGroebnerBasis) 35 isGroebnerBasis=isMarkedGroebnerBasis(g); 36 fprintf(Stdout,isGroebnerBasis?"true\n":"false\n"); 37 38 return 0; 39 } 40 }; 41 42 static IsMarkedGroebnerBasisApplication theApplication; 43