My Project
Loading...
Searching...
No Matches
kLiftstd.cc File Reference
#include "kernel/mod2.h"
#include "omalloc/omalloc.h"
#include "kernel/GBEngine/kutil.h"
#include "misc/options.h"
#include "kernel/polys.h"
#include "kernel/ideals.h"
#include "kernel/GBEngine/kstd1.h"
#include "kernel/GBEngine/khstd.h"
#include "polys/kbuckets.h"
#include "polys/prCopy.h"
#include "polys/weight.h"
#include "misc/intvec.h"
#include "polys/nc/nc.h"

Go to the source code of this file.

Macros

#define START_REDUCE   512
 

Functions

static poly kSplitAt (int k, TObject *h, kStrategy strat)
 
static poly kSplitAt (int k, LObject *h, kStrategy strat)
 
static void kAppend (poly t, TObject *h)
 
static poly lazyComp (number *A, poly *M, poly *T, int index, poly s, int *l, const ring tailR)
 
int redLiftstd (LObject *h, kStrategy strat)
 
static void setUnit (int e, ideal *unit)
 
ideal idDivRem (ideal A, const ideal quot, ideal &factor, ideal *unit, int lazyReduce)
 

Macro Definition Documentation

◆ START_REDUCE

#define START_REDUCE   512

Function Documentation

◆ idDivRem()

ideal idDivRem ( ideal A,
const ideal quot,
ideal & factor,
ideal * unit,
int lazyReduce )

Definition at line 347 of file kLiftstd.cc.

