Changeset 648612 in git for Singular/LIB/sing.lib
- Timestamp:
- Sep 12, 1997, 12:29:48 PM (26 years ago)
- Branches:
- (u'spielwiese', 'a719bcf0b8dbc648b128303a49777a094b57592c')
- Children:
- 2a99baf62f13066b86adaabc31f813ac7023eacf
- Parents:
- ed35a2398a135151e52335cee13a845a80620667
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/sing.lib
red35a23 r648612 1 // $Id: sing.lib,v 1. 4 1997-09-12 07:40:37 SingularExp $1 // $Id: sing.lib,v 1.5 1997-09-12 10:29:48 pohl Exp $ 2 2 //system("random",787422842); 3 3 //(GMG/BM, last modified 26.06.96) … … 44 44 EXAMPLE: example codim; shows an example 45 45 { 46 ideal le1, le2; 46 47 intvec iv1, iv2, iv; 47 48 int i, d1, d2, dd, i1, i2, ia, ie; 48 49 //--------------------------- check id2 < id1 ------------------------------- 49 ideal led = lead(id1); 50 attrib(led, "isSB",1); 51 i = size(NF(lead(id2),led)); 50 le1 = lead(id1); 51 if (attrib(id1,"isSB") != 0) 52 { 53 attrib(le1,"isSB",1); 54 } 55 le2 = lead(id2); 56 if (attrib(id2,"isSB") != 0) 57 { 58 attrib(le2,"isSB",1); 59 } 60 i = size(NF(le2,le1)); 52 61 if ( i > 0 ) 53 62 { … … 55 64 } 56 65 //--------------------------- 1. check finiteness --------------------------- 57 i1 = dim( id1);58 i2 = dim( id2);59 if (i1 < 0)60 { 61 if (i2 == 0)66 i1 = dim(le1); 67 i2 = dim(le2); 68 if (i1 <= 0) 69 { 70 if (i2 <= 0) 62 71 { 63 return vdim(id2);72 return(vdim(le2)-vdim(le1)); 64 73 } 65 74 else … … 72 81 return(-1); 73 82 } 74 if ( i2 <= 0)75 { 76 return( vdim(id2)-vdim(id1));83 if (mult(le2) != mult(le1)) 84 { 85 return(-1); 77 86 } 78 87 //--------------------------- module --------------------------------------- 79 d1 = nrows( id1);80 d2 = nrows( id2);88 d1 = nrows(le1); 89 d2 = nrows(le2); 81 90 dd = 0; 82 91 if (d1 > d2) 83 92 { 84 id2=id2,maxideal(1)*gen(d1);93 le2=le2,maxideal(1)*gen(d1); 85 94 dd = -1; 86 95 } 87 96 if (d2 > d1) 88 97 { 89 id1=id1,maxideal(1)*gen(d2);98 le1=le1,maxideal(1)*gen(d2); 90 99 dd = 1; 91 100 } … … 95 104 iv2 = hilb(id2,1); 96 105 i2 = size(iv2); 106 kill le1,le2; 97 107 //--------------------------- difference of hilbertseries ------------------ 98 108 if (i2 > i1)
Note: See TracChangeset
for help on using the changeset viewer.