57#include <M2/math-include.h>
181 void exponent_syzygy(
const int *exp1,
const int *exp2,
int *exp3,
int *exp4);
322 int *&result_degree);
543 int nterms = -1)
const;
726template <
typename container,
typename fcn>
730 std::cout << header << std::endl;
737 o <<
"[" << count <<
"] = ";
740 std::cout << o.
str();
exponents::ConstExponents const_exponents
exponents::Exponents exponents_t
Append-only GC-backed byte buffer used throughout the engine for text output.
Discrete-log Z/p adapter that represents non-zero residues by their exponent index relative to a gene...
Engine-side free module R^n over a Ring.
bool is_schreyer_encoded() const
void gbvector_mult_by_coeff_to(gbvector *f, ring_elem u)
static GBRing * create_WeylAlgebra(const Ring *K0, const Monoid *M0, const WeylAlgebra *W0)
void exponents_delete(exponents_t e)
gbvector * gbvector_copy(const gbvector *f)
static GBRing * create_SkewPolynomialRing(const Ring *K0, const Monoid *M0, SkewMultiplication skew0)
gbvector * mult_by_term(const FreeModule *F, const gbvector *f, ring_elem u, const int *monom, int comp)
bool gbvector_reduce_lead_term_ZZ(const FreeModule *F, const FreeModule *Fsyz, gbvector *&f, gbvector *&fsyz, const gbvector *g, const gbvector *gsyz)
void gbvector_remove(gbvector *f)
int skew_variable(int i) const
static GBRing * create_PolynomialRing(const Ring *K, const Monoid *M)
void gbvector_remove_content_ZZ(gbvector *f, gbvector *fsyz, bool use_denom, ring_elem &denom) const
bool is_skew_commutative() const
void gbvector_get_lead_monomial(const FreeModule *F, const gbvector *f, int *result)
void gbvector_add_to_zzp(const FreeModule *F, gbvector *&f, gbvector *&g)
bool gbvector_is_equal(const gbvector *f, const gbvector *g) const
void gbvector_text_out(buffer &o, const FreeModule *F, const gbvector *f, int nterms=-1) const
GBRing(const Ring *K0, const Monoid *M0)
int gbvector_lead_component(const gbvector *f)
void divide_exponents(const int *exp1, const int *exp2, int *result) const
const SolvableAlgebra * solvable
const int * skew_monomial_var(int i) const
int skew_mult_sign(int *exp1, int *exp2) const
void gbvector_cancel_lead_terms(const FreeModule *F, const FreeModule *Fsyz, const gbvector *f, const gbvector *fsyz, const gbvector *g, const gbvector *gsyz, gbvector *&result, gbvector *&result_syz)
gbvector * gbvector_parallel_lead_terms(M2_arrayint w, const FreeModule *F, const gbvector *leadv, const gbvector *v)
void reduce_marked_lead_term_heap(const FreeModule *F, const FreeModule *Fsyz, const gbvector *fcurrent_lead, const_exponents exp, gbvector *flead, gbvectorHeap &f, gbvectorHeap &fsyz, const gbvector *marked_in_g, const gbvector *g, const gbvector *gsyz)
bool gbvector_is_zero(const gbvector *f) const
friend class SkewPolynomialRing
void gbvector_mult_by_term(const FreeModule *F, const FreeModule *Fsyz, ring_elem a, const int *m, const gbvector *f, const gbvector *fsyz, gbvector *&result, gbvector *&esult_syz)
int n_skew_commutative_vars() const
friend class GBKernelComputation
size_t exponent_byte_size() const
bool is_weyl_algebra() const
gbvector * gbvector_term(const FreeModule *F, ring_elem coeff, int comp)
gbvector * gbvector_raw_term(ring_elem coeff, const int *monom, int comp)
void find_reduction_monomial(const FreeModule *F, const gbvector *f, const gbvector *g, int &comp, int *&monom)
const Ring * get_flattened_coefficients() const
void reduce_lead_term_heap(const FreeModule *F, const FreeModule *Fsyz, const gbvector *fcurrent_lead, const_exponents exp, gbvector *flead, gbvectorHeap &f, gbvectorHeap &fsyz, const gbvector *g, const gbvector *gsyz)
void gbvector_replace_2by2_ZZ(const FreeModule *F, const FreeModule *Fsyz, gbvector *&f, gbvector *&fsyz, gbvector *&g, gbvector *&gsyz)
void gbvector_remove_content(gbvector *f, gbvector *fsyz, bool use_denom, ring_elem &denom)
void find_reduction_coeffs(const FreeModule *F, const gbvector *f, const gbvector *g, ring_elem &u, ring_elem &v)
void gbvector_combine_lead_terms_ZZ(const FreeModule *F, const FreeModule *Fsyz, const gbvector *f, const gbvector *fsyz, const gbvector *g, const gbvector *gsyz, gbvector *&result, gbvector *&result_syz)
const Monoid * get_flattened_monoid() const
gbvector * new_raw_term()
gbvector * gbvector_lead_term(int n, const FreeModule *F, const gbvector *f)
void gbvector_reduce_with_marked_lead_term(const FreeModule *F, const FreeModule *Fsyz, gbvector *flead, gbvector *&f, gbvector *&fsyz, const gbvector *ginitial, const gbvector *g, const gbvector *gsyz, bool use_denom, ring_elem &denom)
void lower_content_ZZ(gbvector *f, mpz_ptr content) const
void gbvector_negate_to(gbvector *f) const
int gbvector_compare(const FreeModule *F, const gbvector *f, const gbvector *g) const
static GBRing * create_SolvableAlgebra(const Ring *K0, const Monoid *M0, const SolvableAlgebra *R)
void gbvector_add_to(const FreeModule *F, gbvector *&f, gbvector *&g)
void gbvector_auto_reduce(const FreeModule *F, const FreeModule *Fsyz, gbvector *&f, gbvector *&fsyz, const gbvector *g, const gbvector *gsyz)
const gbvector * find_coeff(const FreeModule *F, const gbvector *f, const gbvector *g) const
gbvector * gbvector_copy_term(const gbvector *t)
void gbvector_sort(const FreeModule *F, gbvector *&f)
void gbvector_apply(const FreeModule *F, const FreeModule *Fsyz, gbvector *&f, gbvector *&fsyz, const gbvector *gsyz, const gbvector **elems, const gbvector **elems_syz, const gbvector **quotients)
void gbvector_multidegree(const FreeModule *F, const gbvector *f, int *&result_degree)
void gbvector_auto_reduce_ZZ(const FreeModule *F, const FreeModule *Fsyz, gbvector *&f, gbvector *&fsyz, const gbvector *g, const gbvector *gsyz)
gbvector * gbvector_zero() const
void gbvector_remove_term(gbvector *f)
void gbvector_get_lead_exponents(const FreeModule *F, const gbvector *f, int *result)
void exponent_syzygy(const int *exp1, const int *exp2, int *exp3, int *exp4)
exponents_t exponents_make()
gbvector * gbvector_term_exponents(const FreeModule *F, ring_elem coeff, const int *exp, int comp)
void divide_coeff_exact_to_ZZ(gbvector *f, gmp_ZZ u) const
int gbvector_n_terms(const gbvector *f) const
bool find_reduction_coeffs_ZZ(const FreeModule *F, const gbvector *f, const gbvector *g, ring_elem &v)
void gbvector_reduce_lead_term(const FreeModule *F, const FreeModule *Fsyz, gbvector *flead, gbvector *&f, gbvector *&fsyz, const gbvector *g, const gbvector *gsyz, bool use_denom, ring_elem &denom)
int *const * _skew_monoms
virtual gbvector * mult_by_term1(const FreeModule *F, const gbvector *f, ring_elem u, const int *monom, int comp)=0
gbvector * gbvector_mult_by_coeff(const gbvector *f, ring_elem u)
Polynomial-ring view tuned for the inner loop of classical Buchberger Groebner-basis computations.
GBRingPoly(const Ring *K0, const Monoid *M0)
virtual gbvector * mult_by_term1(const FreeModule *F, const gbvector *f, ring_elem u, const int *monom, int comp)
GBRingSkew(const Ring *K0, const Monoid *M0, SkewMultiplication skew0)
virtual gbvector * mult_by_term1(const FreeModule *F, const gbvector *f, ring_elem u, const int *monom, int comp)
GBRingSolvable(const Ring *K0, const Monoid *M0, const SolvableAlgebra *R0)
virtual gbvector * mult_by_term1(const FreeModule *F, const gbvector *f, ring_elem u, const int *monom, int comp)
virtual ~GBRingSolvable()
GBRingWeyl(const Ring *K0, const Monoid *M0, const WeylAlgebra *R0)
virtual gbvector * mult_by_term1(const FreeModule *F, const gbvector *f, ring_elem u, const int *monom, int comp)
GBRingWeylZZ(const Ring *K0, const Monoid *M0, const WeylAlgebra *R0)
virtual gbvector * mult_by_term1(const FreeModule *F, const gbvector *f, ring_elem u, const int *monom, int comp)
Engine-side commutative monomial monoid: variable names, ordering, multidegree machinery,...
Sign-rule helper used by every ring that has a skew-commutative subset of variables (exterior factor,...
PolyRing subclass for solvable polynomial algebras (PBW-type non-commutative rings where each pair of...
PolyRing subclass for Weyl algebras: polynomial rings with the [d_i, x_i] = 1 derivative-variable com...
gbvector * heap[GEOHEAP_SIZE]
gbvector * remove_lead_term()
const FreeModule * get_freemodule()
ring_elem heap_coeff[GEOHEAP_SIZE]
gbvector * current_value() const
gbvectorHeap(GBRing *GR, const FreeModule *F)
const gbvector * get_lead_term()
gbvector * debug_list(int i)
void mult_by_coeff(ring_elem a)
Engine-wide include prelude — a single point of truth for portability shims.
void displayElements(std::string header, GBRing *R, container a, fcn f)
VALGRIND_MAKE_MEM_DEFINED & result(result)
Monoid — variable count, naming, grading, and monomial order of a polynomial ring.
our_new_delete — per-class opt-in routing of new / delete through bdwgc.
ring_elem — the universal value type carried by every Ring* in the engine.
SkewMultiplication — configuration object naming the skew-commuting variables of a ring.
Pairs a gbvector with its evolving syzygy gbvector.
Engine-wide stylistic constants: LT / EQ / GT codes, INTSIZE, GEOHEAP_SIZE.