OPENF4
Library for Gröebner basis computations over finite fields.
 All Classes Namespaces Files Functions Variables Friends Pages
Tutorial for the GF(2) finite fields

There are three main ways to use the openf4 library (from the simplest to the most involved):

  1. In Sage (not yet available):
    1. R.<x0,x1,x2,x3,x4,x5> = Zmod(2)[]
    2. I = sage.rings.ideal.Cyclic(R,6)
    3. I.groebner_basis('openf4')
  2. As a C++ library:
    1. Include the library header: libopenf4.h.
    2. Link with the library during the compilation: -lopenf4
    3. Use the function groebnerBasisGF2F4(int nbVariable, std::vector<std::string> variableName, std::vector<std::string> polynomialList, int nbThread, int verbose);
    4. Look at the example tutorial-gf2-method2.cpp into the section example.
  3. As a template library:
    1. Include the header openf4.h.
    2. Define the element type:

      • typedef ElementGF2 eltType;

    3. Configure the class monomial with the number of variables and an initial degree for the monomial precomputation.
    4. Create an ideal with a vector of polynomials and others informations: F4::Ideal::Ideal(std::vector<Polynomial<Element>> & polynomialArray, int nbVariable, int capacity, int degree);
    5. Call the method f4: F4::Ideal::f4();
    6. Compile with:
      • -std=c++11 to enable c++11 support
      • -DNDEBUG to disable assertion
      • -fopenmp to use parallelisation
      • -march=native to use vectorisation (if your system support SSE instructions).
      • -03 -funroll-loops -ftree-vectorize (for fast)
      • -Wall -Wno-strict-overflow to enable useful warning.
    7. Link with:
      • -fopenmp to use parallelisation
    8. Look at the example tutorial-gf2-method3.cpp into the section example.