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

◆ reduce_minimal()

void res_comp::reduce_minimal ( int x,
resterm *& f,
VECTOR(res_pair *)& elems ) const
private

Definition at line 1410 of file res-a1.cpp.

1413{
1414 monomial MINIMAL_mon = ALLOCATE_MONOMIAL(monom_size);
1415
1416 // Reduce any components of 'f' that correspond to non minimal syzygies.
1417 const resterm *tm;
1418
1419 for (int i = x - 1; i >= 0; i--)
1420 {
1421 res_pair *p = elems[i];
1422 if (p->syz_type == SYZ_NOT_MINIMAL)
1423 while ((tm = R->component_occurs_in(p->pivot_term->comp, f)) != nullptr)
1424 {
1425 // Subtract the proper multiple to f. f = ... + c m e_y + ...
1426 // and p = ... + d n e_y
1427 // where n|m. So we want to compute f -= c/d m/n p.
1428 ring_elem c =
1429 K->divide(tm->coeff, p->pivot_term->coeff); // exact division
1430 // MES: is the following line actually needed?
1431 M->divide(tm->monom, p->pivot_term->monom, MINIMAL_mon);
1432 if (p->stripped_syz == nullptr) p->stripped_syz = R->strip(p->syz);
1433 R->subtract_multiple_to(f, c, MINIMAL_mon, p->stripped_syz);
1434 }
1435 }
1436}
const Monoid * M
Definition res-a1.hpp:80
res_poly * R
Definition res-a1.hpp:79
const Ring * K
Definition res-a1.hpp:81
size_t monom_size
Definition res-a1.hpp:115
#define monomial
Definition gb-toric.cpp:11
int p
#define ALLOCATE_MONOMIAL(byte_len)
Definition monoid.hpp:65
volatile int x
@ SYZ_NOT_MINIMAL
ring_elem coeff
int monom[1]

References ALLOCATE_MONOMIAL, resterm::coeff, K, M, resterm::monom, monom_size, monomial, p, R, SYZ_NOT_MINIMAL, and x.

Referenced by make_minimal().