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

Function idTestHomModule

kernel/ideals.cc:2077–2121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2075}
2076
2077BOOLEAN idTestHomModule(ideal m, ideal Q, intvec *w)
2078{
2079 if ((Q!=NULL) && (!idHomIdeal(Q,NULL))) { PrintS(" Q not hom\n"); return FALSE;}
2080 if (idIs0(m)) return TRUE;
2081
2082 int cmax=-1;
2083 int i;
2084 poly p=NULL;
2085 int length=IDELEMS(m);
2086 polyset P=m->m;
2087 for (i=length-1;i>=0;i--)
2088 {
2089 p=P[i];
2090 if (p!=NULL) cmax=si_max(cmax,(int)pMaxComp(p)+1);
2091 }
2092 if (w != NULL)
2093 if (w->length()+1 < cmax)
2094 {
2095 // Print("length: %d - %d \n", w->length(),cmax);
2096 return FALSE;
2097 }
2098
2099 if(w!=NULL)
2100 p_SetModDeg(w, currRing);
2101
2102 for (i=length-1;i>=0;i--)
2103 {
2104 p=P[i];
2105 if (p!=NULL)
2106 {
2107 int d=currRing->pFDeg(p,currRing);
2108 loop
2109 {
2110 pIter(p);
2111 if (p==NULL) break;
2112 if (d!=currRing->pFDeg(p,currRing))
2113 {
2114 //pWrite(q); wrp(p); Print(" -> %d - %d\n",d,pFDeg(p,currRing));
2115 if(w!=NULL)
2116 p_SetModDeg(NULL, currRing);
2117 return FALSE;
2118 }
2119 }
2120 }
2121 }
2122
2123 if(w!=NULL)
2124 p_SetModDeg(NULL, currRing);

Callers 15

jjMODULOFunction · 0.85
jjPRUNE_MAPFunction · 0.85
jjRESFunction · 0.85
jjSTD_HILBFunction · 0.85
jjSTD_1Function · 0.85
jjSYZ_2Function · 0.85
jjHOMOG1Function · 0.85
jjPRUNEFunction · 0.85
jjSLIM_GBFunction · 0.85
jjSBAFunction · 0.85
jjSBA_1Function · 0.85
jjSBA_2Function · 0.85

Calls 7

idHomIdealFunction · 0.85
PrintSFunction · 0.85
idIs0Function · 0.85
si_maxFunction · 0.85
p_SetModDegFunction · 0.85
pFDegMethod · 0.80
lengthMethod · 0.45

Tested by

no test coverage detected