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

Function kNF

kernel/GBEngine/kstd1.cc:3225–3279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3223}
3224
3225poly kNF(ideal F, ideal Q, poly p,int syzComp, int lazyReduce)
3226{
3227 if (p==NULL)
3228 return NULL;
3229
3230 poly pp = p;
3231
3232#ifdef HAVE_PLURAL
3233 if(rIsSCA(currRing))
3234 {
3235 const unsigned int m_iFirstAltVar = scaFirstAltVar(currRing);
3236 const unsigned int m_iLastAltVar = scaLastAltVar(currRing);
3237 pp = p_KillSquares(pp, m_iFirstAltVar, m_iLastAltVar, currRing);
3238
3239 if(Q == currRing->qideal)
3240 Q = SCAQuotient(currRing);
3241 }
3242#endif
3243 if((Q!=NULL) &&(idIs0(Q))) Q=NULL;
3244
3245 if ((idIs0(F))&&(Q==NULL))
3246 {
3247#ifdef HAVE_PLURAL
3248 if(p != pp)
3249 return pp;
3250#endif
3251 return pCopy(p); /*F+Q=0*/
3252 }
3253
3254 kStrategy strat=new skStrategy;
3255 strat->syzComp = syzComp;
3256 strat->ak = si_max(id_RankFreeModule(F,currRing),pMaxComp(p));
3257 poly res;
3258
3259 if (rHasLocalOrMixedOrdering(currRing))
3260 {
3261#ifdef HAVE_SHIFTBBA
3262 if (currRing->isLPring)
3263 {
3264 WerrorS("No local ordering possible for shift algebra");
3265 return(NULL);
3266 }
3267#endif
3268 res=kNF1(F,Q,pp,strat,lazyReduce);
3269 }
3270 else
3271 res=kNF2(F,Q,pp,strat,lazyReduce);
3272 delete(strat);
3273
3274#ifdef HAVE_PLURAL
3275 if(pp != p)
3276 p_Delete(&pp, currRing);
3277#endif
3278 return res;
3279}
3280
3281poly kNFBound(ideal F, ideal Q, poly p,int bound,int syzComp, int lazyReduce)
3282{

Callers 15

jjREDUCE_PFunction · 0.85
jjREDUCE_IDFunction · 0.85
jjREDUCE3_PFunction · 0.85
jjREDUCE3_IDFunction · 0.85
fglmConsistencyFunction · 0.85
ipassign.ccFile · 0.85
areIdealsEqualFunction · 0.85
witnessFunction · 0.85
constructStartingIdealFunction · 0.85
idmoduloFunction · 0.85
idMinBaseFunction · 0.85

Calls 15

rIsSCAFunction · 0.85
scaFirstAltVarFunction · 0.85
scaLastAltVarFunction · 0.85
p_KillSquaresFunction · 0.85
SCAQuotientFunction · 0.85
idIs0Function · 0.85
si_maxFunction · 0.85
rHasLocalOrMixedOrderingFunction · 0.85
WerrorSFunction · 0.85
kNF1Function · 0.85
kNF2Function · 0.85
p_DeleteFunction · 0.85

Tested by 1

computeNFFunction · 0.68