187{
189 gc_vector<int> vp;
190 gc_vector<int> thisvp;
191
193 {
195 SF->schreyer_down(
gb[i]->monom,
gb[i]->comp - 1, PAIRS_mon);
196 M->to_varpower(PAIRS_mon, vp);
197 }
198 else
199 M->to_varpower(
gb[i]->monom, vp);
200
201
202
203
204 if (
R->is_skew_commutative())
205 {
207
209 for (
int w = 0; w <
R->n_skew_commutative_vars(); w++)
210 if (find_pairs_exp[
R->skew_variable(w)] > 0)
211 {
212 thisvp.resize(0);
214 Bag *b =
new Bag(
static_cast<void *
>(
nullptr), thisvp);
215 elems.push_back(b);
216 }
217
219 }
220
221
222
223 if (
R->is_quotient_ring())
224 {
225 const MonomialIdeal *Rideal =
R->get_quotient_monomials();
226 for (
Bag& a : *Rideal)
227 {
228
229
230
231 thisvp.resize(0);
234 continue;
235 Bag *b =
new Bag(
static_cast<void *
>(
nullptr), thisvp);
236 elems.push_back(b);
237 }
238 }
239
240
241
242
243 MonomialIdeal *mi_orig =
mi[
gb[i]->comp - 1];
244 for (
Bag& a : *mi_orig)
245 {
248 elems.push_back(b);
249 }
250
251
252
253
254
255 mi_orig->insert_minimal(
new Bag(i, vp));
256
257 MonomialIdeal *new_mi =
new MonomialIdeal(
R, elems);
258
260 for (
Bag& a : *new_mi)
261 {
262 M->from_varpower(a.monom().data(), m);
263 M->mult(m,
gb[i]->monom, m);
264
266 GR->get_flattened_coefficients()->from_long(1), m, i + 1);
268 }
269}
exponents::Exponents exponents_t
static void quotient(ConstExponents a, ConstExponents b, Vector &result)
static bool is_equal(ConstExponents a, ConstExponents b)
static void to_expvector(int n, ConstExponents a, exponents::Exponents result)
static void var(Exponent v, Exponent e, Vector &result)
gc_vector< gbvector * > syzygies
gc_vector< gbvector * > gb
gc_vector< MonomialIdeal * > mi
gbvector * make_syz_term(ring_elem c, const_monomial monom, int comp) const
gc_vector< int > & monom()
#define ALLOCATE_MONOMIAL(byte_len)
typename std::vector< T, gc_allocator< T > > gc_vector
a version of the STL vector, which allocates its backing memory with gc.
#define newarray_atomic(T, len)