Changeset 768b28 in git


Ignore:
Timestamp:
Feb 3, 2010, 10:37:45 AM (13 years ago)
Author:
Frank Seelisch <seelisch@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a657104b677b4c461d018cbf3204d72d34ad66a9')
Children:
538d63bfc3ca276e2733bf749ab86a1685ec5dad
Parents:
f679897a09a02b4b0b17aed9982a4f6c8356c1d3
Message:
changes by Anne Fruehbis-Krueger

git-svn-id: file:///usr/local/Singular/svn/trunk@12508 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/primdec.lib

    rf679897 r768b28  
    55LIBRARY: primdec.lib   Primary Decomposition and Radical of Ideals
    66AUTHORS:  Gerhard Pfister, pfister@mathematik.uni-kl.de (GTZ)@*
    7           Wolfram Decker, decker@mathematik.uni-kl.de   (SY)@*
     7          Wolfram Decker, decker@math.uni-sb.de         (SY)@*
    88          Hans Schoenemann, hannes@mathematik.uni-kl.de (SY)@*
    99          Santiago Laplagne, slaplagn@dm.uba.ar         (GTZ)
     
    5050LIB "triang.lib";
    5151LIB "absfact.lib";
     52LIB "ring.lib";
    5253///////////////////////////////////////////////////////////////////////////////
    5354//
     
    51005101///////////////////////////////////////////////////////////////////////////////
    51015102
    5102 proc primdecGTZ(ideal i)
     5103proc primdecGTZ(ideal i, list #)
    51035104"USAGE:   primdecGTZ(i); i ideal
    51045105RETURN:  a list pr of primary ideals and their associated primes:
     
    51075108   pr[i][2]   the i-th prime component.
    51085109@end format
    5109 NOTE:    Algorithm of Gianni/Trager/Zacharias.
    5110          Designed for characteristic 0, works also in char k > 0, if it
    5111          terminates (may result in an infinite loop in small characteristic!)
     5110NOTE:    - Algorithm of Gianni/Trager/Zacharias.
     5111         - Designed for characteristic 0, works also in char k > 0, if it
     5112           terminates (may result in an infinite loop in small characteristic!)
     5113         - For local orderings, the result is considered in the localization
     5114           of the polynomial ring, not in the power series ring
     5115         - For local and mixed orderings, the decomposition in the
     5116           corresponding global ring is returned if the string 'global'
     5117           is specified as second argument
    51125118EXAMPLE: example primdecGTZ; shows an example
    51135119"
    51145120{
     5121   if(size(#)>0)
     5122   {
     5123      int keep_comp=1;
     5124   }
    51155125   if(attrib(basering,"global")!=1)
    51165126   {
    5117       ERROR(
    5118       "// Not implemented for this ordering, please change to global ordering."
    5119       );
     5127// algorithms only work in global case!
     5128// pass to appropriate global ring
     5129      def r=basering;
     5130      def s=changeord("dp");
     5131      setring s;
     5132      ideal i=imap(r,i);
     5133// decompose and go back
     5134      list li=primdecGTZ(i);
     5135      setring r;
     5136      def li=imap(s,li);
     5137// clean up
     5138      if(!defined(keep_comp))
     5139      {
     5140         for(int k=size(li);k>=1;k--)
     5141         {
     5142            if(mindeg(std(lead(li[k][2]))[1])==0)
     5143            {
     5144// 1 contained in ideal, i.e. component does not meet origin in local ordering
     5145               li=delete(li,k);
     5146            }
     5147         }
     5148      }
     5149      return(li);
    51205150   }
     5151
    51215152   if(minpoly!=0)
    51225153   {
     
    51385169}
    51395170///////////////////////////////////////////////////////////////////////////////
    5140 proc absPrimdecGTZ(ideal I)
     5171proc absPrimdecGTZ(ideal I, list #)
    51415172"USAGE:   absPrimdecGTZ(I); I ideal
    51425173ASSUME:  Ground field has characteristic 0.
    5143 RETURN:  a ring containing two lists: @code{absolute_primes} (the absolute
    5144          prime components of I) and @code{primary_decomp} (the output of
    5145          @code{primdecGTZ(I)}).
     5174RETURN:  a ring containing two lists: @code{absolute_primes}, the absolute
     5175         prime components of I, and @code{primary_decomp}, the output of
     5176         @code{primdecGTZ(I)}.
    51465177         The list absolute_primes has to be interpreted as follows:
    51475178         each entry describes a class of conjugated absolute primes,
     
    51535184         polynomial of a minimal finite field extension over which the
    51545185         absolute prime component is defined.
     5186         For local orderings, the result is considered in the localization
     5187         of the polynomial ring, not in the power series ring.
     5188         For local and mixed orderings, the decomposition in the
     5189         corresponding global ring is returned if the string 'global'
     5190         is specified as second argument
    51555191NOTE:    Algorithm of Gianni/Trager/Zacharias combined with the
    51565192         @code{absFactorize} command.
     
    51655201  }
    51665202
     5203  if(size(#)>0)
     5204  {
     5205     int keep_comp=1;
     5206  }
     5207
    51675208  if(attrib(basering,"global")!=1)
    51685209  {
    5169     ERROR(
    5170       "// Not implemented for this ordering, please change to global ordering."
    5171     );
     5210// algorithm automatically passes to the global case
     5211// hence prepare to go back to an appropriate new ring
     5212      def r=basering;
     5213      ideal max_of_r=maxideal(1);
     5214      def s=changeord("dp");
     5215      setring s;
     5216      def I=imap(r,I);
     5217      def S=absPrimdecGTZ(I);
     5218      setring S;
     5219      ring r1=char(basering),var(nvars(r)+1),dp;
     5220      def rS=r+r1;
     5221// move objects to appropriate ring and clean up
     5222      setring rS;
     5223      def max_of_r=imap(r,max_of_r);
     5224      attrib(max_of_r,"isSB",1);
     5225      def absolute_primes=imap(S,absolute_primes);
     5226      def primary_decomp=imap(S,primary_decomp);
     5227      if(!defined(keep_comp))
     5228      {
     5229         ideal tempid;
     5230         for(int k=size(absolute_primes);k>=1;k--)
     5231         {
     5232            tempid=absolute_primes[k][1];
     5233            tempid[1]=0;                  // ignore minimal polynomial
     5234            if(size(reduce(lead(tempid),max_of_r))!=0)
     5235            {
     5236// 1 contained in ideal, i.e. component does not meet origin in local ordering
     5237               absolute_primes=delete(absolute_primes,k);
     5238            }
     5239         }     
     5240         for(k=size(primary_decomp);k>=1;k--)
     5241         {
     5242            if(mindeg(std(lead(primary_decomp[k][2]))[1])==0)
     5243            {
     5244// 1 contained in ideal, i.e. component does not meet origin in local ordering
     5245               primary_decomp=delete(primary_decomp,k);
     5246            }
     5247         }
     5248         kill tempid;
     5249      }
     5250      export(primary_decomp);
     5251      export(absolute_primes);
     5252      return(rS);
    51725253  }
    51735254  if(minpoly!=0)
     
    52745355   if c=3,  minAssGTZ and facstd are used.
    52755356@end format
     5357         For local orderings, the result is considered in the localization
     5358         of the polynomial ring, not in the power series ring.
     5359         For local and mixed orderings, the decomposition in the
     5360         corresponding global ring is returned if the string 'global'
     5361         is specified as third argument
    52765362EXAMPLE: example primdecSY; shows an example
    52775363"
    52785364{
     5365   if(size(#)>1)
     5366   {
     5367      int keep_comp=1;
     5368   }
    52795369   if(attrib(basering,"global")!=1)
    52805370   {
    5281       ERROR(
    5282       "// Not implemented for this ordering, please change to global ordering."
    5283       );
     5371// algorithms only work in global case!
     5372// pass to appropriate global ring
     5373      def r=basering;
     5374      def s=changeord("dp");
     5375      setring s;
     5376      ideal i=imap(r,i);
     5377// decompose and go back
     5378      list li=primdecSY(i);
     5379      setring r;
     5380      def li=imap(s,li);
     5381// clean up
     5382      if(!defined(keep_comp))
     5383      {
     5384         for(int k=size(li);k>=1;k--)
     5385         {
     5386            if(mindeg(std(lead(li[k][2]))[1])==0)
     5387            {
     5388// 1 contained in ideal, i.e. component does not meet origin in local ordering
     5389               li=delete(li,k);
     5390            }
     5391         }
     5392      }
     5393      return(li);
    52845394   }
    52855395   i=simplify(i,2);
     
    52895399     return(list(L));
    52905400   }
     5401
    52915402   if(minpoly!=0)
    52925403   {
    52935404      return(algeDeco(i,1));
    52945405   }
    5295    if (size(#)==1)
     5406   if (size(#)!=0)
    52965407   { return(prim_dec(i,#[1])); }
    52975408   else
     
    53175428
    53185429RETURN:  a list, the minimal associated prime ideals of I.
    5319 NOTE:    Designed for characteristic 0, works also in char k > 0 based
    5320          on an algorithm of Yokoyama
     5430NOTE:    - Designed for characteristic 0, works also in char k > 0 based
     5431           on an algorithm of Yokoyama
     5432         - For local orderings, the result is considered in the localization
     5433           of the polynomial ring, not in the power series ring
     5434         - For local and mixed orderings, the decomposition in the
     5435           corresponding global ring is returned if the string 'global'
     5436           is specified as second argument
    53215437EXAMPLE: example minAssGTZ; shows an example
    53225438"
    53235439{
     5440   if(size(#)>0)
     5441   {
     5442      int keep_comp=1;
     5443   }
     5444
     5445  if(attrib(basering,"global")!=1)
     5446  {
     5447  // algorithms only work in global case!
     5448// pass to appropriate global ring
     5449      def r=basering;
     5450      def s=changeord("dp");
     5451      setring s;
     5452      ideal i=imap(r,i);
     5453// decompose and go back
     5454      list li=minAssGTZ(i);
     5455      setring r;
     5456      def li=imap(s,li);
     5457// clean up
     5458      if(!defined(keep_comp))
     5459      {
     5460         for(int k=size(li);k>=1;k--)
     5461         {
     5462            if(mindeg(std(lead(li[k]))[1])==0)
     5463            {
     5464// 1 contained in ideal, i.e. component does not meet origin in local ordering
     5465               li=delete(li,k);
     5466            }
     5467         }
     5468      }
     5469      return(li);
     5470  }
     5471
    53245472  int j;
    53255473  string algorithm;
     
    53615509  }
    53625510
    5363   if(attrib(basering,"global")!=1)
    5364   {
    5365     ERROR(
    5366       "// Not implemented for this ordering, please change to global ordering."
    5367     );
    5368   }
    53695511  if(minpoly!=0)
    53705512  {
     
    53925534         Otherwise, the system tries to find an optimal ordering,
    53935535         which in some cases may considerably speed up the algorithm. @*
     5536         For local orderings, the result is considered in the localization
     5537         of the polynomial ring, not in the power series ring
     5538         For local and mixed orderings, the decomposition in the
     5539         corresponding global ring is returned if the string 'global'
     5540         is specified as third argument
    53945541EXAMPLE: example minAssChar; shows an example
    53955542"
    53965543{
     5544   if(size(#)>1)
     5545   {
     5546      int keep_comp=1;
     5547   }
    53975548   if(attrib(basering,"global")!=1)
    53985549   {
    5399       ERROR(
    5400       "// Not implemented for this ordering, please change to global ordering."
    5401       );
     5550// algorithms only work in global case!
     5551// pass to appropriate global ring
     5552      def r=basering;
     5553      def s=changeord("dp");
     5554      setring s;
     5555      ideal i=imap(r,i);
     5556// decompose and go back
     5557      list li=minAssChar(i);
     5558      setring r;
     5559      def li=imap(s,li);
     5560// clean up
     5561      if(!defined(keep_comp))
     5562      {
     5563         for(int k=size(li);k>=1;k--)
     5564         {
     5565            if(mindeg(std(lead(li[k]))[1])==0)
     5566            {
     5567// 1 contained in ideal, i.e. component does not meet origin in local ordering
     5568               li=delete(li,k);
     5569            }
     5570         }
     5571      }
     5572      return(li);
    54025573   }
    5403    if (size(#)==1)
     5574   if (size(#)>0)
    54045575   { return(min_ass_prim_charsets(i,#[1])); }
    54055576   else
     
    54615632  if(attrib(basering,"global")!=1)
    54625633  {
    5463     ERROR(
    5464      "// Not implemented for this ordering, please change to global ordering."
    5465     );
     5634// algorithms only work in global case!
     5635// pass to appropriate global ring
     5636      def r=basering;
     5637      def s=changeord("dp");
     5638      setring s;
     5639      ideal i=imap(r,i);
     5640// compute radical and go back
     5641      def j=radical(i);
     5642      setring r;
     5643      def j=imap(s,j);
     5644      return(j);
    54665645  }
    54675646  if(size(i) == 0){return(ideal(0));}
Note: See TracChangeset for help on using the changeset viewer.