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

Function enterOneStrongPolyShift

kernel/GBEngine/kutil.cc:11638–11799  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11636*/
11637#ifdef HAVE_SHIFTBBA
11638static BOOLEAN enterOneStrongPolyShift (poly q, poly p, int /*ecart*/, int /*isFromQ*/, kStrategy strat, int atR, int /*ecartq*/, int /*qisFromQ*/, int shiftcount, int ifromS)
11639{
11640 number d, s, t;
11641 /* assume(atR >= 0); */
11642 assume(ifromS <= strat->sl);
11643 assume(rField_is_Ring(currRing));
11644 poly m1, m2, gcd;
11645 //printf("\n--------------------------------\n");
11646 //pWrite(p);pWrite(si);
11647 d = n_ExtGcd(pGetCoeff(p), pGetCoeff(q), &s, &t, currRing->cf);
11648
11649 if (nIsZero(s) || nIsZero(t)) // evtl. durch divBy tests ersetzen
11650 {
11651 nDelete(&d);
11652 nDelete(&s);
11653 nDelete(&t);
11654 return FALSE;
11655 }
11656
11657 assume(pIsInV(p));
11658
11659 k_GetStrongLeadTerms(p, q, currRing, m1, m2, gcd, strat->tailRing);
11660
11661 /* the V criterion */
11662 if (!pmIsInV(gcd))
11663 {
11664 strat->cv++;
11665 nDelete(&d);
11666 nDelete(&s);
11667 nDelete(&t);
11668 pLmFree(gcd);
11669 return FALSE;
11670 }
11671
11672 // disabled for Letterplace because it is not so easy to check
11673 /* if (!rHasLocalOrMixedOrdering(currRing)) { */
11674 /* unsigned long sev = pGetShortExpVector(gcd); */
11675
11676 /* for (int j = 0; j < strat->sl; j++) { */
11677 /* if (j == i) */
11678 /* continue; */
11679
11680 /* if (n_DivBy(d, pGetCoeff(strat->S[j]), currRing->cf) && */
11681 /* !(strat->sevS[j] & ~sev) && */
11682 /* p_LmDivisibleBy(strat->S[j], gcd, currRing)) { */
11683 /* nDelete(&d); */
11684 /* nDelete(&s); */
11685 /* nDelete(&t); */
11686 /* return FALSE; */
11687 /* } */
11688 /* } */
11689 /* } */
11690
11691 poly m12, m22;
11692 assume(p_mFirstVblock(p, currRing) <= 1 || p_mFirstVblock(q, currRing) <= 1);
11693 k_SplitFrame(m1, m12, si_max(p_mFirstVblock(p, currRing), 1), currRing);
11694 k_SplitFrame(m2, m22, si_max(p_mFirstVblock(q, currRing), 1), currRing);
11695 // manually free the coeffs, because pSetCoeff0 is used in the next step

Calls 15

n_ExtGcdFunction · 0.85
k_GetStrongLeadTermsFunction · 0.85
pLmFreeFunction · 0.85
p_mFirstVblockFunction · 0.85
k_SplitFrameFunction · 0.85
si_maxFunction · 0.85
n_DeleteFunction · 0.85
PrintSFunction · 0.85
wrpFunction · 0.85
p_Add_qFunction · 0.85
pp_Mult_mmFunction · 0.85
pp_mm_MultFunction · 0.85

Tested by

no test coverage detected