| 1942 | */ |
| 1943 | |
| 1944 | void enterOnePairNormal (int i,poly p,int ecart, int isFromQ,kStrategy strat, int atR = -1) |
| 1945 | { |
| 1946 | assume(i<=strat->sl); |
| 1947 | |
| 1948 | int l,j,compare; |
| 1949 | LObject Lp; |
| 1950 | Lp.i_r = -1; |
| 1951 | |
| 1952 | #ifdef KDEBUG |
| 1953 | Lp.ecart=0; Lp.length=0; |
| 1954 | #endif |
| 1955 | /*- computes the lcm(s[i],p) -*/ |
| 1956 | Lp.lcm = pInit(); |
| 1957 | |
| 1958 | #ifndef HAVE_RATGRING |
| 1959 | pLcm(p,strat->S[i],Lp.lcm); |
| 1960 | #elif defined(HAVE_RATGRING) |
| 1961 | if (rIsRatGRing(currRing)) |
| 1962 | pLcmRat(p,strat->S[i],Lp.lcm, currRing->real_var_start); // int rat_shift |
| 1963 | else |
| 1964 | pLcm(p,strat->S[i],Lp.lcm); |
| 1965 | #endif |
| 1966 | pSetm(Lp.lcm); |
| 1967 | |
| 1968 | |
| 1969 | if (strat->sugarCrit && ALLOW_PROD_CRIT(strat)) |
| 1970 | { |
| 1971 | if (strat->fromT && (strat->ecartS[i]>ecart)) |
| 1972 | { |
| 1973 | pLmFree(Lp.lcm); |
| 1974 | return; |
| 1975 | /*the pair is (s[i],t[.]), discard it if the ecart is too big*/ |
| 1976 | } |
| 1977 | if((!((strat->ecartS[i]>0)&&(ecart>0))) |
| 1978 | && pHasNotCF(p,strat->S[i])) |
| 1979 | { |
| 1980 | /* |
| 1981 | *the product criterion has applied for (s,p), |
| 1982 | *i.e. lcm(s,p)=product of the leading terms of s and p. |
| 1983 | *Suppose (s,r) is in L and the leading term |
| 1984 | *of p divides lcm(s,r) |
| 1985 | *(==> the leading term of p divides the leading term of r) |
| 1986 | *but the leading term of s does not divide the leading term of r |
| 1987 | *(notice that tis condition is automatically satisfied if r is still |
| 1988 | *in S), then (s,r) can be cancelled. |
| 1989 | *This should be done here because the |
| 1990 | *case lcm(s,r)=lcm(s,p) is not covered by chainCrit. |
| 1991 | * |
| 1992 | *Moreover, skipping (s,r) holds also for the noncommutative case. |
| 1993 | */ |
| 1994 | strat->cp++; |
| 1995 | pLmFree(Lp.lcm); |
| 1996 | return; |
| 1997 | } |
| 1998 | Lp.ecart = si_max(ecart,strat->ecartS[i]); |
| 1999 | /* |
| 2000 | *the set B collects the pairs of type (S[j],p) |
| 2001 | *suppose (r,p) is in B and (s,p) is the new pair and lcm(s,p)#lcm(r,p) |
nothing calls this directly
no test coverage detected