Changeset 404f45 in git


Ignore:
Timestamp:
Jan 6, 2015, 2:34:49 PM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
d853f2fa59455393dace4230a5236621ec346619
Parents:
1a4ddd6e11ed47d58a9c10975aa210bf8fcf2868
Message:
primdec: copying rings
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/primdec.lib

    r1a4ddd r404f45  
    19071907        rl[2]=list(rl2[1..nnp]);
    19081908        rl[3]=list(list(order,1:nnp),list("C",0));
    1909     }   
     1909    }
    19101910    else
    19111911    {
     
    19131913    }
    19141914  }
    1915  
     1915
    19161916  def quotring=ring(rl);
    19171917  return(quotring);
     
    19601960   i=qr[1];
    19611961
    1962    execute ("ring gnir = ("+charstr(basering)+"),("+varstr(basering)+"),("
    1963              +ordstr(basering)+");");
    1964 
     1962   def gnir=ring(ringlist(@P));
     1963   setring gnir;
    19651964
    19661965   ideal i=fetch(@P,i);
     
    24322431                                &&(find(ordstr(basering),"s")==0))
    24332432  {
    2434      execute("ring gnir = ("+charstr(basering)+"),("+varstr(basering)+"),("
    2435                               +ordstr(basering)+");");
     2433     def gnir=ring(ringlist(basering));
     2434     setring gnir;
    24362435     ideal i=imap(P,i);
    24372436     ideal j=i;
     
    25372536                                &&(find(ordstr(basering),"s")==0))
    25382537  {
    2539      execute("ring gnir = ("+charstr(basering)+"),("+varstr(basering)+"),("
    2540                               +ordstr(basering)+");");
     2538     def gnir=ring(ringlist(basering));
     2539     setring gnir;
    25412540     ideal i=imap(P,i);
    25422541     ideal j=i;
     
    31433142  if(ordstr(@P)[1]=="w")
    31443143  {
    3145     execute("ring @Phelp=("+charstr(gnir)+"),("+varstr(gnir)+"),("+ordstr(@P)+");");
     3144    list gnir_l=ringlist(gnir);
     3145    list @P_l=ringlist(@P);
     3146    gnir_l[3]=@P_l[3]; // ord
     3147    def @Phelp=ring(gnir_l);
     3148    setring @Phelp;
     3149    kill gnir_l,@P_l;
    31463150  }
    31473151  else
     
    31843188    //change the ring
    31853189    {
    3186       execute("ring gnir1 = ("+charstr(basering)+"),("+varstr(basering)+"),("
    3187                               +ordstr(basering)+");");
     3190      def gnir1=ring(ringlist(basering));
     3191      setring gnir1;
    31883192      ideal @j=fetch(gnir,@j);
    31893193      attrib(@j,"isSB",1);
     
    34993503           //change the ring
    35003504        {
    3501           execute("ring gnir1 = ("+charstr(basering)+"),("+
    3502                varstr(basering)+"),("+ordstr(basering)+");");
     3505          def gnir1=ring(ringlist(basering));
     3506          setring gnir1;
    35033507          ideal @j=fetch(gnir,jkeep);
    35043508          attrib(@j,"isSB",1);
     
    38583862
    38593863///////////////////////////////////////////////////////////////////////////////
    3860  proc zeroRad(ideal I,list #)
     3864proc zeroRad(ideal I,list #)
    38613865"USAGE:  zeroRad(I) , I a zero-dimensional ideal
    3862  RETURN: the radical of I
    3863  NOTE:  Algorithm of Kemper
    3864  EXAMPLE: example zeroRad; shows an example
     3866RETURN: the radical of I
     3867NOTE:  Algorithm of Kemper
     3868EXAMPLE: example zeroRad; shows an example"
    38653869{
    38663870   ASSUME(0, hasFieldCoefficient(basering) );
     
    38983902   for(i=1;i<=n;i++)
    38993903   {
    3900       l[i]=sep(F[i],i);
    3901       F[i]=l[i][1];
    3902       if(l[i][2]>k){k=l[i][2];}  //computation of the maximal k
     3904     l[i]=sep(F[i],i);
     3905     F[i]=l[i][1];
     3906     if(l[i][2]>k){k=l[i][2];}  //computation of the maximal k
    39033907   }
    39043908
    39053909   if((k==0)||(m==0)) //the separable case
    39063910   {
    3907     intvec save=option(get);option(redSB);
    3908     I=interred(I+F);option(set,save);return(I);
     3911     intvec save=option(get);
     3912     option(redSB);
     3913     I=interred(I+F);
     3914     option(set,save);
     3915     return(I);
    39093916   }
    39103917   //I=simplify(I,1);
     
    39353942   for(i=1;i<=m;i++)
    39363943   {
    3937       J=J,var(i)^k-var(m+n+i);
    3938       el=el*var(i);
     3944     J=J,var(i)^k-var(m+n+i);
     3945     el=el*var(i);
    39393946   }
    39403947
     
    62816288    //change the ring
    62826289    {
    6283       execute("ring gnir1 = ("+charstr(basering)+"),("+varstr(basering)+"),("
    6284                               +ordstr(basering)+");");
     6290      def gnir1=ring(ringlist(basering));
     6291      setring gnir1;
    62856292      ideal @j = fetch(@P, I);
    62866293      attrib(@j, "isSB", 1);
     
    73427349  if(ordstr(@P)[1]=="w")
    73437350  {
    7344     execute("ring @Phelp=("+charstr(gnir)+"),("+varstr(gnir)+"),("+ordstr(@P)+");");
     7351    def @Phelp=ring(ringlist(gnir));
     7352    setring @Phelp;
    73457353  }
    73467354  else
     
    75227530           //change the ring
    75237531           {
    7524               execute("ring gnir1 = ("+charstr(basering)+"),("+
    7525                 varstr(basering)+"),("+ordstr(basering)+");");
     7532              def gnir1=ring(ringlist(basering));
     7533              setring gnir1;
    75267534              ideal @j=fetch(gnir,jkeep);
    75277535              attrib(@j,"isSB",1);
     
    78617869   //change the ring
    78627870   {
    7863      execute("ring gnir1 = ("+charstr(basering)+"),("+varstr(basering)+"),("
    7864                               +ordstr(basering)+");");
     7871     def gnir1=ring(ringlist(basering));
     7872     setring gnir1;
    78657873     ideal @j = fetch(gnir, @j);
    78667874     attrib(@j,"isSB",1);
Note: See TracChangeset for help on using the changeset viewer.