Changeset 6ffa84 in git


Ignore:
Timestamp:
Aug 17, 1999, 1:27:40 PM (25 years ago)
Author:
Gerhard Pfister <pfister@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
69dd39de669e228955bd918bae2a61178aa39d32
Parents:
f2c49e3590500de17cffd296c90b875df1df73f3
Message:
primaryTest adapted to char p


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/primdec.lib

    rf2c49e3 r6ffa84  
    1 // $Id: primdec.lib,v 1.44 1999-08-03 13:01:02 obachman Exp $
     1// $Id: primdec.lib,v 1.45 1999-08-17 11:27:40 pfister Exp $
    22///////////////////////////////////////////////////////////////////////////////
    33// primdec.lib                                                               //
     
    1111///////////////////////////////////////////////////////////////////////////////
    1212
    13 version="$Id: primdec.lib,v 1.44 1999-08-03 13:01:02 obachman Exp $";
     13version="$Id: primdec.lib,v 1.45 1999-08-17 11:27:40 pfister Exp $";
    1414info="
    1515LIBRARY: primdec.lib:   PROCEDURES FOR PRIMARY DECOMPOSITION
     
    426426   int m=1;
    427427   int n=nvars(basering);
    428    int e;
     428   int e,f;
    429429   poly t;
    430430   ideal h;
     431   list act;
    431432
    432433   ideal prm=p;
     
    456457
    457458      e=deg(lead(i[m]));
    458       t=leadcoef(i[m])*e*var(n)+(i[m]-lead(i[m]))/var(n)^(e-1);
    459 
    460       i[m]=poly(e)^e*leadcoef(i[m])^(e-1)*i[m];
    461 
    462       if(i[m]==0)
    463       {
    464         if ( voice >=15 )
    465         {
    466            "// WARNING: The characteristic is perhaps too small to use";
    467            "// the algorithm of Gianni/Trager/Zacharias.";
    468            "// This may result in an infinte loop";
    469            "// current nesting level in primaryTest:",voice;"";
    470         }
    471 
    472       }
    473       if (reduce(i[m]-t^e,prm,1) !=0)
    474       {
    475         return(ideal(0));
    476       }
     459
     460      if(char(basering)!=0)
     461      {
     462         f=1;
     463         if(e mod char(basering)==0)
     464         {
     465           if ( voice >=15 )
     466           {
     467              "// WARNING: The characteristic is perhaps too small to use";
     468              "// the algorithm of Gianni/Trager/Zacharias.";
     469              "// This may result in an infinte loop";
     470              "// loop in primaryTest, voice:",voice;"";
     471           }
     472           while(e mod char(basering)==0)
     473           {
     474              f=f*char(basering);
     475              e=e/char(basering); 
     476           }
     477       
     478         }
     479         t=leadcoef(i[m])*e*var(n)^f+(i[m]-lead(i[m]))/var(n)^((e-1)*f);
     480         i[m]=poly(e)^e*leadcoef(i[m])^(e-1)*i[m];
     481         if (reduce(i[m]-t^e,prm,1) !=0)
     482         {
     483           return(ideal(0));
     484         }
     485         if(f>1)
     486         {       
     487            act=factorize(t);
     488            if(size(act[1])>2)
     489            {
     490              return(ideal(0));   
     491            }
     492            t=act[1][2];
     493         }
     494      }
     495      else
     496      {
     497         t=leadcoef(i[m])*e*var(n)+(i[m]-lead(i[m]))/var(n)^(e-1);
     498         i[m]=poly(e)^e*leadcoef(i[m])^(e-1)*i[m];
     499         if (reduce(i[m]-t^e,prm,1) !=0)
     500         {
     501           return(ideal(0));
     502         }
     503      }
     504
    477505      h=interred(t);
    478506      t=h[1];
Note: See TracChangeset for help on using the changeset viewer.