Macaulay2 Engine
Loading...
Searching...
No Matches

◆ find_reduction_coeffs()

void GBRing::find_reduction_coeffs ( const FreeModule * F,
const gbvector * f,
const gbvector * g,
ring_elem & u,
ring_elem & v )

Definition at line 872 of file gbring.cpp.

877{
878 const ring_elem a = f->coeff;
879 const ring_elem b = g->coeff;
880 K->syzygy(a, b, u, v); // If possible, u==1, anyway, u>0
881
883 {
887 gbvector_get_lead_exponents(F, f, EXP1); // Removes the Schreyer part
888 gbvector_get_lead_exponents(F, g, EXP2); // Removes the Schreyer part
889 divide_exponents(EXP1, EXP2, EXP3);
890 if (_skew.mult_sign(EXP3, EXP2) < 0) K->negate_to(v);
891 }
892}
exponents::Exponents exponents_t
bool is_skew_commutative() const
Definition gbring.hpp:240
void divide_exponents(const int *exp1, const int *exp2, int *result) const
Definition gbring.cpp:807
size_t exp_size
Definition gbring.hpp:169
SkewMultiplication _skew
Definition gbring.hpp:151
const Ring * K
Definition gbring.hpp:138
void gbvector_get_lead_exponents(const FreeModule *F, const gbvector *f, int *result)
Definition gbring.cpp:541
#define ALLOCATE_EXPONENTS(byte_len)
Definition monoid.hpp:62
ring_elem coeff
Definition gbring.hpp:81

References _skew, ALLOCATE_EXPONENTS, gbvector::coeff, divide_exponents(), exp_size, gbvector_get_lead_exponents(), is_skew_commutative(), and K.

Referenced by gbvector_reduce_lead_term(), gbvector_reduce_with_marked_lead_term(), and reduce_marked_lead_term_heap().