Tutorial with f4 sources use for modulo >= 2^32. Use Givaro Modular<Integer> base type for element (based on GMP).
#include <iostream>
using namespace F4;
using namespace std;
int F4::VERBOSE=0;
#ifdef USE_OPENMP
int F4::NB_THREAD=omp_get_num_procs();
#else
int F4::NB_THREAD=1;
#endif
int main (int argc, char **argv)
{
cout << "#########################################################" << endl;
cout << "# TUTORIAL WITH SOURCES USE #" << endl;
cout << "#########################################################" << endl << endl;
typedef Givaro::Modular<Givaro::Integer> Field;
Givaro::Integer modulo(Givaro::Integer("115792089237316195423570985008687907853269984665640564039457584007913129640233"));
Field F(modulo);
typedef ElementGivaro<Field> eltType;
eltType::setField(F);
string * vars = new string[6];
for(int i = 0; i < 6; i++)
{
vars[i]='x'+to_string(i);
}
vector<Polynomial<eltType>> polynomialArray;
polynomialArray.emplace_back("x0+x1+x2+x3+x4+x5");
polynomialArray.emplace_back("x0*x1+x1*x2+x2*x3+x3*x4+x0*x5+x4*x5");
polynomialArray.emplace_back("x0*x1*x2+x1*x2*x3+x2*x3*x4+x0*x1*x5+x0*x4*x5+x3*x4*x5");
polynomialArray.emplace_back("x0*x1*x2*x3+x1*x2*x3*x4+x0*x1*x2*x5+x0*x1*x4*x5+x0*x3*x4*x5+x2*x3*x4*x5");
polynomialArray.emplace_back("x0*x1*x2*x3*x4+x0*x1*x2*x3*x5+x0*x1*x2*x4*x5+x0*x1*x3*x4*x5+x0*x2*x3*x4*x5+x1*x2*x3*x4*x5");
polynomialArray.emplace_back("x0*x1*x2*x3*x4*x5-1");
int nbGen=cyclic6.f4();
cout << "The groebner basis has " << nbGen << " generators " << endl << endl;
vector<string> basis = cyclic6.getReducedGroebnerBasis();
for(size_t i = 0; i < basis.size(); i++)
{
cout << basis[i] << endl;
}
return 0;
}