| 2120 | } |
| 2121 | |
| 2122 | poly kNF1 (ideal F,ideal Q,poly q, kStrategy strat, int lazyReduce) |
| 2123 | { |
| 2124 | assume(q!=NULL); |
| 2125 | assume(!(idIs0(F)&&(Q==NULL))); |
| 2126 | |
| 2127 | // lazy_reduce flags: can be combined by | |
| 2128 | //#define KSTD_NF_LAZY 1 |
| 2129 | // do only a reduction of the leading term |
| 2130 | //#define KSTD_NF_ECART 2 |
| 2131 | // only local: reduce even with bad ecart |
| 2132 | poly p; |
| 2133 | int i; |
| 2134 | int j; |
| 2135 | int o; |
| 2136 | LObject h; |
| 2137 | BITSET save1; |
| 2138 | SI_SAVE_OPT1(save1); |
| 2139 | |
| 2140 | //if ((idIs0(F))&&(Q==NULL)) |
| 2141 | // return pCopy(q); /*F=0*/ |
| 2142 | //strat->ak = si_max(idRankFreeModule(F),pMaxComp(q)); |
| 2143 | /*- creating temp data structures------------------- -*/ |
| 2144 | strat->kAllAxis = (currRing->ppNoether) != NULL; |
| 2145 | strat->kNoether = pCopy((currRing->ppNoether)); |
| 2146 | si_opt_1|=Sy_bit(OPT_REDTAIL); |
| 2147 | if (!rField_is_Ring(currRing)) |
| 2148 | si_opt_1&=~Sy_bit(OPT_INTSTRATEGY); |
| 2149 | if (TEST_OPT_STAIRCASEBOUND |
| 2150 | && (! TEST_V_DEG_STOP) |
| 2151 | && (0<Kstd1_deg) |
| 2152 | && ((strat->kNoether==NULL) |
| 2153 | ||(TEST_OPT_DEGBOUND && (pWTotaldegree(strat->kNoether)<Kstd1_deg)))) |
| 2154 | { |
| 2155 | pLmDelete(&strat->kNoether); |
| 2156 | strat->kNoether=pOne(); |
| 2157 | pSetExp(strat->kNoether,1, Kstd1_deg+1); |
| 2158 | pSetm(strat->kNoether); |
| 2159 | // strat->kAllAxis=TRUE; |
| 2160 | } |
| 2161 | initBuchMoraCrit(strat); |
| 2162 | if(rField_is_Ring(currRing)) |
| 2163 | initBuchMoraPosRing(strat); |
| 2164 | else |
| 2165 | initBuchMoraPos(strat); |
| 2166 | initMora(F,strat); |
| 2167 | strat->enterS = enterSMoraNF; |
| 2168 | /*- set T -*/ |
| 2169 | strat->tl = -1; |
| 2170 | strat->tmax = setmaxT; |
| 2171 | strat->T = initT(); |
| 2172 | strat->R = initR(); |
| 2173 | strat->sevT = initsevT(); |
| 2174 | /*- set S -*/ |
| 2175 | strat->sl = -1; |
| 2176 | /*- init local data struct.-------------------------- -*/ |
| 2177 | /*Shdl=*/initS(F,Q,strat); |
| 2178 | if ((strat->ak!=0) |
| 2179 | && (strat->kAllAxis)) /*never true for ring-cf*/ |
no test coverage detected