MCPcopy Create free account
hub / github.com/Singular/Singular / idPrepare

Function idPrepare

kernel/ideals.cc:607–707  ·  view source on GitHub ↗

2 *computes syzygies of h1, *if quot != NULL it computes in the quotient ring modulo "quot" *works always in a ring with ringorder_s */ construct a "matrix" (h11 may be NULL) * h1 h11 * E_n 0 * and compute a (column) GB of it, with a syzComp=rows(h1)=rows(h11) * currRing must be a syz-ring with syzComp set * result is a "matrix": * G 0 * T S * where G: GB of (h1+h1

Source from the content-addressed store, hash-verified

605 * if V_IDLIFT is set, ignore/do not return S
606 */
607static ideal idPrepare (ideal h1, ideal h11, tHomog hom, int syzcomp, intvec **w, GbVariant alg)
608{
609 ideal h2,h22;
610 int j,k;
611 poly p,q;
612
613 assume(!idIs0(h1));
614 k = id_RankFreeModule(h1,currRing);
615 if (h11!=NULL)
616 {
617 k = si_max(k,(int)id_RankFreeModule(h11,currRing));
618 h22=idCopy(h11);
619 }
620 h2=idCopy(h1);
621 int i = IDELEMS(h2);
622 if (h11!=NULL) i+=IDELEMS(h22);
623 if (k == 0)
624 {
625 id_Shift(h2,1,currRing);
626 if (h11!=NULL) id_Shift(h22,1,currRing);
627 k = 1;
628 }
629 if (syzcomp<k)
630 {
631 Warn("syzcomp too low, should be %d instead of %d",k,syzcomp);
632 syzcomp = k;
633 rSetSyzComp(k,currRing);
634 }
635 h2->rank = syzcomp+i;
636
637 //if (hom==testHomog)
638 //{
639 // if(idHomIdeal(h1,currRing->qideal))
640 // {
641 // hom=TRUE;
642 // }
643 //}
644
645 for (j=0; j<IDELEMS(h2); j++)
646 {
647 p = h2->m[j];
648 q = pOne();
649#ifdef HAVE_SHIFTBBA
650 // non multiplicative variable
651 if (rIsLPRing(currRing))
652 {
653 pSetExp(q, currRing->isLPring - currRing->LPncGenCount + j + 1, 1);
654 p_Setm(q, currRing);
655 }
656#endif
657 pSetComp(q,syzcomp+1+j);
658 pSetmComp(q);
659 if (p!=NULL)
660 {
661#ifdef HAVE_SHIFTBBA
662 if (rIsLPRing(currRing))
663 {
664 h2->m[j] = pAdd(p, q);

Callers 4

idSyzygiesFunction · 0.70
idLiftStdFunction · 0.70
idLiftFunction · 0.70
idModuloFunction · 0.70

Calls 15

idIs0Function · 0.85
si_maxFunction · 0.85
idCopyFunction · 0.85
id_ShiftFunction · 0.85
WarnFunction · 0.85
rSetSyzCompFunction · 0.85
rIsLPRingFunction · 0.85
p_SetmFunction · 0.85
id_SimpleAddFunction · 0.85
id_DeleteFunction · 0.85
id_Module2MatrixFunction · 0.85
PrintSFunction · 0.85

Tested by

no test coverage detected