348{
349 /* special cases */
350 if (idIs0(A) || idIs0(quot))
351 {
352 factor=idInit(1,IDELEMS(quot));
353 setUnit(A->rank,unit);
354 return idCopy(A);
355 }
356 /* ideal or module? */
357 ring orig_ring=currRing;
358 int k=id_RankFreeModule(quot,orig_ring);
359 int lsmod=0;
360 if (k==0) { lsmod=1;k=1;} /*ideal*/
361 /* NF(A 0 E,quot E 0)
362 * A,quot: 1..k, 0,E: k+1..k+IDELEMS(quot),
363 * E,0: k+IDELEMS(quot)..k+IDELEMS(quot)+IDELEMS(A) */
364 /* new ring */
365 ring syz_ring=rAssure_SyzOrder(orig_ring,TRUE);
366 rSetSyzComp(1,syz_ring);
367 rChangeCurrRing(syz_ring);
368 /* move ideals to new ring */
369 ideal s_quot;
370 ideal s_A;
371 if (orig_ring != syz_ring)
372 {
373 s_quot=idrCopyR_NoSort(quot,orig_ring,syz_ring);
374 s_A=idrCopyR_NoSort(A,orig_ring,syz_ring);
375 }
376 else
377 {
378 s_quot=id_Copy(quot,syz_ring);
379 s_A=id_Copy(A,syz_ring);
380 }
381 /* quot[i] -> quot[i]+e(k+i+1) */
382 for(int i=0;i<IDELEMS(s_quot);i++)
383 {
384 p_Shift(&s_quot->m[i],lsmod,syz_ring);
385 poly p=p_One(syz_ring);
386 p_SetComp(p,k+i+2,syz_ring);
387 p_Setm(p,syz_ring);
388 s_quot->m[i]=p_Add_q(s_quot->m[i],p,syz_ring);
389 }
390 s_quot->rank=k+IDELEMS(quot)+1;
391 /* A[i] -> A[i]*e(1) */
392 if (lsmod==1)
393 {
394 for(int i=0;i<IDELEMS(s_A);i++)
395 {
396 p_Shift(&s_A->m[i],1,syz_ring);
397 }
398 }
399 if (unit!=NULL)
400 {
401 int u_k=k+IDELEMS(quot)+2;
402 for(int i=0;i<IDELEMS(s_A);i++)
403 {
404 poly p=p_One(syz_ring);
405 p_SetComp(p,u_k+i,syz_ring);
406 p_Setm(p,syz_ring);
407 s_A->m[i]=p_Add_q(s_A->m[i],p,syz_ring);
408 }
409 s_A->rank=k+IDELEMS(quot)+IDELEMS(A)+1;
410 }
411 /* normalform */
412 #if 0
413 PrintS("to reduce:\n");
414 {
415 void ipPrint_MA0(matrix m, const char *name);
417 ipPrint_MA0(m, "A");
418 id_Delete((ideal *) &m,currRing);
419 }
420 PrintS("with:\n");
421 {
422 void ipPrint_MA0(matrix m, const char *name);
424 ipPrint_MA0(m, "B");
425 id_Delete((ideal *) &m,currRing);
426 }
427 #endif
428 ideal rest=kNF(s_quot,syz_ring->qideal,s_A,0,lazyReduce);
429 #if 0
430 PrintS("result NF:\n");
431 {
432 void ipPrint_MA0(matrix m, const char *name);
434 ipPrint_MA0(m, "A");
435 id_Delete((ideal *) &m,currRing);
436 }
437 #endif
438 /* clean s_quot,s_A */
439 id_Delete(&s_quot,syz_ring);
440 id_Delete(&s_A,syz_ring);
441 /* interpret rest: remainder */
442 ideal result=idInit(IDELEMS(rest),A->rank);
443 for(int i=0;i<IDELEMS(rest);i++)
444 {
445 poly p=rest->m[i];
446 poly d=NULL;
447 while(p!=NULL)
448 {
449 poly q=p; pIter(p);
450 pNext(q)=NULL;
451 if (p_GetComp(q,syz_ring)<=k)
452 {
453 result->m[i]=p_Add_q(result->m[i],q,syz_ring);
454 }
455 else
456 {
457 d=p_Add_q(d,q,syz_ring);
458 }
459 }
460 rest->m[i]=d;
461 p_Shift(&result->m[i],-lsmod,syz_ring);
462 }
463 #if 0
464 PrintS("rest:\n");
465 {
466 void ipPrint_MA0(matrix m, const char *name);
468 ipPrint_MA0(m, "_");
469 id_Delete((ideal *) &m,currRing);
470 }
471 #endif
472 #if 0
473 PrintS("factor+unit:\n");
474 {
475 void ipPrint_MA0(matrix m, const char *name);
477 ipPrint_MA0(m, "_");
478 id_Delete((ideal *) &m,currRing);
479 }
480 #endif
481 /* interpret rest: factors */
482 factor=idInit(IDELEMS(rest),IDELEMS(quot));
483 if (unit==NULL)
484 {
485 for(int i=0;i<IDELEMS(rest);i++)
486 {
487 poly p=rest->m[i];
488 p_Shift(&p,-k-lsmod,syz_ring);
489 factor->m[i]=p;
490 factor->m[i]=p_Neg(factor->m[i],syz_ring);
491 rest->m[i]=NULL;
492 }
493 }
494 else
495 {
496 *unit=idInit(IDELEMS(A),IDELEMS(A));
497 /* comp k+1..u_k-1 -> rest, u_k.. -> unit*/
498 int u_k=k+IDELEMS(quot)+2;
499 for(int i=0;i<IDELEMS(rest);i++)
500 {
501 poly p=rest->m[i];
502 rest->m[i]=NULL;
503 poly d=NULL;
504 while(p!=NULL)
505 {
506 poly q=p; pIter(p);
507 pNext(q)=NULL;
508 if(p_GetComp(q,syz_ring)<u_k)
509 {
510 p_Shift(&q,-k-1,syz_ring);
511 factor->m[i]=p_Add_q(factor->m[i],q,syz_ring);
512 }
513 else
514 {
515 d=p_Add_q(d,q,syz_ring);
516 }
517 }
518 (*unit)->m[i]=d;
519 /*fix sign:*/
520 factor->m[i]=p_Neg(factor->m[i],syz_ring);
521 p_Shift(&(*unit)->m[i],-(IDELEMS(quot)+k+1),syz_ring);
522 }
523 }
524 id_Delete(&rest,syz_ring);
525 if (orig_ring != syz_ring)
526 {
527 rChangeCurrRing(orig_ring);
528 result=idrMoveR_NoSort(result, syz_ring, orig_ring);
529 factor=idrMoveR(factor, syz_ring, orig_ring);
530 if (unit!=NULL)
531 {
532 *unit=idrMoveR(*unit, syz_ring, orig_ring);
533 }
534 rDelete(syz_ring);
535 }
536 return result;
537}
#define TRUE
Definition auxiliary.h:101
int m
Definition cfEzgcd.cc:128
int i
Definition cfEzgcd.cc:132
int k
Definition cfEzgcd.cc:99
int p
Definition cfModGcd.cc:4086
return result
CanonicalForm factor
Definition facAbsFact.cc:97
void ipPrint_MA0(matrix m, const char *name)
Definition ipprint.cc:57
ideal id_Copy(ideal h1, const ring r)
copy an ideal
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
ideal idCopy(ideal A)
Definition ideals.h:60
static void setUnit(int e, ideal *unit)
Definition kLiftstd.cc:334
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
Definition kstd1.cc:3224
ip_smatrix * matrix
Definition matpol.h:43
#define p_GetComp(p, r)
Definition monomials.h:64
#define pIter(p)
Definition monomials.h:37
#define pNext(p)
Definition monomials.h:36
#define NULL
Definition omList.c:12
void p_Shift(poly *p, int i, const ring r)
shifts components of the vector p by i
Definition p_polys.cc:4815
poly p_One(const ring r)
Definition p_polys.cc:1314
static poly p_Neg(poly p, const ring r)
Definition p_polys.h:1109
static poly p_Add_q(poly p, poly q, const ring r)
Definition p_polys.h:938
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
Definition p_polys.h:249
static void p_Setm(poly p, const ring r)
Definition p_polys.h:235
void rChangeCurrRing(ring r)
Definition polys.cc:16
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition polys.cc:13
ideal idrMoveR(ideal &id, ring src_r, ring dest_r)
Definition prCopy.cc:248
ideal idrMoveR_NoSort(ideal &id, ring src_r, ring dest_r)
Definition prCopy.cc:261
ideal idrCopyR_NoSort(ideal id, ring src_r, ring dest_r)
Definition prCopy.cc:205
void PrintS(const char *s)
Definition reporter.cc:284
ring rAssure_SyzOrder(const ring r, BOOLEAN complete)
Definition ring.cc:4522
void rDelete(ring r)
unconditionally deletes fields in r
Definition ring.cc:454
void rSetSyzComp(int k, const ring r)
Definition ring.cc:5230
ideal idInit(int idsize, int rank)
initialise an ideal / module
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
matrix id_Module2Matrix(ideal mod, const ring R)
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
#define IDELEMS(i)
#define A
Definition sirandom.c:24
int name
New type name for int.

