| 2075 | } |
| 2076 | |
| 2077 | BOOLEAN 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); |
no test coverage detected