31 bool parallelizeByDegree)
45 ERROR(
"expected polynomial ring");
50 ERROR(
"cannot use res(...,FastNonminimal=>true) for quotient rings");
55 ERROR(
"cannot use res(...,FastNonminimal=>true) over Weyl algebras");
61 "cannot use res(...,FastNonminimal=>true) over non-commutative "
78 ERROR(
"expected the degree of each variable to be positive");
105 auto result =
new F4ResComputation(origR, R, groebnerBasisMatrix, max_level, numThreads, parallelizeByDegree);
114 for (
int j = 1; j < F->
rank(); j++)
121 for (
int i = 0; i < F->
rank(); i++)
135 std::vector<ResPolynomial> input_polys;
136 for (
int i = 0; i < groebnerBasisMatrix->
n_cols(); i++)
140 input_polys.emplace_back(std::move(f));
144 for (
int j = 0; j < F->
rank(); j++)
147 for (
int i = 0; i < pos->len; i++)
149 int loc = pos->array[i];
151 if (f.
len == 0)
continue;
152 if (MI->get_component(f.
monoms.data()) != j)
continue;
155 MI->copy(f.
monoms.data(), elem);
161 "input polynomials/vectors were computed in a non-compatible "
181 bool parallelizeByDegree)
211 return mComp->getBetti(type);
217 bool stop_after_degree = (slanted_degree_limit->len == 1);
218 int top_slanted_degree = slanted_degree_limit->array[0];
219 int new_length_limit = (length_limit->len == 1 ? length_limit->array[0]
229 stop_after_degree, top_slanted_degree, new_length_limit);
235 o <<
"F4 resolution computation" <<
newline;
242 std::cout <<
"setting error message, returning null" << std::endl;
243 ERROR(
"cannot create differential over this ring");
255 ERROR(
"cannot create differential over this ring");
264 if (lev < 0 or lev >
mComp->maxLevel())
282 frame(), KK, level, slanted_degree);
M2_arrayint getBetti() const
Engine-side Betti table: a (degree, homological level) rectangle of integers.
M2_arrayint get_betti(int type) const
int complete_thru_degree() const
F4ResComputation(const PolynomialRing *origR, ResPolyRing *R, const Matrix *gbmatrix, int max_level, int numThreads, bool parallelizeByDegree)
const Matrix * get_matrix(int level)
std::unique_ptr< SchreyerFrame > mComp
const FreeModule * get_free(int level)
M2_arrayint minimal_betti(M2_arrayint slanted_degree_limit, M2_arrayint length_limit)
virtual ~F4ResComputation()
void text_out(buffer &o) const
std::unique_ptr< ResPolyRing > mRing
const PolynomialRing & mOriginalRing
MutableMatrix * get_mutable_matrix(const Ring *R, int level)
const Matrix & mInputGroebnerBasis
ResolutionComputation subclass that drives the F4 resolution engine (SchreyerFrame + F4Res) from the ...
int primary_degree(int i) const
Engine-side free module R^n over a Ring.
const Ring * get_ring() const
ring_elem elem(int i, int j) const
const FreeModule * rows() const
Matrix * lead_term(int n=-1) const
M2_arrayint sort(int degorder, int monorder) const
const FreeModule * cols() const
bool primary_degrees_of_vars_positive() const
std::vector< int > getPrimaryDegreeVector() const
const MonomialOrdering * getMonomialOrdering() const
std::vector< int > getFirstWeightVector() const
Abstract base class for mutable matrices over an arbitrary engine Ring, the in-place counterpart of t...
virtual bool is_solvable_algebra() const
virtual const Monoid * getMonoid() const
bool is_quotient_ring() const
virtual const Ring * getCoefficients() const
virtual bool is_weyl_algebra() const
const SkewMultiplication & getSkewInfo() const
bool is_skew_commutative() const
Abstract base for the engine's polynomial-ring hierarchy.
static FreeModule * to_M2_freemodule(const PolynomialRing *R, SchreyerFrame &C, int lev)
static MutableMatrix * to_M2_MutableMatrix(SchreyerFrame &C, const Ring *R, int lev)
static void from_M2_vec(const ResPolyRing &R, const FreeModule *F, vec v, ResPolynomial &result)
static Matrix * to_M2_matrix(SchreyerFrame &C, int lev, const FreeModule *tar, const FreeModule *src)
The polynomial-ring view the F4 resolution engine reduces against: coefficient arithmetic plus the en...
std::vector< res_monomial_word > monoms
Polynomial type used by the F4 resolution engine: parallel coefficient vector and concatenated monomi...
Base class for free resolution computation classes.
virtual const PolynomialRing * cast_to_PolynomialRing() const
BettiDisplay minimalBettiNumbers(bool stop_after_degree, int top_slanted_degree, int length_limit)
void insertLevelZero(res_packed_monomial monom, int degree, int maxdeglevel0)
ResMemoryBlock< res_monomial_word > & monomialBlock()
bool insertLevelOne(res_packed_monomial monom, int degree, ResPolynomial &syzygy)
State container for the in-progress free resolution built by the F4 resolution engine.
namespace exc — internal C++ exception types and the TRY / CATCH macro pair.
VALGRIND_MAKE_MEM_DEFINED & result(result)
Matrix — the engine's immutable homomorphism F -> G between free modules.
int moIsLex(const MonomialOrdering *mo)
int moIsGRevLex(const MonomialOrdering *mo)
Engine-boundary C API for assembling block-level MonomialOrderings from declarative pieces.
ResolutionComputation * createF4Res(const Matrix *groebnerBasisMatrix, int max_level, int strategy, int numThreads, bool parallelizeByDegree)
F4ResComputation — top-level Schreyer-frame F4 free-resolution driver.
Conversion layer between engine Matrix / vec types and the F4-resolution internal types.
res_monomial_word * res_packed_monomial
SchreyerFrame — in-progress representation of a free resolution organised by (level,...