Changeset 584649e in git


Ignore:
Timestamp:
Jan 21, 2015, 6:27:03 PM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '648d28f488f6ff08f5607ff229b9ad9e4a5b93c2')
Children:
bf7ca5bfaabc9aaa67376f601be6360dd14f9551
Parents:
a6d6356dcb7c186e5a91abd804ac087fb76faa4e
Message:
fix for pull request #638
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/primdec.lib

    ra6d6356 r584649e  
    11////////////////////////////////////////////////////////////////////////////
    2 version="version primdec.lib 4.0.1.1 Nov_2014 "; // $Id$
     2version="version primdec.lib 4.0.1.2 Jan_2015 "; // $Id$
    33category="Commutative Algebra";
    44info="
     
    2727PROCEDURES:
    2828 Ann(M);            annihilator of R^n/M, R=basering, M in R^n
    29  primdecGTZ(I);     (deprecated) complete primary decomposition via Gianni,Trager,Zacharias
     29 primdecGTZ(I);     complete primary decomposition via Gianni,Trager,Zacharias
    3030 primdecGTZE(I);    complete primary decomposition via Gianni,Trager,Zacharias. Returns empty list for the unit ideal
    31  primdecSY(I...);   (deprecated) complete primary decomposition via Shimoyama-Yokoyama
     31 primdecSY(I...);   complete primary decomposition via Shimoyama-Yokoyama
    3232 primdecSYE(I,..);  complete primary decomposition via Shimoyama-Yokoyama. Returns empty list for the unit ideal
    33  minAssGTZ(I);      (deprecated) the minimal associated primes via Gianni,Trager,Zacharias (with modifications by Laplagne)
     33 minAssGTZ(I);      the minimal associated primes via Gianni,Trager,Zacharias (with modifications by Laplagne)
    3434 minAssGTZE(I);     the minimal associated primes via Gianni,Trager,Zacharias. Returns empty list for unit ideal
    35  minAssChar(I...);  (deprecated) the minimal associated primes using characteristic sets
     35 minAssChar(I...);  the minimal associated primes using characteristic sets
    3636 minAssCharE(I..);  the minimal associated primes using characteristic sets. Returns empty list for unit ideal
    37  testPrimary(L,k);  (deprecated) tests the result of the primary decomposition
     37 testPrimary(L,k);  tests the result of the primary decomposition
    3838 testPrimaryE(L,k); tests the result of the primary decomposition. Handles also empty list L.
    3939 radical(I);        computes the radical of I via Krick/Logar (with modifications by Laplagne) and Kemper
     
    4242 prepareAss(I);     list of radicals of the equidimensional components of I
    4343 equidim(I);        weak equidimensional decomposition of I
    44  equidimE(I);       equidimE returns empty list for unit ideal
    4544 equidimMax(I);     equidimensional locus of I
    4645 equidimMaxEHV(I);  equidimensional locus of I via Eisenbud,Huneke,Vasconcelos
    4746 zerodec(I);        zerodimensional decomposition via Monico
    48  absPrimdecGTZ(I);  (deprecated) the absolute prime components of I
     47 absPrimdecGTZ(I);  the absolute prime components of I
    4948 absPrimdecGTZE(I); the absolute prime components of I. Assumes I is not unit ideal.
    5049 sep(f,k);          the separabel part of f as polynomial in Fp(t1,...,tm)
    5150";
    52 
    53 
    5451
    5552LIB "general.lib";
     
    6764//
    6865///////////////////////////////////////////////////////////////////////////////
    69 
    7066
    7167static proc sat1 (ideal id, poly p)
     
    10391035      if(size(primary[2*@k])==0)
    10401036      {
    1041         ek=insepDecomp_i( int(1), primary[2*@k-1] );
     1037        ek=insepDecomp_i( 1, primary[2*@k-1] );
    10421038        primary=delete(primary,2*@k);
    10431039        primary=delete(primary,2*@k-1);
     
    15581554//computes the prime decomposition of the special ideals
    15591555//and transforms it back to a decomposition of i
    1560 // if patchPrimaryDecomposition=1,  drop unit ideal in the decomposition, 
     1556// if patchPrimaryDecomposition=1,  drop unit ideal in the decomposition,
    15611557// since the unit ideal it is not prime!
    15621558
     
    17271723}
    17281724
    1729 static proc teilt(intvec aba, intvec bab)
     1725static proc teilt(intvec a, intvec b)
    17301726{
    17311727  int i;
    1732   for(i=1;i<=size(aba);i++)
    1733   {
    1734     if(aba[i]>bab[i]){return(0);}
     1728  for(i=1;i<=size(a);i++)
     1729  {
     1730    if(a[i]>b[i]){return(0);}
    17351731  }
    17361732  return(1);
     
    19551951"
    19561952{
    1957     return(minAssPrimesold_i(int(1),I,#));
     1953    return(minAssPrimesold_i(1,I,#));
    19581954}
    19591955example
     
    19721968         minAssPrimesold(i,1); I ideal  (to use also the factorizing Groebner)
    19731969RETURN:  list = the minimal associated prime ideals of I. In case I is unit ideal, returns list(ideal(1));
    1974 NOTE:    deprecated. Use 'minAssPrimesoldE()'
    19751970EXAMPLE: example minAssPrimesold; shows an example
    19761971"
    19771972{
    1978     return(minAssPrimesold_i(int(0),I,#));
     1973    return(minAssPrimesold_i(0,I,#));
    19791974}
    19801975example
     
    19921987{
    19931988//
    1994 // parameter patchPrimaryDecomposition : if = 1, patch the decomposition( drop unit ideal in the decomposition), 
     1989// parameter patchPrimaryDecomposition : if = 1, patch the decomposition( drop unit ideal in the decomposition),
    19951990//                                 : if = 0, taken no special action in case the unit ideal is in the decomposition
    19961991// for other parameters see minAssPrimesold, minAssPrimesoldE
     
    20192014      tluser=union(@res);
    20202015
     2016      setring @P;
    20212017      if (size(tluser)>0)
    20222018      {
    2023           setring @P;
    20242019          list @res=imap(gnir,tluser);
    20252020          return(phi(@res));
    20262021      }
    2027       else
    2028       {
    2029           setring @P;
     2022      else
     2023      {
    20302024          return(tluser);
    20312025      }
     
    21562150"
    21572151{
    2158     return(minAssPrimes_i(int(1),I,#));
     2152    return(minAssPrimes_i(1,I,#));
    21592153}
    21602154example
     
    21772171      "GTZ" ->     the old algorithm is used
    21782172RETURN:  list = the minimal associated prime ideals of I. If I is the unit ideal returns list(ideal(1)) ;
    2179 NOTE:    deprecated. Use 'minAssPrimesE()'
    21802173EXAMPLE: example minAssPrimes; shows an example
    21812174"
    21822175{
    2183     return(minAssPrimes_i(int(0),I,#));
     2176    return(minAssPrimes_i(0,I,#));
    21842177}
    21852178example
     
    21972190static proc minAssPrimes_i(int patchPrimaryDecomposition, ideal i, list #)
    21982191{
    2199 // parameter  patchPrimaryDecomposition:  1 to patch( remove unit ideal from the decomposition) , 
     2192// parameter  patchPrimaryDecomposition:  1 to patch( remove unit ideal from the decomposition) ,
    22002193//                                        0 for no special action on unit ideal.
    22012194// for other parameters see 'minAssPrimes', 'minAssPrimesE'
     
    22812274  {
    22822275      if ( deg(lead(i[1]))==0 ) // we have the unit ideal.
    2283       { 
    2284           setring P0; 
     2276      {
     2277          setring P0;
    22852278          option( set,origOp );
    22862279          if (patchPrimaryDecomposition==1)
    22872280          {
    22882281
    2289              return( list() ); 
     2282             return( list() );
    22902283          }
    22912284          else
    22922285          {
    2293                return( list(ideal(1)) ); 
     2286               return( list(ideal(1)) );
    22942287          }
    22952288      }
     
    24302423  int liSize=size(li);
    24312424  int li1Size=0;
    2432   if (size(li)>0) 
     2425  if (size(li)>0)
    24332426  {
    24342427     li1Size=size(li[1]);
     
    24372430  setring ir;
    24382431  list l;
    2439   if ( liSize > 0) 
    2440   {
    2441      if (li1Size > 0) 
     2432  if ( liSize > 0)
     2433  {
     2434     if (li1Size > 0)
    24422435     {
    24432436         l = fetch(P,li);
     
    25302523RETURN: list of equidimensional ideals a[1],...,a[s] with:
    25312524        - a[s] the equidimensional locus of I, i.e. the intersection
    2532           of the primary ideals of dimension of I, except I is unit ideal. 
     2525          of the primary ideals of dimension of I, except I is unit ideal.
    25332526        - a[1],...,a[s-1] the lower dimensional equidimensional loci.
    25342527         If I is the unit ideal, a list containing the unit ideal as a[1] is returned.
     
    27832776{//reduces primery decomposition over algebraic extensions to
    27842777//the other cases
    2785     return( algeDeco_i( int(1), I, int w) );
     2778    return( algeDeco_i( 1, I, int w) );
    27862779}
    27872780
     
    27932786{//reduces primery decomposition over algebraic extensions to
    27942787//the other cases
    2795     return( algeDeco_i(int(0), I, int w));
     2788    return( algeDeco_i(0, I, int w));
    27962789}
    27972790
     
    28032796{//reduces primery decomposition over algebraic extensions to
    28042797//the other cases
    2805 // if patchPrimaryDecomposition=1,  drop unit ideal in the decomposition, 
     2798// if patchPrimaryDecomposition=1,  drop unit ideal in the decomposition,
    28062799// since the unit ideal it is not prime, otherwise take no special action.
    28072800
     
    28302823      {
    28312824         if ( deg(lead(J[1]))==0 ) // we have the unit ideal
    2832          { 
     2825         {
    28332826            if (patchPrimaryDecomposition==1)
    28342827            {
    2835                 return( list() ); 
     2828                return( list() );
    28362829            }
    28372830            else
    28382831            {
    2839                 return( list( ideal(1) ) ); 
     2832                return( list( ideal(1) ) );
    28402833            }
    28412834         }
     
    29272920      R_l[3]=list(list("dp",1:n),list("lp",1:(nvars(basering)-n)),list("C",0));
    29282921      def RS=ring(R_l); kill R_l; setring RS;
    2929       if (sizepr>0) {    list  pr=imap(RH,pr); ASSUME(1, sizepr == size(pr)); }
     2922      if (sizepr>0) { list pr=imap(RH,pr); }
    29302923      ideal K;
    29312924      for(j=1;j<=sizepr;j++)
    29322925      {
    29332926         K=groebner(pr[j]);
    2934          if (size(K)>1) 
     2927         if (size(K)>1)
    29352928         {
    29362929             K = K[2..size(K)];
    2937          } 
     2930         }
    29382931         pr[j]=K;
    29392932      }
     
    29912984"
    29922985{
    2993     return(decomp_i(int(1),I,#));
     2986    return(decomp_i(1,I,#));
    29942987}
    29952988example
     
    30133006         (resp. a list of the minimal associated primes)
    30143007         if I is unit ideal, returns list(ideal(1),ideal(1)) ( resp. list(ideal(1)))
    3015 NOTE:    deprecated. Use 'decompE()'
    30163008EXAMPLE: example decomp; shows an example
    30173009"
    30183010{
    3019     return(decomp_i(int(0),I,#));
     3011    return(decomp_i(0,I,#));
    30203012}
    30213013example
     
    30323024static proc decomp_i(int patchPrimaryDecomposition, ideal i,list #)
    30333025{
    3034 // if patchPrimaryDecomposition=1,  drop unit ideal in the decomposition, 
     3026// if patchPrimaryDecomposition=1,  drop unit ideal in the decomposition,
    30353027// since the unit ideal it is not prime, otherwise take no special action.
    30363028// for other parameters see 'decomp' or 'decompE'
     
    30813073    }
    30823074    else
    3083     { 
     3075    {
    30843076      tras=i;
    30853077    }
     
    30903082    {
    30913083        if ( deg(lead(ltras[1]))==0 ) // we have the unit ideal.
    3092         { 
    3093           option(set,initialOp); 
     3084        {
     3085          option(set,initialOp);
    30943086          if (patchPrimaryDecomposition==1)
    30953087          {
    3096              if (abspri) { return(prepare_absprimdec(list()));  } 
    3097              return( list() ); 
     3088             if (abspri) { return(prepare_absprimdec(list()));  }
     3089             return( list() );
    30983090          }
    30993091          else
     
    31023094            primary[2]=ideal(1);
    31033095                if (abspri) { return(prepare_absprimdec(primary));}
    3104              return( primary ); 
     3096             return( primary );
    31053097          }
    31063098        }
     
    31133105      primary[1]=ltras[2];
    31143106      primary[2]=maxideal(1);
    3115       option(set,initialOp); 
     3107      option(set,initialOp);
    31163108      if(@wr>0)
    31173109      {
     
    31373129  if(size(i)==0)
    31383130  {
    3139     option(set,initialOp); 
     3131    option(set,initialOp);
    31403132    primary=ideal(0),ideal(0);
    31413133    if (abspri) { return(prepare_absprimdec(primary));}
     
    31823174    {
    31833175        if ( deg( lead(@j[1]) )==0 ) // we have the unit ideal.
    3184         { 
     3176        {
    31853177            setring @P;
    31863178            option(set,initialOp);
    31873179            if (patchPrimaryDecomposition==1)
    31883180            {
    3189                  return( list() ); 
     3181                 return( list() );
    31903182            }
    31913183            else
    31923184            {
    3193                return( list(ideal(1),ideal(1)) ); 
     3185               return( list(ideal(1),ideal(1)) );
    31943186            }
    31953187        }
     
    32653257      list pr=decomp_i(patchPrimaryDecomposition,@j);
    32663258      if (size(pr)==0)
    3267       {     
     3259      {
    32683260            setring @P;
    32693261            option(set,initialOp);
     
    32713263            return(list());
    32723264      }
    3273      
     3265
    32743266      setring gnir;
    32753267      list pr=imap(@deirf,pr);
     
    33213313    }
    33223314    setring @P;
    3323     option(set,initialOp); 
     3315    option(set,initialOp);
    33243316    primary=fetch(gnir,gprimary);
    33253317//HIER
     
    33833375      primary=imap(gnir,primary);
    33843376    }
    3385     option(set,initialOp); 
     3377    option(set,initialOp);
    33863378    return(primary);
    33873379  }
     
    40444036  //---------------------------------------------------------------------------
    40454037  setring @P;
    4046   option(set,initialOp); 
     4038  option(set,initialOp);
    40474039  primary=imap(gnir,quprimary);
    40484040  if(!abspri)
     
    45694561static proc min_ass_prim_charsets_i (int patchPrimaryDecomposition, ideal PS, int cho)
    45704562{
    4571 // if patchPrimaryDecomposition=1,  drop unit ideal in the decomposition, 
     4563// if patchPrimaryDecomposition=1,  drop unit ideal in the decomposition,
    45724564// since the unit ideal it is not prime, otherwise take no special action.
    45734565  ASSUME(1, hasFieldCoefficient(basering) );
     
    46044596static proc min_ass_prim_charsets0_i (int patchPrimaryDecomposition, ideal PS)
    46054597{
    4606 // if patchPrimaryDecomposition=1,  drop unit ideal in the decomposition, 
     4598// if patchPrimaryDecomposition=1,  drop unit ideal in the decomposition,
    46074599// since the unit ideal it is not prime, otherwise take no special action.
    46084600  ASSUME(1, hasFieldCoefficient(basering) );
     
    46104602  ASSUME(1, hasGlobalOrdering(basering) ) ;
    46114603
     4604  if (size(PS)==0) { return( list(ideal(0))); }
    46124605  intvec op;
    4613   if (size(PS)==0) { return( list(ideal(0))); }
    46144606  matrix m=char_series(PS);  // We compute an irreducible
    46154607                             // characteristic series
     
    47024694      if (patchPrimaryDecomposition==1)
    47034695      {
    4704         return( list() ); 
     4696        return( list() );
    47054697      }
    47064698      else
    47074699      {
    4708         return( list(ideal(1)) ); 
    4709       }
    4710     }
    4711   } 
     4700        return( list(ideal(1)) );
     4701      }
     4702    }
     4703  }
    47124704  return (PSI);
    47134705}
     
    47264718static proc min_ass_prim_charsets1_i (int patchPrimaryDecomposition, ideal PS)
    47274719{
    4728 // if patchPrimaryDecomposition=1,  drop unit ideal in the decomposition, 
     4720// if patchPrimaryDecomposition=1,  drop unit ideal in the decomposition,
    47294721// since the unit ideal it is not prime, otherwise take no special action.
    47304722  ASSUME(1, hasFieldCoefficient(basering) );
     
    47324724  ASSUME(1, hasGlobalOrdering(basering) ) ;
    47334725
     4726  if (size(PS)==0) { return( list(ideal(0))); }
    47344727  intvec op;
    47354728  def oldring=basering;
    4736   if (size(PS)==0) { return( list(ideal(0))); }
    47374729  string n=system("neworder",PS);
    47384730  execute("ring r=("+charstr(oldring)+"),("+n+"),dp;");
     
    48544846      if (patchPrimaryDecomposition==1)
    48554847      {
    4856         return( list() ); 
     4848        return( list() );
    48574849      }
    48584850      else
    48594851      {
    4860         return( list(ideal(1)) ); 
    4861       }
    4862     }
    4863   } 
     4852        return( list(ideal(1)) );
     4853      }
     4854    }
     4855  }
    48644856
    48654857  return (PSI);
     
    48894881static proc prim_dec_i(int patchPrimaryDecomposition, ideal I, int choose)
    48904882{
    4891 // if patchPrimaryDecomposition=1,  drop unit ideal in the decomposition, 
     4883// if patchPrimaryDecomposition=1,  drop unit ideal in the decomposition,
    48924884// since the unit ideal it is not prime, otherwise take no special action.
    48934885  ASSUME(1, hasFieldCoefficient(basering) );
     
    49304922          if (patchPrimaryDecomposition==1)
    49314923          {
    4932              return( list() ); 
     4924             return( list() );
    49334925          }
    49344926          else
    49354927          {
    4936                return( list(list(ideal(1),ideal(1))) ); 
     4928               return( list(list(ideal(1),ideal(1))) );
    49374929          }
    49384930  }
     
    51255117static proc pseudo_prim_dec_charsets_i(int patchPrimaryDecomposition, ideal I, ideal SI, int choo)
    51265118{
    5127 // if patchPrimaryDecomposition=1,  drop the unit ideal in the decomposition, 
     5119// if patchPrimaryDecomposition=1,  drop the unit ideal in the decomposition,
    51285120// since the unit ideal it is not prime, otherwise take no special action.
    51295121  ASSUME(1, hasFieldCoefficient(basering) );
     
    51805172static proc pseudo_prim_dec_special_charsets_i (int patchPrimaryDecomposition, ideal SI,list V6, int choo)
    51815173{
    5182 // if patchPrimaryDecomposition=1,  drop the unit ideal in the decomposition, 
     5174// if patchPrimaryDecomposition=1,  drop the unit ideal in the decomposition,
    51835175// since the unit ideal it is not prime, otherwise take no special action.
    51845176  ASSUME(1, hasFieldCoefficient(basering) );
     
    52825274static proc pseudo_prim_dec_i_i (int patchPrimaryDecomposition, ideal SI, list L)
    52835275{
    5284 // if patchPrimaryDecomposition=1,  drop the unit ideal in the decomposition, 
     5276// if patchPrimaryDecomposition=1,  drop the unit ideal in the decomposition,
    52855277// since the unit ideal it is not prime, otherwise take no special action.
    52865278  ASSUME(1, hasFieldCoefficient(basering) );
     
    57035695"
    57045696{
    5705     return (primdecGTZ_i(int(1),I,  #));     
     5697    return (primdecGTZ_i(1,I,  #));
    57065698}
    57075699example
     
    57205712proc primdecGTZ(ideal I, list #)
    57215713"USAGE:   primdecGTZ(I); I ideal
    5722 RETURN:  a list pr of primary ideals and their associated primes for a proper ideal I, otherwise pr = list( list( ideal(1), ideal(1) ) 
     5714RETURN:  a list pr of primary ideals and their associated primes for a proper ideal I, otherwise pr = list( list( ideal(1), ideal(1) )
    57235715@format
    57245716   pr[i][1]   the i-th primary component,
    57255717   pr[i][2]   the i-th prime component.
    57265718@end format
    5727 NOTE:      deprecated. use 'primdecGTZE()'
    5728          - Algorithm of Gianni/Trager/Zacharias.
     5719NOTE:    - Algorithm of Gianni/Trager/Zacharias.
    57295720         - Designed for characteristic 0, works also in char k > 0, if it
    57305721           terminates (may result in an infinite loop in small characteristic!)
     
    57375728"
    57385729{
    5739     return (primdecGTZ_i(int(0), I , #));
     5730    return (primdecGTZ_i(0, I , #));
    57405731}
    57415732example
     
    57515742static proc primdecGTZ_i(int patchPrimaryDecomposition,ideal i, list #)
    57525743{
    5753 // if parameter patchPrimaryDecomposition=1,  drop the unit ideal in the decomposition, 
     5744// if parameter patchPrimaryDecomposition=1,  drop the unit ideal in the decomposition,
    57545745//           since the unit ideal it is not prime, otherwise take no special action.
    57555746// For other parameters see 'primdecGTZ' or 'primdecGTZE'.
     
    57725763      int sizeli = size(li);
    57735764      setring r;
    5774       if (sizeli==0) 
    5775       {
    5776           return ( list() ); 
    5777       }
    5778       def li=imap(s,li);
     5765      if (sizeli==0)
     5766      {
     5767          return ( list() );
     5768      }
     5769      list li=imap(s,li);
    57795770// clean up
    57805771      if(!defined(keep_comp))
     
    58295820"
    58305821{
    5831      return(absPrimdecGTZ_i(int(1),I,#));
     5822     return(absPrimdecGTZ_i(1,I,#));
    58325823}
    58335824example
     
    58625853         corresponding global ring is returned if the string 'global'
    58635854         is specified as second argument
    5864 NOTE:    deprecated. Use 'absPrimdecGTZE()'.
    5865          Algorithm of Gianni/Trager/Zacharias combined with the
     5855NOTE:    Algorithm of Gianni/Trager/Zacharias combined with the
    58665856         @code{absFactorize} command.
    58675857SEE ALSO: primdecGTZ; absFactorize
     
    58695859"
    58705860{
    5871  
    5872     return(absPrimdecGTZ_i(int(0),I,#));
     5861
     5862    return(absPrimdecGTZ_i(0,I,#));
    58735863}
    58745864example
     
    58875877static proc absPrimdecGTZ_i(int patchPrimaryDecomposition, ideal I, list #)
    58885878{
    5889 // if parameter patchPrimaryDecomposition=1,  drop the unit ideal in the decomposition, 
     5879// if parameter patchPrimaryDecomposition=1,  drop the unit ideal in the decomposition,
    58905880//           since the unit ideal it is not prime, otherwise take no special action.
    58915881// For other parameters see 'absPrimdecGTZ' or 'absPrimdecGTZE'.
     
    59535943    //return(algeDeco_i(patchPrimaryDecomposition,I,0));
    59545944    ERROR(
    5955       "// Not implemented yet for algebraic extensions.Simulate the ring extension by adding the minpoly to the ideal"
     5945      "Not implemented yet for algebraic extensions.Simulate the ring extension by adding the minpoly to the ideal"
    59565946    );
    59575947  }
     
    59595949  int n=nvars(R);
    59605950  list L=decomp_i(patchPrimaryDecomposition,I,3);
    5961   if (patchPrimaryDecomposition && size(L)==0 ) 
    5962   {
    5963      ERROR("will not handle case with unit ideal");
     5951  if (patchPrimaryDecomposition && size(L)==0 )
     5952  {
     5953     "// will not handle case with unit ideal";
    59645954  }
    59655955  string newvar=L[1][3];
     
    60556045"
    60566046{
    6057      return (primdecSY_i(int(1),I,#));
     6047     return (primdecSY_i(1,I,#));
    60586048}
    60596049example
     
    60776067   pr[i][2]   the i-th prime component.
    60786068@end format
    6079 NOTE:    deprecated. Use 'primdecSYE()'.
    6080          Algorithm of Shimoyama/Yokoyama.
     6069NOTE:    Algorithm of Shimoyama/Yokoyama.
    60816070@format
    60826071   if c=0,  the given ordering of the variables is used,
     
    60936082"
    60946083{
    6095     return (primdecSY_i(int(0),I,#));
     6084    return (primdecSY_i(0,I,#));
    60966085}
    60976086example
     
    61086097static proc primdecSY_i(int patchPrimaryDecomposition, ideal i, list #)
    61096098{
    6110 //           if patchPrimaryDecomposition=1,  drop the unit ideal in the decomposition, 
     6099//           if patchPrimaryDecomposition=1,  drop the unit ideal in the decomposition,
    61116100//           since the unit ideal it is not prime, otherwise take no special action.
    61126101//           For other paremetes see 'primdecSY' or 'primdecSYE'
     
    61346123      if(!defined(keep_comp))
    61356124      {
    6136          for(int k=size(li);k>=1;k--)
    6137          {
    6138             if(mindeg(std(lead(li[k][2]))[1])==0)
    6139             {
     6125        for(int k=size(li);k>=1;k--)
     6126        {
     6127          if(mindeg(std(lead(li[k][2]))[1])==0)
     6128          {
    61406129// 1 contained in ideal, i.e. component does not meet origin in local ordering
    6141                li=delete(li,k);
    6142             }
    6143          }
     6130            li=delete(li,k);
     6131          }
     6132        }
    61446133      }
    61456134      return(li);
     
    61476136   i=simplify(i,2);
    61486137
    6149    //if ((i[1]==0)||(i[1]==1)) // would not work anyway, since i cannot be assumed to be in standard basis form;
    6150    //                          // but why return list(1,1) in case i=1 ??
    6151    if ( (i[1]==0) )
    6152 
     6138   if ((i[1]==0)||(i[1]==1))
    61536139   {
    61546140     list L = list(ideal(i[1]), ideal(i[1]) );
     
    61876173"
    61886174{
    6189     list result = minAssGTZ_i(int(1),I,#);
     6175    list result = minAssGTZ_i(1,I,#);
    61906176    return(result);
    6191      
     6177
    61926178}
    61936179example
     
    62156201
    62166202RETURN:  a list, the minimal associated prime ideals of proper ideal I, otherwise ideal(1)
    6217 NOTE:    deprecated. Use 'minAssGTZE()'.
    6218          - Designed for characteristic 0, works also in char k > 0 based
     6203NOTE:    - Designed for characteristic 0, works also in char k > 0 based
    62196204           on an algorithm of Yokoyama
    62206205         - For local orderings, the result is considered in the localization
     
    62266211"
    62276212{
    6228     list result = minAssGTZ_i(int(0),I,#);
     6213    list result = minAssGTZ_i(0,I,#);
    62296214    return(result);
    62306215}
     
    62436228static proc minAssGTZ_i(int patchPrimaryDecomposition, ideal i,list #)
    62446229 {
    6245 //           if patchPrimaryDecomposition=1,  drop the unit ideal in the decomposition, 
     6230//           if patchPrimaryDecomposition=1,  drop the unit ideal in the decomposition,
    62466231//           since the unit ideal it is not prime, otherwise take no special action.
    62476232//           For other parameters see 'minAssGTZ' or 'minAssGTZE'
     
    63466331"
    63476332{
    6348     return(minAssChar_i(int(1),I,#));
     6333    return(minAssChar_i(1,I,#));
    63496334}
    63506335example
     
    63646349"USAGE:   minAssChar(I[,c]); i ideal, c int (optional).
    63656350RETURN:  list, the minimal associated prime ideals of I. If I is the unit ideal returns list( ideal(1) )
    6366 NOTE:    deprecated. Use 'minAssCharE'.
    6367          If c=0, the given ordering of the variables is used. @*
     6351NOTE:    If c=0, the given ordering of the variables is used. @*
    63686352         Otherwise, the system tries to find an optimal ordering,
    63696353         which in some cases may considerably speed up the algorithm. @*
     
    63756359EXAMPLE: example minAssChar; shows an example
    63766360"
    6377 { 
    6378     return(minAssChar_i(int(0),I,#));
     6361{
     6362    return(minAssChar_i(0,I,#));
    63796363}
    63806364example
     
    63906374proc minAssChar_i(int patchPrimaryDecomposition, ideal i, list #)
    63916375{
    6392 //           if patchPrimaryDecomposition=1,  drop the unit ideal in the decomposition, 
     6376//           if patchPrimaryDecomposition=1,  drop the unit ideal in the decomposition,
    63936377//           since the unit ideal it is not prime, otherwise take no special action.
    63946378//           For other parameters see 'minAssChar' or 'minAssCharE'
     
    73367320"
    73377321{
    7338     return(testPrimary_i(int(1),pr,k));
     7322    return(testPrimary_i(1,pr,k));
    73397323}
    73407324example
     
    73527336ASSUME:  pr is the result of primdecGTZ(k) or primdecSY(k).
    73537337RETURN:  int, 1 if the intersection of the ideals in pr is k, 0 if not
    7354 NOTE:    deprecated. Use 'testPrimaryE()'
    73557338EXAMPLE: example testPrimary; shows an example
    73567339"
    73577340{
    7358     return(testPrimary_i(int(0),pr,k));
     7341    return(testPrimary_i(0,pr,k));
    73597342}
    73607343example
     
    73867369   }
    73877370   ideal j=pr[1];
    7388  
     7371
    73897372
    73907373   for (i=2;i<=size(pr) div 2;i++)
     
    75187501static proc newDecompStepE(ideal I, list #)
    75197502{
    7520    return(newDecompStep_i(int(1),I,#));
     7503   return(newDecompStep_i(1,I,#));
    75217504}
    75227505
    75237506static proc newDecompStep(ideal I, list #)
    75247507{
    7525     return(newDecompStep_i(int(0),I,#));
     7508    return(newDecompStep_i(0,I,#));
    75267509}
    75277510
     
    75397522         (resp. a list of the minimal associated primes)
    75407523NOTE:    Algorithm of Gianni/Trager/Zacharias
    7541          if patchPrimaryDecomposition=1,  drop the unit ideal in the decomposition, 
     7524         if patchPrimaryDecomposition=1,  drop the unit ideal in the decomposition,
    75427525         since the unit ideal it is not prime, otherwise take no special action.
    75437526EXAMPLE: example newDecompStep; shows an example
     
    87358718"
    87368719{
    8737  return(minAss_i(int(1),I,#));
     8720 return(minAss_i(1,I,#));
    87388721}
    87398722example
     
    87538736"USAGE:   minAss(I[, l]); I ideal, l list (optional) of parameters, same as minAssGTZ
    87548737RETURN:  a list, the minimal associated prime ideals of I. If I is the unit ideal, returns list(ideal(1));
    8755 NOTE:    deprecated. Use 'minAssE()'.
    8756          Designed for characteristic 0, works also in char k > 0 based
     8738NOTE:    Designed for characteristic 0, works also in char k > 0 based
    87578739         on an algorithm of Yokoyama
    87588740EXAMPLE: example minAss; shows an example
    87598741"
    87608742{
    8761     return(minAss_i(int(0),I,#));
     8743    return(minAss_i(0,I,#));
    87628744}
    87638745example
     
    87738755static proc minAss_i(int patchPrimaryDecomposition,ideal I,list #)
    87748756{
    8775 //         if patchPrimaryDecomposition=1,  drop the unit ideal in the decomposition, 
     8757//         if patchPrimaryDecomposition=1,  drop the unit ideal in the decomposition,
    87768758//         since the unit ideal it is not prime, otherwise take no special action.
    87778759//         For other parameters see 'minAss' or 'minAssE'
     
    88688850  dbprint(printlevel - voice, "// We do the reduction to the zerodimensional case, via decomp.");
    88698851
    8870   primaryDec = newDecompStep_i( int(1), J, "oneIndep", "intersect", 2);
     8852  primaryDec = newDecompStep_i( 1, J, "oneIndep", "intersect", 2);
    88718853  // Debug
    88728854  dbprint(printlevel - voice, "// Proc decomp has found", size(primaryDec) div 2, "new primary components.");
     
    90189000  if (dim(j)>0)
    90199001  {
    9020     ERROR("dim(j)>0 . Please send the failing example to the authors");
     9002    "// dim(j)>0 . Please send the example to the authors";
    90219003    primary[1]=ideal(1);
    90229004    primary[2]=ideal(1);
     
    90749056    if((size(ser)>0)&&(size(reduce(ser,j,1))==0))
    90759057    {
    9076        ERROR("dim(j)==-1 unexpected. Please send the failing example to the authors");
     9058       "// dim(j)==-1 unexpected. Please send the example to the authors";
    90779059      primary[1]=ideal(1);
    90789060      primary[2]=ideal(1);
     
    90819063    if(dim(j)==-1)
    90829064    {
    9083       ERROR("dim(j)==-1 unexpected. Please send the failing example to the authors");
     9065      "// dim(j)==-1 unexpected. Please send the example to the authors";
    90849066      primary[1]=ideal(1);
    90859067      primary[2]=ideal(1);
     
    91009082  else
    91019083  {
    9102     ERROR("failure in newZero_decomp. Please send the failing example to the authors");
     9084    "// failure in newZero_decomp. Please send the example to the authors";
    91039085    primary[1]=ideal(1);
    91049086    primary[2]=ideal(1);
     
    91129094    if(size(#)>1)
    91139095    {
    9114       ERROR("failure in newZero_decomp. Please send the failing example to the authors");
     9096      "// failure in newZero_decomp. Please send the example to the authors";
    91159097      primary[1]=ideal(1);
    91169098      primary[2]=ideal(1);
     
    91819163      if(size(primary[2*@k])==0)
    91829164      {
    9183         ek=insepDecomp_i(int(1), primary[2*@k-1]);
     9165        ek=insepDecomp_i(1, primary[2*@k-1]);
    91849166        primary=delete(primary,2*@k);
    91859167        primary=delete(primary,2*@k-1);
Note: See TracChangeset for help on using the changeset viewer.