\[ 32002 y^82 a + x^32 z^32 ,\\ x^45 + 32002 y^13 z^21 b ,\\ 32002 y^33 z^12 + x^41 c ,\\ 32002 y^33 z^12 d + x^22 ,\\ x^5 y^17 z^22 e + 32002 ,\\ t x y z + 32002 \]
#include <set>
#include <cstdlib>
#include <cstring>
#include <iostream>
using std::set;
using std::cout; using std::endl;
#include "system_constants.hpp"
#include "fields.hpp"
#include "monomial.hpp"
#include "polynomial.hpp"
#include "dynamic_engine.hpp"
#include "algorithm_buchberger_basic.hpp"
#include "algorithm_buchberger_dynamic.hpp"
int main(int argc, char *argv[]) {
if (argc != 3 or (strcmp(argv[2],"stat") and strcmp(argv[2],"dyn"))) {
cout << "need to know method (usually 2) and then if dynamic (stat or dyn)\n";
return 1;
}
bool static_algorithm = true;
if (!strcmp(argv[2],"dyn")) static_algorithm = false;
string X [9] = {"t", "x", "y", "z", "a", "b", "c", "d", "e"} ;
Monomial t11 { 0, 32, 0, 32, 0, 0, 0, 0, 0 };
Monomial t12 { 0, 0, 82, 0, 1, 0, 0, 0, 0 };
Monomial t21 { 0, 45, 0, 0, 0, 0, 0, 0, 0 };
Monomial t22 { 0, 0, 13, 21, 0, 1, 0, 0, 0 };
Monomial t31 { 0, 41, 0, 0, 0, 0, 1, 0, 0 };
Monomial t32 { 0, 0, 33, 12, 0, 0, 0, 0, 0 };
Monomial t41 { 0, 22, 0, 0, 0, 0, 0, 0, 0 };
Monomial t42 { 0, 0, 33, 12, 0, 0, 0, 1, 0 };
Monomial t51 { 0, 5, 17, 22, 0, 0, 0, 0, 1 };
Monomial t52 { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
Monomial t61 { 1, 1, 1, 1, 0, 0, 0, 0, 0 };
Monomial t62 { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
cout << "Computing a Groebner basis for\n\t" << f1
<< ",\n\t" << f2
<< ",\n\t" << f3
<< ",\n\t" << f4
<< ",\n\t" << f5
<< ",\n\t" << f6
<< endl;
list<Abstract_Polynomial *> F;
F.push_back(&f1); F.push_back(&f2); F.push_back(&f3);
F.push_back(&f4); F.push_back(&f5); F.push_back(&f6);
F.sort();
list<Constant_Polynomial *> G;
if (static_algorithm) G =
buchberger(F, method, StrategyFlags::SUGAR_STRATEGY);
F, method, StrategyFlags::SUGAR_STRATEGY, nullptr,
DynamicHeuristic::ORD_HILBERT_THEN_DEG, SKELETON_SOLVER, false
);
cout << "Basis:\n";
cout << '\t';
g->leading_monomial().print(
true, cout, R.
name_list());
delete g;
}
cout << "bye\n";
}