Changeset b1a5c1 in git


Ignore:
Timestamp:
Jun 20, 2008, 6:54:45 PM (15 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
Children:
f1b9c57f647835474f1c1a7163a27646f2de70b7
Parents:
8049adb6c137bedd3c5725cd5d503326db71e40c
Message:
*hannes: some fixes for mres (sheafcoh_s.tst)


git-svn-id: file:///usr/local/Singular/svn/trunk@10772 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/gring.cc

    r8049ad rb1a5c1  
    77 *  Author:  levandov (Viktor Levandovsky)
    88 *  Created: 8/00 - 11/00
    9  *  Version: $Id: gring.cc,v 1.55 2008-06-10 14:35:40 motsak Exp $
     9 *  Version: $Id: gring.cc,v 1.56 2008-06-20 16:54:45 Singular Exp $
    1010 *******************************************************************/
    1111
     
    2929#include "prCopy.h"
    3030#include "p_Mult_q.h"
    31 
    3231#include "pInline1.h"
    33    
     32
    3433#include "gring.h"
    3534#include "sca.h"
    36 
    3735
    3836#define MYTEST 0
     
    106104{
    107105  poly m = // p_ISet(1, r);
    108           p_Init(r); 
     106          p_Init(r);
    109107
    110108  const int pVariables = r->N;
    111109
    112   for (int i = pVariables; i; i--)
     110  for (int i = pVariables; i!=0; i--)
    113111  {
    114112    const int lExpA = p_GetExp (a, i, r);
     
    126124#endif
    127125
    128   n_New(&(p_GetCoeff(m, r)), r); 
     126  n_New(&(p_GetCoeff(m, r)), r);
    129127
    130128  return(m);
     
    142140
    143141  const poly m = p_Lcm(a, b, si_max(lCompP1, lCompP2), r);
    144  
     142
    145143#ifdef PDEBUG
    146144//  p_Test(m,r);
     
    315313        expOut=expP;
    316314#ifdef PDEBUG
    317     if (side)
     315        if (side)
    318316        {
    319       Print("gnc_p_Mult_mm: Multiplication in the left module from the right");
    320     }
     317          Print("gnc_p_Mult_mm: Multiplication in the left module from the right");
     318        }
    321319#endif
    322320      }
     
    325323        /* REPORT_ERROR */
    326324#ifdef PDEBUG
    327     const char* s;
    328     if (side==1) s="gnc_p_Mult_mm";
    329     else s="gnc_mm_Mult_p";
    330     Print("%s: exponent mismatch %d and %d\n",s,expP,expM);
     325        const char* s;
     326        if (side==1) s="gnc_p_Mult_mm";
     327        else s="gnc_mm_Mult_p";
     328        Print("%s: exponent mismatch %d and %d\n",s,expP,expM);
    331329#endif
    332330        expOut=0;
     
    479477              nPower(cff,cpower,&tmp_num);
    480478              cff = nMult(totcff,tmp_num);
    481           nDelete(&totcff);
     479              nDelete(&totcff);
    482480              nDelete(&tmp_num);
    483481              totcff = n_Copy(cff,r);
     
    12311229  assume(p_LmDivisibleBy(p1, p2, r));
    12321230
     1231#ifdef PDEBUG
    12331232  if (p_GetComp(p1,r)!=p_GetComp(p2,r)
    12341233  && (p_GetComp(p1,r)!=0)
    12351234  && (p_GetComp(p2,r)!=0))
    12361235  {
    1237 #ifdef PDEBUG
    1238     Print("nc_ReduceSpolyOld: different components");
    1239 #endif
     1236    dReportError("nc_ReduceSpolyOld: different components");
    12401237    return(NULL);
    12411238  }
     1239#endif
    12421240  poly m = pOne();
    12431241  p_ExpVectorDiff(m,p2,p1,r);
     
    13481346poly gnc_CreateSpolyOld(poly p1, poly p2/*,poly spNoether*/, const ring r)
    13491347{
     1348#ifdef PDEBUG
    13501349  if ((p_GetComp(p1,r)!=p_GetComp(p2,r))
    13511350  && (p_GetComp(p1,r)!=0)
    13521351  && (p_GetComp(p2,r)!=0))
    13531352  {
    1354 #ifdef PDEBUG
    1355     Print("gnc_CreateSpolyOld : different components!");
    1356 #endif
     1353    dReportError("gnc_CreateSpolyOld : different components!");
    13571354    return(NULL);
    13581355  }
     1356#endif
    13591357  if ((ncRingType(r)==nc_lie) && pHasNotCF(p1,p2)) /* prod crit */
    13601358  {
     
    14421440#endif
    14431441#endif
    1444  
     1442
    14451443  const long lCompP1 = p_GetComp(p1,r);
    14461444  const long lCompP2 = p_GetComp(p2,r);
     
    14601458  }
    14611459#endif
    1462  
    1463  
     1460
     1461
    14641462//   if ((r->GetNC()->type==nc_lie) && pHasNotCF(p1,p2)) /* prod crit */
    14651463//   {
     
    15031501#endif
    15041502
    1505  
     1503
    15061504//  assume(p_GetComp(m2,r) == 0);
    15071505
    15081506#ifdef PDEBUG
    1509 #if 0 
     1507#if 0
    15101508  if(  (p_GetComp(m2,r) != 0) || (p_GetComp(m1,r) != 0) )
    15111509  {
    15121510    WarnS("gnc_CreateSpolyNew: wrong monomials!");
    1513    
    1514    
     1511
     1512
    15151513#ifdef RDEBUG
    15161514    PrintS("m1 = "); p_Write(m1, r);
    15171515    pDebugPrintR(m1, r);
    1518    
     1516
    15191517    PrintS("m2 = "); p_Write(m2, r);
    15201518    pDebugPrintR(m2, r);
     
    15291527    pDebugPrintR(pL, r);
    15301528#endif
    1531    
    1532   }
    1533  
    1534 #endif
    1535 #endif
    1536  
     1529
     1530  }
     1531
     1532#endif
     1533#endif
     1534
    15371535  p_Delete(&pL,r);
    15381536
     
    15501548#endif
    15511549#endif
    1552  
     1550
    15531551  if(M1 == NULL || M2 == NULL)
    15541552  {
     
    16031601
    16041602
    1605  
     1603
    16061604#ifdef PDEBUG
    16071605  p_Test(M2,r);
     
    16431641//  p_Test(tmp,r);
    16441642//#endif
    1645  
     1643
    16461644  M1 = nc_mm_Mult_pp(m1, pNext(p1), r);                      // M1 = m1 * tail(p1), delete tmp // ???
    16471645
     
    16541652
    16551653#endif
    1656  
     1654
    16571655  M2=p_Add_q(M2,M1,r);                           // M2 = spoly(lt(p1), lt(p2)) + m1 * tail(p1), delete M1
    16581656#ifdef PDEBUG
     
    16731671
    16741672  M1 = nc_mm_Mult_pp(m2, pNext(p2), r);                      // M1 = m2 * tail(p2), detele tmp
    1675  
     1673
    16761674#ifdef PDEBUG
    16771675  p_Test(M1,r);
     
    16911689  Print("M2: "); pWrite(M2);
    16921690#endif
    1693  
     1691
    16941692#endif
    16951693                                                 // delete M1
     
    17731771    return(NULL);
    17741772  }
    1775  
     1773
    17761774  poly m = p_Lcm(p1, p2, si_max(lCompP1, lCompP2), r);
    17771775
     
    17821780//  p_Test(m,r);
    17831781#endif
    1784  
     1782
    17851783  return(m);
    17861784}
     
    18421840
    18431841  assume( pLmB != NULL );
    1844  
     1842
    18451843#ifdef PDEBUG
    18461844  pTest(pLmB);
     
    21002098  /* returns [p,q], destroys p */
    21012099{
    2102  
     2100
    21032101  if (!rIsPluralRing(currRing)) return(NULL);
    21042102  if (pComparePolys(p,q)) return(NULL);
     
    22762274      {
    22772275        poly varj = p_ISet(1, currRing);
    2278         p_SetExp(varj, j, 1, currRing); 
     2276        p_SetExp(varj, j, 1, currRing);
    22792277        p_Setm(varj, currRing);
    22802278
     
    22972295        if (q != NULL)
    22982296        {
    2299 #ifdef PDEBUG         
     2297#ifdef PDEBUG
    23002298#if 0
    23012299          Print("Reducing q[j = %d]: ", j); // !
     
    23222320#endif
    23232321#endif
    2324          
     2322
    23252323//          if( q != NULL)
    23262324          q = kNF(J, currQuotient, q, 0, KSTD_NF_NONORM); // in currRing!!!
     
    23722370
    23732371    }
    2374    
     2372
    23752373    if (K == NULL) // nothing new: i.e. all elements are two-sided
    23762374      return(J);
     
    24002398    int iSize = idElem(J); // ring independent
    24012399
    2402     // J += K:   
     2400    // J += K:
    24032401    ideal id_tmp = idSimpleAdd(J,K); // in currRing
    24042402    id_Delete(&K, currRing); id_Delete(&J, currRing);
     
    24942492}
    24952493
    2496 void ncKill(ring r) 
     2494void ncKill(ring r)
    24972495// kills the nc extension of ring r
    24982496{
     
    25542552}
    25552553
    2556 // inline 
     2554// inline
    25572555void nc_rCopy0(ring res, const ring r)
    25582556{
     
    25622560  res->GetNC() = r->GetNC();
    25632561  res->GetNC()->ref++;
    2564   nc_p_ProcsSet(res, res->p_Procs); 
     2562  nc_p_ProcsSet(res, res->p_Procs);
    25652563}
    25662564
     
    27202718                      matrix CCC, matrix DDD,
    27212719                      poly CCN, poly DDN,
    2722                       ring r, 
     2720                      ring r,
    27232721                      bool bSetupQuotient, bool bCopyInput, bool bBeQuiet,
    27242722                      ring curr)
     
    27402738           ( (CCN == NULL) )
    27412739          );
    2742    
     2740
    27432741    assume(
    27442742           ( (DDD != NULL) && (MATCOLS(DDD) == 1) && (MATROWS(DDD) == 1) && (MATELEM(DDD,1,1) == NULL) ) ||
    27452743           ( (DDN == NULL) )
    27462744          );
    2747            
    2748 
    2749   }
    2750 
    2751  
     2745
     2746
     2747  }
     2748
     2749
    27522750  // there must be:
    27532751  assume( (CCC != NULL) != (CCN != NULL) ); // exactly one data about coeffs (C).
    27542752  assume( !((DDD != NULL) && (DDN != NULL)) ); // at most one data about tails (D).
    2755  
     2753
    27562754  ring save = currRing;
    27572755
     
    27622760  if( CCC != NULL )
    27632761  {
    2764     PrintS("nc_CallPlural(), Input data, CCC: \n");   
     2762    PrintS("nc_CallPlural(), Input data, CCC: \n");
    27652763    iiWriteMatrix(CCC, "C", 2, 4);
    27662764  }
    27672765  if( DDD != NULL )
    27682766  {
    2769     PrintS("nc_CallPlural(), Input data, DDD: \n"); 
     2767    PrintS("nc_CallPlural(), Input data, DDD: \n");
    27702768    iiWriteMatrix(DDD, "D", 2, 4);
    27712769  }
    27722770#endif
    27732771
    2774  
     2772
    27752773#ifndef NDEBUG
    27762774  idTest((ideal)CCC);
     
    27822780  if( (!bBeQuiet) && (r->GetNC() != NULL) )
    27832781    WarnS("going to redefine the algebra structure");
    2784  
     2782
    27852783  if( currRing != r )
    27862784    rChangeCurrRing(r);
     
    28072805
    28082806  nc_type nctype = nc_undef;
    2809  
     2807
    28102808  //////////////////////////////////////////////////////////////////
    28112809  // check the correctness of arguments, without any real chagnes!!!
    28122810
    2813  
     2811
    28142812
    28152813  // check C
     
    29492947  {
    29502948    bool b = true; // DD == null ?
    2951    
     2949
    29522950    for(int i = 1; (i < r->N) && b; i++)
    29532951    for(int j = i+1; (j <= r->N) && b; j++)
     
    29652963        nctype = nc_skew;
    29662964    }
    2967    
     2965
    29682966    if( bCopyInput )
    29692967    {
     
    29782976  assume( C != NULL );
    29792977  assume( D != NULL );
    2980  
     2978
    29812979#if OUTPUT
    29822980  PrintS("nc_CallPlural(), Computed data, C: \n");
     
    29912989
    29922990
    2993  
     2991
    29942992  // check the ordering condition for D (both matrix and poly cases):
    29952993  if ( gnc_CheckOrdCondition(D, r) )
     
    31223120  if(bSetupQuotient) // Test me!!!
    31233121  {
    3124     nc_SetupQuotient(r); 
     3122    nc_SetupQuotient(r);
    31253123  }
    31263124
     
    31613159  // A bit cleaned up and somewhat rewritten functions...
    31623160  rGR->GetNC()->p_Procs.SPoly       = gnc_CreateSpolyNew;
    3163   rGR->GetNC()->p_Procs.ReduceSPoly = gnc_ReduceSpolyNew; 
     3161  rGR->GetNC()->p_Procs.ReduceSPoly = gnc_ReduceSpolyNew;
    31643162
    31653163  rGR->GetNC()->p_Procs.BucketPolyRed  = gnc_kBucketPolyRedNew;
     
    33813379      if (orig_ring != syz_ring)
    33823380      {
    3383     s_h2=idrCopyR_NoSort(h2,orig_ring);
    3384     //  s_trickyQuotient=idrCopyR_NoSort(trickyQuotient,orig_ring);
    3385     //  rDebugPrint(syz_ring);
    3386     s_I=idrCopyR_NoSort(I,orig_ring);
     3381        s_h2=idrCopyR_NoSort(h2,orig_ring);
     3382        //  s_trickyQuotient=idrCopyR_NoSort(trickyQuotient,orig_ring);
     3383        //  rDebugPrint(syz_ring);
     3384        s_I=idrCopyR_NoSort(I,orig_ring);
    33873385      }
    33883386      else
    33893387      {
    3390     s_h2 = h2;
    3391     s_I  = I;
    3392     //  s_trickyQuotient=trickyQuotient;
     3388        s_h2 = h2;
     3389        s_I  = I;
     3390        //  s_trickyQuotient=trickyQuotient;
    33933391      }
    33943392      idTest(s_h2);
     
    34083406      if (orig_ring != syz_ring)
    34093407      {
    3410     idDelete(&s_h2);
    3411     for (j=0; j<IDELEMS(s_h3); j++)
    3412     {
    3413       if (s_h3->m[j] != NULL)
    3414       {
    3415         if (p_MinComp(s_h3->m[j],syz_ring) > syzcomp) /* i.e. it is a syzygy */
    3416           pShift(&s_h3->m[j], -syzcomp);
    3417         else
    3418           pDelete(&s_h3->m[j]);
    3419       }
    3420     }
    3421     idSkipZeroes(s_h3);
    3422     s_h3->rank -= syzcomp;
    3423     rChangeCurrRing(orig_ring);
    3424     //  s_h3 = idrMoveR_NoSort(s_h3, syz_ring);
    3425     s_h3 = idrMoveR_NoSort(s_h3, syz_ring);
    3426     rKill(syz_ring);
     3408        idDelete(&s_h2);
     3409        for (j=0; j<IDELEMS(s_h3); j++)
     3410        {
     3411          if (s_h3->m[j] != NULL)
     3412          {
     3413            if (p_MinComp(s_h3->m[j],syz_ring) > syzcomp) /* i.e. it is a syzygy */
     3414              pShift(&s_h3->m[j], -syzcomp);
     3415            else
     3416              pDelete(&s_h3->m[j]);
     3417          }
     3418        }
     3419        idSkipZeroes(s_h3);
     3420        s_h3->rank -= syzcomp;
     3421        rChangeCurrRing(orig_ring);
     3422        //  s_h3 = idrMoveR_NoSort(s_h3, syz_ring);
     3423        s_h3 = idrMoveR_NoSort(s_h3, syz_ring);
     3424        rKill(syz_ring);
    34273425      }
    34283426      idTest(s_h3);
     
    34563454      for (j=0; j< idElem(I); j++)
    34573455      {
    3458     q = pCopy(MATELEM(MI,j+1,i));
    3459     if (q!=NULL)
    3460     {
    3461       q = pMult(q,pCopy(I->m[j]));
    3462       p = pAdd(p,q);
    3463     }
     3456        q = pCopy(MATELEM(MI,j+1,i));
     3457        if (q!=NULL)
     3458        {
     3459          q = pMult(q,pCopy(I->m[j]));
     3460          p = pAdd(p,q);
     3461        }
    34643462      }
    34653463      res->m[i-1]=p;
     
    34923490  if (nc_CallPlural(C, D, NULL, NULL, r)) // TODO: what about quotient ideal?
    34933491    WarnS("Error initializing multiplication!"); // No reaction!???
    3494  
     3492
    34953493  return r;
    34963494}
     
    36173615{
    36183616  // currently only super-commutative extension deals with factors.
    3619   if( bUseExtensions ) 
     3617  if( bUseExtensions )
    36203618    return sca_SetupQuotient(rGR, rG);
    3621  
    3622   return false;   
     3619
     3620  return false;
    36233621}
    36243622
  • kernel/sca.cc

    r8049ad rb1a5c1  
    77 *  Author:  motsak (Oleksandr Motsak)
    88 *  Created: 2006/12/18
    9  *  Version: $Id: sca.cc,v 1.18 2008-06-20 12:28:17 Singular Exp $
     9 *  Version: $Id: sca.cc,v 1.19 2008-06-20 16:54:45 Singular Exp $
    1010 *******************************************************************/
    1111
     
    388388      if(iComponentMonomM==0 )
    389389      {
    390         WarnS("sca_p_Mult_mm: Multiplication in the left module from the right");
     390        dReportError("sca_p_Mult_mm: Multiplication in the left module from the right");
    391391      }
    392392#endif
     
    470470      if(iComponentMonomM==0 )
    471471      {
    472         WarnS("sca_pp_Mult_mm: Multiplication in the left module from the right");
     472        dReportError("sca_pp_Mult_mm: Multiplication in the left module from the right");
    473473      }
    474474#endif
     
    580580      if(iComponent==0 )
    581581      {
    582         WarnS("sca_mm_Mult_pp: Multiplication in the left module from the right!");
     582        dReportError("sca_mm_Mult_pp: Multiplication in the left module from the right!");
    583583//        PrintS("mm = "); p_Write(pMonom, rRing);
    584584//        PrintS("pp = "); p_Write(pPoly, rRing);
    585 //        assume(iComponent!=0);       
     585//        assume(iComponent!=0);
    586586      }
    587587#endif
     
    644644    if( iComponentMonomM!=0 )
    645645    {
    646       if( iComponent!=0 ) 
     646      if( iComponent!=0 )
    647647      {
    648648        // REPORT_ERROR
     
    656656      if(iComponent==0)
    657657      {
    658         WarnS("sca_mm_Mult_p: Multiplication in the left module from the right!");
     658        dReportError("sca_mm_Mult_p: Multiplication in the left module from the right!");
    659659//        PrintS("mm = "); p_Write(pMonom, rRing);
    660660//        PrintS("p = "); p_Write(pPoly, rRing);
    661 //        assume(iComponent!=0);       
     661//        assume(iComponent!=0);
    662662      }
    663663#endif
     
    725725  {
    726726#ifdef PDEBUG
    727     Print("sca_SPoly: different non-zero components!\n");
     727    dReportError("sca_SPoly: different non-zero components!\n");
    728728#endif
    729729    return(NULL);
     
    815815  {
    816816#ifdef PDEBUG
    817     Print("sca_ReduceSpoly: different non-zero components!");
     817    dReportError("sca_ReduceSpoly: different non-zero components!");
    818818#endif
    819819    return(NULL);
     
    921921    }
    922922
     923#ifdef KDEBUG
    923924    if (TEST_OPT_DEBUG)
    924925    {
     
    927928      PrintLn();
    928929    }
     930#endif
    929931
    930932    enterpairs(h.p, strat->sl, h.ecart, 0, strat);
     
    978980
    979981  PrintS("F: \n");
    980   idPrint(F); 
    981   PrintS("Q: \n"); 
     982  idPrint(F);
     983  PrintS("Q: \n");
    982984  idPrint(Q);
    983985#endif
    984986#endif
    985987
    986  
     988
    987989  const unsigned int m_iFirstAltVar = scaFirstAltVar(currRing);
    988990  const unsigned int m_iLastAltVar  = scaLastAltVar(currRing);
     
    10441046    if (strat->Ll > lrmax) lrmax =strat->Ll;/*stat.*/
    10451047
     1048#ifdef KDEBUG
    10461049    if (TEST_OPT_DEBUG) messageSets(strat);
     1050#endif
    10471051
    10481052    if (strat->Ll== 0) strat->interpt=TRUE;
     
    10711075    if(strat->P.IsNull()) continue;
    10721076
    1073    
     1077
    10741078    if( pNext(strat->P.p) == strat->tail )
    10751079    {
     
    11801184
    11811185
     1186#ifdef KDEBUG
    11821187  if (TEST_OPT_DEBUG) messageSets(strat);
     1188#endif
    11831189
    11841190  /* release temp data-------------------------------- */
     
    12391245  // checks...
    12401246  //////////////////////////////////////////////////////////////////////////
    1241   if( rG == NULL ) 
     1247  if( rG == NULL )
    12421248    rG = rGR;
    12431249
     
    12451251  assume(rG  != NULL);
    12461252  assume(rIsPluralRing(rG));
    1247  
     1253
    12481254
    12491255#if MYTEST
     
    12561262    return false;
    12571263
    1258  
     1264
    12591265//  if( (ncRingType(rG) != nc_skew) || (ncRingType(rG) != nc_comm) )
    12601266//    return false;
     
    12701276  PrintS("sca_SetupQuotient: qideal!!!\n");
    12711277#endif
    1272  
     1278
    12731279  if((rG->qideal != NULL) && (rG != rGR) ) // we cannot change from factor to factor at the time, sorry!
    12741280    return false;
     
    12841290  PrintS("sca_SetupQuotient: AltVars?!\n");
    12851291#endif
    1286  
     1292
    12871293  for(int i = 1; i < N; i++)
    12881294  {
     
    13191325#endif
    13201326
    1321  
     1327
    13221328  if( (iAltVarEnd == -1) || (iAltVarStart == (N+1)) )
    13231329    return false; // either no alternating varables, or a single one => we are in commutative case!
    13241330
    1325  
     1331
    13261332  for(int i = 1; i < N; i++)
    13271333  {
     
    13841390  }
    13851391
    1386  
     1392
    13871393  assume(rGR->qideal != NULL);
    13881394//  assume(rG->qideal == NULL); // ?
     
    13961402#endif
    13971403
    1398  
     1404
    13991405  // check for
    14001406  // y_{iAltVarStart}^2, y_{iAltVarStart+1}^2, \ldots, y_{iAltVarEnd}^2  (iAltVarEnd > iAltVarStart)
     
    14351441#endif
    14361442#endif
    1437  
     1443
    14381444
    14391445  //////////////////////////////////////////////////////////////////////////
     
    14661472  assume(rIsPluralRing(rGR));
    14671473  assume(!rIsSCA(rGR));
    1468  
     1474
    14691475  const int N = rGR->N;
    14701476
     
    14761482  const ideal idQuotient = rGR->qideal;
    14771483
    1478  
     1484
    14791485  ideal tempQ = idQuotient;
    14801486
    14811487  if( b <= N && e >= 1 )
    1482     tempQ = id_KillSquares(idQuotient, b, e, rGR); 
     1488    tempQ = id_KillSquares(idQuotient, b, e, rGR);
    14831489
    14841490  idSkipZeroes( tempQ );
     
    14881494  else
    14891495    rGR->GetNC()->SCAQuotient() = tempQ;
    1490  
     1496
    14911497  ncRingType( rGR, nc_exterior );
    14921498
     
    14991505  if(rSaveRing != rGR)
    15001506    rChangeCurrRing(rSaveRing);
    1501  
     1507
    15021508  return true;
    1503  
     1509
    15041510}
    15051511
     
    16581664
    16591665      strat->P.p = nc_CreateSpoly(strat->P.p1, strat->P.p2, currRing);
     1666      if (strat->P.p!=NULL) strat->initEcart(&strat->P);
    16601667    }//    else
    16611668
    16621669
    16631670    if(strat->P.IsNull()) continue;
    1664    
     1671
    16651672    if (strat->P.p1 == NULL)
    16661673    {
     
    17641771      {
    17651772        assume(p_GetExp(pSave, i, currRing) == 1);
    1766 
    1767         const poly pNew = sca_pp_Mult_xi_pp(i, pNext, currRing);
    1768 
    1769 #ifdef PDEBUG
    1770         p_Test(pNew, currRing);
    1771 #endif
    1772 
    1773         if( pNew == NULL) continue;
    1774 
    1775         LObject h(pNew); // h = x_i * strat->P
    1776 
    1777         if (TEST_OPT_INTSTRATEGY)
     1773        if (pNext!=NULL)
    17781774        {
    1779 //           h.pCleardenom(); // also does a pContent
    1780           pContent(h.p);
     1775          const poly pNew = sca_pp_Mult_xi_pp(i, pNext, currRing);
     1776
     1777#ifdef PDEBUG
     1778          p_Test(pNew, currRing);
     1779#endif
     1780
     1781          if( pNew == NULL) continue;
     1782
     1783          LObject h(pNew); // h = x_i * strat->P
     1784
     1785          if (TEST_OPT_INTSTRATEGY)
     1786          {
     1787//            h.pCleardenom(); // also does a pContent
     1788            pContent(h.p);
     1789          }
     1790          else
     1791          {
     1792            h.pNorm();
     1793          }
     1794
     1795          strat->initEcart(&h);
     1796          h.sev = pGetShortExpVector(h.p);
     1797
     1798          int pos;
     1799          if (strat->Ll==-1)
     1800            pos =0;
     1801          else
     1802            pos = strat->posInL(strat->L,strat->Ll,&h,strat);
     1803
     1804          enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);
     1805/*
     1806          h.sev = pGetShortExpVector(h.p);
     1807          strat->initEcart(&h);
     1808
     1809          h.PrepareRed(strat->use_buckets);
     1810
     1811          // reduction of the element choosen from L(?)
     1812          red_result = strat->red(&h,strat);
     1813
     1814          // reduction to non-zero new poly
     1815          if (red_result != 1) continue;
     1816
     1817
     1818          int pos = posInS(strat,strat->sl,h.p,h.ecart);
     1819
     1820          // reduce the tail and normalize poly
     1821          if (TEST_OPT_INTSTRATEGY)
     1822          {
     1823            h.pCleardenom();
     1824            if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL))
     1825            {
     1826              h.p = redtailBba(&(h),pos-1,strat, withT); // !!!
     1827              h.pCleardenom();
     1828            }
     1829          }
     1830          else
     1831          {
     1832            h.pNorm();
     1833            if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL))
     1834              h.p = redtailBba(&(h),pos-1,strat, withT);
     1835          }
     1836
     1837#ifdef KDEBUG
     1838          if (TEST_OPT_DEBUG){PrintS(" N:");h.wrp();PrintLn();}
     1839#endif
     1840
     1841//          h.PrepareRed(strat->use_buckets); // ???
     1842
     1843          h.sev = pGetShortExpVector(h.p);
     1844          strat->initEcart(&h);
     1845
     1846          if (strat->Ll==-1)
     1847            pos = 0;
     1848          else
     1849            pos = strat->posInL(strat->L,strat->Ll,&h,strat);
     1850
     1851           enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);*/
     1852
    17811853        }
    1782         else
    1783         {
    1784           h.pNorm();
    1785         }
    1786 
    1787         strat->initEcart(&h);
    1788         h.sev = pGetShortExpVector(h.p);
    1789 
    1790         int pos;
    1791 
    1792         if (strat->Ll==-1)
    1793           pos =0;
    1794         else
    1795           pos = strat->posInL(strat->L,strat->Ll,&h,strat);
    1796 
    1797         enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);
    1798 
    1799 
    1800 /*
    1801         h.sev = pGetShortExpVector(h.p);
    1802         strat->initEcart(&h);
    1803 
    1804         h.PrepareRed(strat->use_buckets);
    1805 
    1806         // reduction of the element choosen from L(?)
    1807         red_result = strat->red(&h,strat);
    1808 
    1809         // reduction to non-zero new poly
    1810         if (red_result != 1) continue;
    1811 
    1812 
    1813         int pos = posInS(strat,strat->sl,h.p,h.ecart);
    1814 
    1815         // reduce the tail and normalize poly
    1816         if (TEST_OPT_INTSTRATEGY)
    1817         {
    1818           h.pCleardenom();
    1819           if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL))
    1820           {
    1821             h.p = redtailBba(&(h),pos-1,strat, withT); // !!!
    1822             h.pCleardenom();
    1823           }
    1824         }
    1825         else
    1826         {
    1827 
    1828           h.pNorm();
    1829           if ((TEST_OPT_REDSB)||(TEST_OPT_REDTAIL))
    1830             h.p = redtailBba(&(h),pos-1,strat, withT);
    1831         }
    1832 
    1833 
    1834   #ifdef KDEBUG
    1835         if (TEST_OPT_DEBUG){PrintS(" N:");h.wrp();PrintLn();}
    1836   #endif
    1837 
    1838 //         h.PrepareRed(strat->use_buckets); // ???
    1839 
    1840         h.sev = pGetShortExpVector(h.p);
    1841         strat->initEcart(&h);
    1842 
    1843         if (strat->Ll==-1)
    1844           pos = 0;
    1845         else
    1846           pos = strat->posInL(strat->L,strat->Ll,&h,strat);
    1847 
    1848          enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);*/
    1849 
    18501854      } // for all x_i \in Ann(lm(P))
    1851 
    1852 
    1853 
    1854 
    1855 
    18561855    } // if red(P) != NULL
    18571856
     
    18961895
    18971896//   if (Q!=NULL) updateResult(strat->Shdl,Q,strat);
    1898 
    18991897//    PrintS("</sca>\n");
    19001898
     
    20312029    if (lrmax< strat->Ll) lrmax=strat->Ll; /*stat*/
    20322030    //test_int_std(strat->kIdeal);
     2031#ifdef KDEBUG
    20332032    if (TEST_OPT_DEBUG) messageSets(strat);
     2033#endif
    20342034    if (TEST_OPT_DEGBOUND
    20352035    && (strat->L[strat->Ll].ecart+strat->L[strat->Ll].GetpFDeg()> Kstd1_deg))
     
    20702070      strat->P.p = nc_CreateSpoly(strat->P.p1, strat->P.p2, currRing);
    20712071    }
    2072    
    2073    
     2072
     2073
    20742074
    20752075    if (strat->P.p1 == NULL)
     
    25502550
    25512551  assume( (iFirstAltVar >= 1) && (iLastAltVar <= r->N) && (iFirstAltVar <= iLastAltVar) );
    2552  
     2552
    25532553  const int iSize = id->idelems();
    25542554
Note: See TracChangeset for help on using the changeset viewer.