Changeset bb0968 in git


Ignore:
Timestamp:
Aug 1, 1997, 3:42:14 PM (27 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
839b04dc441f2b76e4a2527a0cf7dac720972c8e
Parents:
4d0d2f090f9b04cfdcbdba8a94c80e72307013d3
Message:
* (pfister) added stdhilbert(i)


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/standard.lib

    r4d0d2f0 rbb0968  
    1 // $Id: standard.lib,v 1.2 1997-07-11 11:12:46 obachman Exp $
     1// $Id: standard.lib,v 1.3 1997-08-01 13:42:14 obachman Exp $
    22///////////////////////////////////////////////////////////////////////////////
    33
     
    55
    66 stdfglm(ideal[,ord])   standard basis of the ideal via fglm [and ordering ord]
     7 stdhilbert(ideal)      standard basis of the ideal using the Hilbert function
    78///////////////////////////////////////////////////////////////////////////////
    89
     
    4647}
    4748///////////////////////////////////////////////////////////////////////////////
     49
     50proc stdhilbert(ideal i,list #)
     51USAGE:  stdhilbert(i);  i ideal
     52        stdhilbert(i,v); i homogeneous ideal, v intvec (the Hilbert function)
     53RETURN: stdhilbert(i);  standard basis of i computed using the Hilbert function
     54EXAMPLE: example stdhilbert; shows an example
     55{
     56   def R=basering;
     57
     58   if((homog(i)==1)||(ordstr(basering)[1]=="d"))
     59   {
     60      if ((size(#)!=0)&&(homog(i)==1))
     61      {
     62         return(std(i,#[1]));
     63      }
     64
     65      return(std(i));
     66   }
     67 
     68   execute "ring S = ("+charstr(R)+"),("+varstr(R)+",@t),dp;";
     69   ideal i=homog(imap(R,i),@t);
     70   intvec v=hilb(std(i),1);
     71   execute "ring T = ("+charstr(R)+"),("+varstr(R)+",@t),("+ordstr(R)+");";
     72   ideal i=fetch(S,i);
     73   ideal a=std(i,v);
     74   setring R;
     75   map phi=T,maxideal(1),1;
     76   ideal a=phi(a);
     77
     78   int k,j;
     79   poly m;
     80   int c=size(i);
     81
     82   for(j=1;j<c;j++)
     83   {
     84     if(deg(a[j])==0)
     85     {
     86       a=ideal(1);
     87       return(a);
     88     }
     89     if(deg(a[j])>0)
     90     {
     91       m=lead(a[j]);
     92       for(k=j+1;k<=c;k++)
     93       {
     94          if(size(lead(a[k])/m)>0)
     95          {
     96            a[k]=0;
     97          }
     98       }
     99     }
     100   }
     101   return(simplify(a,2));   
     102}
     103example
     104{ "EXAMPLE:"; echo = 2;
     105   ring r=0,(x,y,z), lp; ideal i=y3+x2, x2y+x2, x3-x2, z4-x2-y;
     106   ideal is=stdhilbert(i); is;
     107}
     108///////////////////////////////////////////////////////////////////////////////
     109
Note: See TracChangeset for help on using the changeset viewer.