◆ kAppend()

static void kAppend ( poly t,
TObject * h )
static

Definition at line 121 of file kLiftstd.cc.

122{
123 poly p;
124 if (h->t_p!=NULL)
125 p=h->t_p;
126 else
127 p=h->p;
128 while(p->next!=NULL) pIter(p);
129 p->next=t;
130 if ((h->p!=NULL)&&(h->t_p!=NULL)) pNext(h->p)=pNext(h->t_p);
131}
STATIC_VAR Poly * h
Definition janet.cc:971

◆ kSplitAt() [1/2]

static poly kSplitAt ( int k,
LObject * h,
kStrategy strat )
static

Definition at line 64 of file kLiftstd.cc.

65{
66 poly p,pr,t=NULL;
67 int l;
68 if (h->bucket!=NULL)
69 {
70 kBucketClear(h->bucket,&p,&l);
71 pr=p;
72 }
73 else
74 {
75 if (h->t_p==NULL)
76 {
77 if (currRing!=strat->tailRing)
78 {
80 p=h->t_p;
81 }
82 else
83 p=h->p;
84 }
85 else
86 p=h->t_p;
87 }
88 const ring tailRing=strat->tailRing;
89 if(p==NULL) return NULL;
90 if (p_GetComp(p,tailRing)>k)
91 {
92 return p;
93 }
94 if (p->next==NULL)
95 {
96 goto finish;
97 }
98 while(p_GetComp(p->next,tailRing)<=k)
99 {
100 pIter(p);
101 if (p->next==NULL) break;
102 }
103 t=p->next;
104 p->next=NULL;
105finish:
106 if (h->bucket!=NULL)
107 {
108 l=pLength(pr);
109 kBucketInit(h->bucket,pr,l);
110 }
111 else
112 {
113 if ((h->p!=NULL) && (h->t_p!=NULL))
114 {
115 pNext(h->p)=pNext(h->t_p);
116 }
117 }
118
119 return t;
120}
int l
Definition cfEzgcd.cc:100
ring tailRing
Definition kutil.h:344
KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing, omBin tailBin)
Definition kInline.h:956
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
Definition kbuckets.cc:521
void kBucketInit(kBucket_pt bucket, poly lm, int length)
Definition kbuckets.cc:493
static int pLength(poly a)
Definition p_polys.h:190

