Changeset bb0968 in git
- Timestamp:
- Aug 1, 1997, 3:42:14 PM (27 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 839b04dc441f2b76e4a2527a0cf7dac720972c8e
- Parents:
- 4d0d2f090f9b04cfdcbdba8a94c80e72307013d3
- 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:46obachman Exp $1 // $Id: standard.lib,v 1.3 1997-08-01 13:42:14 obachman Exp $ 2 2 /////////////////////////////////////////////////////////////////////////////// 3 3 … … 5 5 6 6 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 7 8 /////////////////////////////////////////////////////////////////////////////// 8 9 … … 46 47 } 47 48 /////////////////////////////////////////////////////////////////////////////// 49 50 proc stdhilbert(ideal i,list #) 51 USAGE: stdhilbert(i); i ideal 52 stdhilbert(i,v); i homogeneous ideal, v intvec (the Hilbert function) 53 RETURN: stdhilbert(i); standard basis of i computed using the Hilbert function 54 EXAMPLE: 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 } 103 example 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.