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

◆ reduce_minimal()

void res2_comp::reduce_minimal ( int x,
res2term *& f,
VECTOR(res2_pair *)& elems,
VECTOR(res2term *)& stripped ) const
private

Definition at line 2091 of file res-a0.cpp.

2095{
2096 // Reduce any components of 'f' that correspond to non minimal syzygies.
2097 monomial MINIMAL_mon = ALLOCATE_MONOMIAL(monom_size);
2098 const res2term *tm;
2099
2100 for (int i = x - 1; i >= 0; i--)
2101 {
2102 res2_pair *p = elems[i];
2103 if (p->syz_type == SYZ2_NOT_MINIMAL)
2104 while ((tm = R->component_occurs_in(p->pivot_term->comp, f)) != nullptr)
2105 {
2106 // Subtract the proper multiple to f. f = ... + c m e_y + ...
2107 // and p = ... + d n e_y
2108 // where n|m. So we want to compute f -= c/d m/n p.
2109 ring_elem c =
2110 K->divide(tm->coeff, p->pivot_term->coeff); // exact division
2111 // MES: is the following line actually needed?
2112 M->divide(tm->monom, p->pivot_term->monom, MINIMAL_mon);
2113 if (stripped[p->me] == nullptr) stripped[p->me] = R->strip(p->syz);
2114 R->subtract_multiple_to(f, c, MINIMAL_mon, stripped[p->me]);
2115 }
2116 }
2117}
size_t monom_size
Definition res-a0.hpp:193
res2_poly * R
Definition res-a0.hpp:123
const Monoid * M
Definition res-a0.hpp:124
const Ring * K
Definition res-a0.hpp:125
#define monomial
Definition gb-toric.cpp:11
int p
#define ALLOCATE_MONOMIAL(byte_len)
Definition monoid.hpp:65
volatile int x
@ SYZ2_NOT_MINIMAL
ring_elem coeff
int monom[1]

References ALLOCATE_MONOMIAL, res2term::coeff, K, M, res2term::monom, monom_size, monomial, p, R, SYZ2_NOT_MINIMAL, and x.

Referenced by make_minimal().