◆ kSplitAt() [2/2]

static poly kSplitAt ( int k,
TObject * h,
kStrategy strat )
static

Definition at line 28 of file kLiftstd.cc.

29{
30 poly p;
31 if (h->t_p==NULL)
32 {
33 if (currRing!=strat->tailRing)
34 {
36 p=h->t_p;
37 }
38 else
39 p=h->p;
40 }
41 else
42 p=h->t_p;
43 if (p->next==NULL) return NULL;
44 const ring tailRing=strat->tailRing;
45 while(p_GetComp(p->next,tailRing)<=k)
46 {
47 pIter(p);
48 if ((p==NULL)||(p->next==NULL))
49 {
50 h->pLength=0; // force re-computation
51 return NULL;
52 }
53 }
54 poly t=p->next;
55 p->next=NULL;
56 h->pLength=0; // force re-computation
57 if ((h->p!=NULL) && (h->t_p!=NULL)
58 && (pNext(h->p)!=pNext(h->t_p)))
59 {
60 pNext(h->p)=pNext(h->t_p);
61 }
62 return t;
63}

◆ lazyComp()

static poly lazyComp ( number * A,
poly * M,
poly * T,
int index,
poly s,
int * l,
const ring tailR )
static

Definition at line 132 of file kLiftstd.cc.

133{
134 if ((TEST_OPT_PROT) && (index>0)) { Print("<%d>",index+1); mflush(); }
137 int cnt=RED_CANONICALIZE;
138 for(int i=0;i<index;i++)
139 {
141 n_Delete(&A[i],tailR->cf);
142 poly tt=T[i];
143 if (tt!=NULL)
144 {
145 cnt--;
146 int dummy=pLength(tt);
147 kBucket_Minus_m_Mult_p(b,M[i],tt,&dummy);
148 }
149 p_Delete(&M[i],tailR);
150 if (UNLIKELY(cnt==0))
151 {
154 }
155 }
156 poly p;
157 kBucketClear(b,&p,l);
159 return p;
160}
#define UNLIKELY(X)
Definition auxiliary.h:405
CanonicalForm b
Definition cfModGcd.cc:4111
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
Definition coeffs.h:459
#define Print
Definition emacs.cc:80
const CanonicalForm int s
Definition facAbsFact.cc:51
STATIC_VAR jList * T
Definition janet.cc:30
void kBucket_Minus_m_Mult_p(kBucket_pt bucket, poly m, poly p, int *l, poly spNoether)
Bpoly == Bpoly - m*p; where m is a monom Does not destroy p and m assume (*l <= 0 || pLength(p) == *l...
Definition kbuckets.cc:722
void kBucket_Mult_n(kBucket_pt bucket, number n)
Multiply Bucket by number ,i.e. Bpoly == n*Bpoly.
Definition kbuckets.cc:598
void kBucketDestroy(kBucket_pt *bucket_pt)
Definition kbuckets.cc:216
kBucket_pt kBucketCreate(const ring bucket_ring)
Creation/Destruction of buckets.
Definition kbuckets.cc:209
int kBucketCanonicalize(kBucket_pt bucket)
Canonicalizes Bpoly, i.e. converts polys of buckets into one poly in one bucket: Returns number of bu...
#define RED_CANONICALIZE
Definition kutil.h:37
#define TEST_OPT_PROT
Definition options.h:105
static int index(p_Length length, p_Ord ord)
static void p_Delete(poly *p, const ring r)
Definition p_polys.h:903
#define mflush()
Definition reporter.h:58
kBucket * kBucket_pt
Definition ring.h:26
#define M
Definition sirandom.c:25

◆ redLiftstd()

int redLiftstd ( LObject * h,
kStrategy strat )

Definition at line 167 of file kLiftstd.cc.

168{
169 if (strat->tl<0) return 1;
170 assume(h->FDeg == h->pFDeg());
172 poly h_p;
173 int i,j,pass,ei, ii, h_d,ci;
174 unsigned long not_sev;
175 long reddeg,d;
176 #define START_REDUCE 512
177 int red_size=START_REDUCE;
178 number *A=(number*)omAlloc0(red_size*sizeof(number));
179 poly *C=(poly*)omAlloc0(red_size*sizeof(poly));
180 poly *T=(poly*)omAlloc0(red_size*sizeof(poly));
181 const ring tailRing=strat->tailRing;
182
183 pass = j = 0;
184 d = reddeg = h->GetpFDeg() + h->ecart;
185 h->SetShortExpVector();
186 int li;
187 h_p = h->GetLmTailRing();
188 not_sev = ~ h->sev;
189
190 // split h into main part (h) and tail (h_tail)
191 poly h_tail=kSplitAt(strat->syzComp,h,strat);
192 // fix h-pLength
193 h->pLength=0;
194 h->PrepareRed(strat->use_buckets);
195 loop
196 {
197 j=kFindDivisibleByInT(strat, h);
198 if (j < 0)
199 {
200 // lazy computation:
201 int l;
202 poly p=lazyComp(A,C,T,pass,h_tail,&l,strat->tailRing);
203 kBucket_Add_q(h->bucket,p,&l);
204 omFreeSize(A,red_size*sizeof(number));
205 omFreeSize(T,red_size*sizeof(poly));
206 omFreeSize(C,red_size*sizeof(poly));
207 return 1;
208 }
209
210 ei = strat->T[j].ecart;
211 li = strat->T[j].pLength;
212 ci = nSize(pGetCoeff(strat->T[j].p));
213 ii = j;
214 /*
215 * the polynomial to reduce with (up to the moment) is;
216 * pi with ecart ei (T[ii])
217 */
218 i = j;
219 if (TEST_OPT_LENGTH)
220 {
221 if (li<=0) li=strat->T[j].GetpLength();
222 if (li>1)
223 loop
224 {
225 /*- possible with respect to ecart, minimal nSize -*/
226 i++;
227 if (i > strat->tl)
228 break;
229 //if (ei < h->ecart)
230 // break;
231 if ((((strat->T[i].ecart < ei) && (ei> h->ecart))
232 || ((strat->T[i].ecart <= h->ecart)
233 && (strat->T[i].pLength <= li)
234 && (nSize(pGetCoeff(strat->T[i].p)) <ci)))
235 &&
236 p_LmShortDivisibleBy(strat->T[i].GetLmTailRing(), strat->sevT[i],
237 h_p, not_sev, tailRing))
238 {
239 /*
240 * the polynomial to reduce with is now;
241 */
242 ei = strat->T[i].ecart;
243 li = strat->T[i].pLength;
244 if (li<=0) li=strat->T[i].GetpLength();
245 ii = i;
246 if (li==1) break;
247 }
248 }
249 }
250
251 /*
252 * end of search: have to reduce with pi
253 */
254#ifdef KDEBUG
255 if (TEST_OPT_DEBUG)
256 {
257 PrintS("red:");
258 h->wrp();
259 Print("\nwith T[%d]:",ii);
260 strat->T[ii].wrp();
261 }
262#endif
263 assume(strat->fromT == FALSE);
264
265 //strat->T[ii].pCleardenom();
266 // split T[ii]:
267 // remember pLength of strat->T[ii]
268 int l_orig=strat->T[ii].pLength;
269 // split strat->T[ii]
270 poly T_tail=kSplitAt(strat->syzComp,&strat->T[ii],strat);
271 h->pLength=0; // force re-computation of length
272 ksReducePoly(h,&(strat->T[ii]),NULL,&A[pass],&C[pass], strat);
273 // restore T[ii]:
274 kAppend(T_tail,&strat->T[ii]);
275 strat->T[ii].pLength=l_orig;
276 // store T_tail
277 T[pass]=T_tail;
278 // delayed computation: A[pass]*tail-M[pass]*T[pass]
279#ifdef KDEBUG
280 if (TEST_OPT_DEBUG)
281 {
282 PrintS("\nto:");
283 h->wrp();
284 PrintLn();
285 }
286#endif
287 if(h->IsNull())
288 {
289 // clean up A,C,h_tail:
290 for(int i=0;i<=pass;i++)
291 {
292 n_Delete(&A[i],tailRing->cf);
293 p_Delete(&C[i],tailRing);
294 }
295 p_Delete(&h_tail,tailRing);
296 kDeleteLcm(h);
297 h->Clear();
298 omFreeSize(A,red_size*sizeof(number));
299 omFreeSize(T,red_size*sizeof(poly));
300 omFreeSize(C,red_size*sizeof(poly));
301 return 0;
302 }
303 h->SetShortExpVector();
304 not_sev = ~ h->sev;
305 h_d = h->SetpFDeg();
306 /* compute the ecart */
307 if (ei <= h->ecart)
308 h->ecart = d-h_d;
309 else
310 h->ecart = d-h_d+ei-h->ecart;
311
312 /*
313 * try to reduce the s-polynomial h
314 *test first whether h should go to the lazyset L
315 *-if the degree jumps
316 *-if the number of pre-defined reductions jumps
317 */
318 pass++;
319 d = h_d + h->ecart;
320 if (pass%RED_CANONICALIZE==0) kBucketCanonicalize(h->bucket);
321 // if cache is to small, double its size:
322 if (pass>=red_size-1)
323 {
324 A=(number*)omRealloc0Size(A,red_size*sizeof(number),2*red_size*sizeof(number));
325 C=(poly*)omRealloc0Size(C,red_size*sizeof(poly),2*red_size*sizeof(poly));
326 T=(poly*)omRealloc0Size(T,red_size*sizeof(poly),2*red_size*sizeof(poly));
327 if(TEST_OPT_PROT) {Print("+%d+",red_size);mflush();}
328 red_size*=2;
329 }
330 }
331}
#define FALSE
Definition auxiliary.h:97
int syzComp
Definition kutil.h:355
TSet T
Definition kutil.h:327
int tl
Definition kutil.h:351
unsigned long * sevT
Definition kutil.h:326
char use_buckets
Definition kutil.h:382
char fromT
Definition kutil.h:378
int j
Definition facHensel.cc:110
static poly lazyComp(number *A, poly *M, poly *T, int index, poly s, int *l, const ring tailR)
Definition kLiftstd.cc:132
static void kAppend(poly t, TObject *h)
Definition kLiftstd.cc:121
#define START_REDUCE
static poly kSplitAt(int k, TObject *h, kStrategy strat)
Definition kLiftstd.cc:28
void kBucket_Add_q(kBucket_pt bucket, poly q, int *l)
Add to Bucket a poly ,i.e. Bpoly == q+Bpoly.
Definition kbuckets.cc:660
int ksReducePoly(LObject *PR, TObject *PW, poly spNoether, number *coef, poly *mon, kStrategy strat, BOOLEAN reduce)
Definition kspoly.cc:187
int kFindDivisibleByInT(const kStrategy strat, const LObject *L, const int start)
return -1 if no divisor is found number of first divisor in T, otherwise
Definition kstd2.cc:321
static void kDeleteLcm(LObject *P)
Definition kutil.h:870
#define assume(x)
Definition mod2.h:389
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
Definition monomials.h:44
#define nSize(n)
Definition numbers.h:39
#define omFreeSize(addr, size)
#define omAlloc0(size)
#define omRealloc0Size(addr, o_size, size)
#define TEST_OPT_IDLIFT
Definition options.h:131
#define TEST_OPT_LENGTH
Definition options.h:132
#define TEST_OPT_DEBUG
Definition options.h:110
static BOOLEAN p_LmShortDivisibleBy(poly a, unsigned long sev_a, poly b, unsigned long not_sev_b, const ring r)
Definition p_polys.h:1926
void PrintLn()
Definition reporter.cc:310
#define loop
Definition structs.h:71

◆ setUnit()

static void setUnit ( int e,
ideal * unit )
static

Definition at line 334 of file kLiftstd.cc.

335{
336 if (unit!=NULL)
337 {
338 *unit=idInit(e,e);
339 for(int i=e-1;i>=0;i--)
340 {
341 poly p=pOne();
342 p_Shift(&p,i+1,currRing);
343 (*unit)->m[i]=p;
344 }
345 }
346}
#define pOne()
Definition polys.h:316