Changeset 3c13f6 in git
- Timestamp:
- Dec 7, 2000, 3:29:52 PM (23 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- 7e5a38066ae0e56f9dc4a8093e8300f9ea748f7f
- Parents:
- 0cc028e315fea401732a82d9424c27a008320402
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/spcurve.lib
r0cc028 r3c13f6 1 // $Id: spcurve.lib,v 1. 9 2000-05-12 12:17:18 krueger Exp $1 // $Id: spcurve.lib,v 1.10 2000-12-07 14:29:52 Singular Exp $ 2 2 // (anne, last modified 31.5.99) 3 3 ///////////////////////////////////////////////////////////////////////////// 4 4 5 version="$Id: spcurve.lib,v 1. 9 2000-05-12 12:17:18 krueger Exp $";5 version="$Id: spcurve.lib,v 1.10 2000-12-07 14:29:52 Singular Exp $"; 6 6 info=" 7 LIBRARY: 8 AUTHOR: 7 LIBRARY: spcurve.lib PROCEDURES FOR CM CODIMENSION 2 SINGULARITIES 8 AUTHOR: Anne Fruehbis-Krueger, anne@mathematik.uni-kl.de 9 9 last modified: 31.5.99 10 SEE ALSO: sing_lib, deform_lib 11 12 PROCEDURES: 10 13 11 isCMcod2(i); presentation matrix of the ideal i, if i is CM 14 12 CMtype(i); Cohen-Macaulay type of the ideal i … … 32 30 33 31 proc isCMcod2(ideal kurve) 34 "USAGE: @code{isCMcod2(i)}; @code{i} ideal 35 RETURN: presentation matrix of @code{i}, if @code{i} is Cohen-Macaulay of codimension 2 36 @* a zero matrix otherwise 37 EXAMPLE: @code{example isCMcod2}; shows an example 38 " 32 "USAGE: isCMcod2(i); i an ideal 33 RETURN: presentation matrix of i, if i is Cohen-Macaulay of codimension2 34 a zero matrix otherwise 35 EXAMPLE: example isCMcod2; shows an example" 39 36 { 40 37 int p = printlevel-voice+3; // p=printlevel+1 (default: p=1) … … 64 61 65 62 proc CMtype(ideal kurve) 66 "USAGE: @code{CMtype(i)}; @code{i} ideal, CM of codimension 2 67 RETURN: Cohen-Macaulay type of @code{i} (integer) 68 @*(-1, if i is not Cohen-Macaulay of codimension 2) 69 EXAMPLE: @code{example CMtype}; shows an example 70 " 63 "USAGE: CMtype(i); i an ideal, CM of codimension 2 64 RETURN: Cohen-Macaulay type of i (integer) 65 (-1, if i is not Cohen-Macaulay of codimension 2) 66 EXAMPLE: example CMtype; shows an example" 71 67 { 72 68 int p = printlevel-voice+3; // p=printlevel+1 (default: p=1) … … 101 97 102 98 proc matrixT1(matrix M ,int n) 103 "USAGE: @code{matrixT1(M,n)}; @code{M} matrix, @code{n}integer104 ASSUME: @code{M}is a presentation matrix of an ideal i, CM of codimension 2;105 @* consider i as a family of ideals in a ring in the first @code{n}99 "USAGE: matrixT1(M,n); M matrix, n integer 100 ASSUME: M is a presentation matrix of an ideal i, CM of codimension 2; 101 consider i as a family of ideals in a ring in the first n 106 102 variables where the remaining variables are considered as 107 103 parameters 108 RETURN: list consisting of the k x (k+1) matrix @code{M} and a 109 module @math{K_M} such that @math{T1=Mat(k,k+1;R)/K_M} is the space 110 of first order deformations of i 111 EXAMPLE: @code{example matrixT1}; shows an example 112 " 104 RETURN: list consisting of the k x (k+1) matrix M and a module K_M such that 105 T1=Mat(k,k+1;R)/K_M is the space of first order deformations of i 106 EXAMPLE: example matrixT1; shows an example" 113 107 { 114 108 int p = printlevel-voice+3; // p=printlevel+1 (default: p=1) … … 121 115 { 122 116 M=transpose(M); 123 temp=nc;117 int temp=nc; 124 118 nc=nr; 125 119 nr=temp; 126 tra=1;120 int tra=1; 127 121 } 128 122 if ( nr != (nc+1) ) 129 123 { 130 dbprint(p,"//not a k x (k+1) matrix"); 131 return("ERROR"); 124 ERROR("not a k x (k+1) matrix"); 132 125 } 133 126 //--------------------------------------------------------------------------- … … 187 180 example 188 181 { "EXAMPLE:"; echo = 2; 189 ring r=32003,(x(1),x(2),x(3)),d p;182 ring r=32003,(x(1),x(2),x(3)),ds; 190 183 ideal curve=x(1)*x(2),x(1)*x(3),x(2)*x(3); 191 184 matrix M=isCMcod2(curve); … … 195 188 196 189 proc semiCMcod2(matrix M, module t1) 197 "USAGE: @code{semiCMcod2(M,t1)}; @code{M} matrix, @code{t1} module 198 ASSUME: @code{M} is a presentation matrix of an ideal i, CM of codimension 2, 199 and @code{t1} is a presentation of the space of first order 200 deformations of i (@code{(M,t1)} as returned by the procedure 201 @code{matrixT1}) 190 "USAGE: semiCMcod2(M,t1); M matrix, t1 module 191 ASSUME: M is a presentation matrix of an ideal i, CM of codimension 2, 192 and t1 is a presentation of the space of first order deformations 193 of i ((M,t1) as returned by the procedure matrixT1) 202 194 CREATE: new basering with name rneu 203 195 RETURN: ideal in rneu describing the semiuniversal deformation of i 204 196 NOTE: The current basering should not contain any variables named 205 197 A(j) where j is some integer! 206 EXAMPLE: @code{example semiCMcod2}; shows an example 207 " 198 EXAMPLE: example semiCMcod2; shows an example" 208 199 { 209 200 int p = printlevel-voice+3; // p=printlevel+1 (default: p=1) … … 232 223 if (jj==-1) 233 224 { 234 "Your ring contains a variable T(i)!"; 235 return("ERROR"); 225 ERROR("Your ring contains a variable T(i)!"); 236 226 } 237 227 } … … 267 257 example 268 258 { "EXAMPLE:"; echo=2; 269 ring r=32003,(x(1),x(2),x(3)),d p;259 ring r=32003,(x(1),x(2),x(3)),ds; 270 260 ideal curve=x(1)*x(2),x(1)*x(3),x(2)*x(3); 271 261 matrix M=isCMcod2(curve); … … 276 266 277 267 proc discr(ideal kurve, int n) 278 "USAGE: @code{discr(sem,n)}; @code{sem} ideal, @code{n}integer279 ASSUME: @code{sem}is the versal deformation of an ideal of codimension 2280 @*the first n variables of the ring are treated as variables268 "USAGE: discr(sem,n); sem ideal, n integer 269 ASSUME: sem is the versal deformation of an ideal of codimension 2 270 the first n variables of the ring are treated as variables 281 271 all the others as parameters 282 272 RETURN: ideal describing the discriminant 283 273 NOTE: This is not a powerful algorithm! 284 EXAMPLE: @code{example discr}; shows an example 285 " 274 EXAMPLE: example discr; shows an example" 286 275 { 287 276 int p = printlevel-voice+3; // p=printlevel+1 (default: p=1) … … 320 309 example 321 310 { "EXAMPLE:"; echo=2; 322 ring r=32003,(x(1),x(2),x(3)),d p;311 ring r=32003,(x(1),x(2),x(3)),ds; 323 312 ideal curve=x(1)*x(2),x(1)*x(3),x(2)*x(3); 324 313 matrix M=isCMcod2(curve); … … 331 320 332 321 proc qhmatrix(matrix M) 333 "USAGE: @code{qhmatrix(M)}; @code{M}a k x (k+1) matrix322 "USAGE: qhmatrix(M); M a k x (k+1) matrix 334 323 RETURN: list, consisting of an integer vector containing the weights of 335 324 the variables of the basering and an integer matrix giving the 336 weights of the entries of @code{M}, if @code{M}is quasihomogeneous;337 @*zero integer vector and zero integer matrix, if @code{M}is not325 weights of the entries of M, if M is quasihomogeneous; 326 zero integer vector and zero integer matrix, if M is not 338 327 quasihomogeneous, i.e. does not allow row and column weights 339 EXAMPLE: @code{example qhmatrix}; shows an example 340 " 328 EXAMPLE: example qhmatrix; shows an example" 341 329 { 342 330 int p = printlevel-voice+3; // p=printlevel+1 (default: p=1) … … 359 347 if ( nc != (nr+1) ) 360 348 { 361 dbprint(p,"//not a k x (k+1) matrix"); 362 return("ERROR"); 349 ERROR("not a k x (k+1) matrix"); 363 350 } 364 351 ideal m=minor(M,nr); … … 512 499 513 500 proc relweight(matrix N, intmat W, intvec a) 514 "USAGE: @code{relweight(N,W,a)}; @code{N} matrix, @code{W} intmat, @code{a} intvec 515 ASSUME: @code{N} is a non-zero matrix 516 @* @code{W} is an integer matrix of the same size as @code{N} 517 @* @code{a} is an integer vector giving the weights of the variables 518 RETURN: integer, @math{max(a-weighted order(N_ij) - W_ij | all entries ij)} 519 @* string \"ERROR\" if sizes do not match 520 EXAMPLE: @code{example relweight}; shows an example 521 " 501 "USAGE: relweight(N,W,a); N matrix, W intmat, a intvec 502 ASSUME: N is a non-zero matrix 503 W is an integer matrix of the same size as N 504 a is an integer vector giving the weights of the variables 505 RETURN: integer, max(a-weighted order(N_ij) - W_ij | all entries ij) 506 string "ERROR" if sizes do not match 507 EXAMPLE: example relweight; shows an example" 522 508 { 523 509 int p = printlevel-voice+3; // p=printlevel+1 (default: p=1) … … 527 513 if ((size(N)!=size(W)) || (ncols(N)!=ncols(W))) 528 514 { 529 dbprint(p,"//matrix size does not match"); 530 return("ERROR"); 515 ERROR("matrix size does not match"); 531 516 } 532 517 if (size(a)!=nvars(basering)) 533 518 { 534 dbprint(p,"//length of weight vector != number of variables"); 535 return("ERROR"); 519 ERROR("length of weight vector != number of variables"); 536 520 } 537 521 int i,j,temp; … … 574 558 575 559 proc posweight(matrix M, module t1, int choose, list #) 576 "USAGE: @code{posweight(M,t1,n[,s])}; @code{M} matrix, @code{t1} module, @code{n} int, @code{s}string577 @*@code{n}=0 : all deformations of non-negative weight578 @*@code{n}=1 : only non-constant deformations of non-negative weight579 @*@code{n}=2 : all deformations of positive weight580 @*As an optional parameter the name of a new ring may be560 "USAGE: posweight(M,t1,n[,s]); M matrix, t1 module, n int, s string 561 n=0 : all deformations of non-negative weight 562 n=1 : only non-constant deformations of non-negative weight 563 n=2 : all deformations of positive weight 564 As an optional parameter the name of a new ring may be 581 565 specified. 582 ASSUME: @code{M} is a presentation matrix of a Cohen-Macaulay codimension 2 583 ideal and @code{t1} is a presentation of its T1 space in matrix 584 notation 566 ASSUME: M is a presentation matrix of a Cohen-Macaulay codimension 2 567 ideal and t1 is its T1 space in matrix notation 585 568 CREATE: new basering (default name: rneu); a different name for this ring 586 569 may be given as a 4th parameter … … 590 573 NOTE: The current basering should not contain any variables named 591 574 T(i) where i is some integer! 592 EXAMPLE: @code{example posweight}; shows an example 593 " 575 EXAMPLE: example posweight; shows an example" 594 576 { 595 577 //--------------------------------------------------------------------------- … … 625 607 if (jj==-1) 626 608 { 627 "Your ring contains a variable T(i)!"; 628 return("ERROR"); 609 ERROR("Your ring contains a variable T(i)!"); 629 610 } 630 611 } … … 642 623 if ((size(l[1])==1) && (l[1][1]==0) && (size(l[2])==1) && (l[2][1,1]==0)) 643 624 { 644 return("ERROR");625 ERROR("Internal Error: Problem determining the weights."); 645 626 } 646 627 //--------------------------------------------------------------------------- … … 667 648 else 668 649 { 669 return("ERROR");650 ERROR("Internal Error: Problem determining relative weight."); 670 651 } 671 652 } … … 675 656 if(size(rlw)==0) 676 657 { 677 return("ERROR");658 ERROR("Internal Error: Problem determining relative weight."); 678 659 } 679 660 intvec iv=rlw[1..size(rlw)]; … … 726 707 example 727 708 { "EXAMPLE:"; echo=2; 728 ring r=32003,(x(1),x(2),x(3)),d p;709 ring r=32003,(x(1),x(2),x(3)),ds; 729 710 ideal curve=(x(3)-x(1)^2)*x(3),(x(3)-x(1)^2)*x(2),x(2)^2-x(1)^7*x(3); 730 711 matrix M=isCMcod2(curve); … … 737 718 738 719 proc KSpencerKernel(matrix M,list #) 739 "USAGE: @code{KSpencerKernel(M[,s][,v])}; @code{M} matrix, @code{s} string, @code{v}intvec740 @*optional parameters (please specify in this order, if both are720 "USAGE: KSpencerKernel(M[,s][,v]); M matrix, s string, v intvec 721 optional parameters (please specify in this order, if both are 741 722 present): 742 @* * @code{s}= first of the names of the new rings743 @*e.g. \"R\" leads to ring names R and R1744 @* * @code{v}of size n(n+1) leads to the following module ordering745 @* @code{gen(v[1]) > gen(v[2]) > ... > gen(v[n(n+1)])}746 @* where the matrix entry ij corresponds to @code{gen((i-1)*n+j)}747 ASSUME: @code{M} is a quasihomogeneous n x (n+1) matrix where the n minors748 definean isolated space curve singularity723 * s = first of the names of the new rings 724 e.g. \"R\" leads to ring names R and R1 725 * v of size n(n+1) leads to the following module ordering 726 gen(v[1]) > gen(v[2]) > ... > gen(v[n(n+1)]) 727 where the matrix entry ij corresponds to gen((i-1)*n+j) 728 ASSUME: M is a quasihomogeneous n x (n+1) matrix where the n minors define 729 an isolated space curve singularity 749 730 CREATE: 2 new rings (default names: rneu and reneu) 750 731 different ring names may be specified as a 2nd parameter … … 757 738 * setting an intvec with 5 entries and name watchProgress 758 739 shows the progress of the computations: 759 @*watchProgress[1]>0 => option(prot) in groebner commands760 @*watchProgress[2]>0 => trace output for highcorner761 @*watchProgress[3]>0 => output of deformed matrix762 @*watchProgress[4]>0 => result of elimination step763 @*watchProgress[4]>1 => trace output of multiplications with xyz764 @*and subsequent reductions765 @* watchProgress[5]>0 => matrix representing the kernel using print766 EXAMPLE: @code{example KSpencerKernel}; shows an example 767 "740 watchProgress[1]>0 => option(prot) in groebner commands 741 watchProgress[2]>0 => trace output for highcorner 742 watchProgress[3]>0 => output of deformed matrix 743 watchProgress[4]>0 => result of elimination step 744 watchProgress[4]>1 => trace output of multiplications with xyz 745 and subsequent reductions 746 watchProgress[5]>0 => matrix representing the kernel 747 using print 748 EXAMPLE: example KSpencerKernel; shows an example" 768 749 { 769 750 int p = printlevel-voice+3; // p=printlevel+1 (default: p=1) … … 803 784 if (nvars(basering) != 3 ) 804 785 { 805 "It should be a curve in 3 space"; 806 return("ERROR"); 786 ERROR("It should be a curve in 3 space"); 807 787 } 808 788 //--------------------------------------------------------------------------- … … 813 793 if ((size(wl)!=2) || ((wl[1]==0) && (wl[2]==0))) 814 794 { 815 "The matrix was not n x (n+1) or not quasihomogenous"; 816 return("ERROR"); 795 ERROR("The matrix was not n x (n+1) or not quasihomogenous"); 817 796 } 818 797 string ringre=" ring r=" + charstr(rt) + ",(x,y,z), Ws(" + string(wl[1]) + ");"; … … 835 814 if (dim(std(l[2])) != 0) 836 815 { 837 "The matrix does not define an isolated space curve singularity"; 838 return("ERROR"); 816 ERROR("The matrix does not define an isolated space curve singularity"); 839 817 } 840 818 module t1qh=l[2]; … … 854 832 if (jj==-1) 855 833 { 856 "Your ring contains a variable e(" +string(i)+")!"; 857 return("ERROR"); 834 ERROR("Your ring contains a variable e(i)!"); 858 835 } 859 836 if(defined(desiredorder)>1) … … 933 910 if (size(li)<=1) 934 911 { 935 return("ERROR");912 ERROR("Internal Error: Problem determining perturbations of weight > 0.") 936 913 } 937 914 if (defined(watchProgress)) … … 1113 1090 1114 1091 proc mod2id(matrix M,intvec vpos) 1115 "USAGE: @code{mod2id(M,vpos)}; @code{M} matrix, @code{vpos}intvec1116 ASSUME: @code{vpos} is an integer vector such that @code{gen(i)}corresponds1117 to @code{var(vpos[i])}1118 @*the basering contains variables @code{var(vpos[i])} which do not1119 occur in @code{M}1092 "USAGE: mod2id(M,vpos); M matrix, vpos intvec 1093 ASSUME: vpos is an integer vector such that gen(i) corresponds 1094 to var(vpos[i]) 1095 the basering contains variables var(vpos[i]) which do not occur 1096 in M 1120 1097 NOTE: this procedure should be used in the following situation: 1121 1098 one wants to pass to a ring with new variables, say e(1),..,e(s), 1122 1099 which correspond to the components gen(1),..,gen(s) of the 1123 module @code{M}such that e(i)*e(j)=0 for all i,j1100 module M such that e(i)*e(j)=0 for all i,j 1124 1101 the new ring should already exist and be the current ring 1125 RETURN: ideal i in which each gen(i) from the module is replaced by 1126 @code{var(vpos[i])} and all monomials @code{var(vpos[i])*var(vpos[j])} 1127 have been added to the generating set of i 1128 EXAMPLE: @code{example mod2id}; shows an example 1129 " 1102 RETURN: ideal i in which each gen(i) from the module is replaced by 1103 var(vpos[i]) and all monomials var(vpos[i])*var(vpos[j]) have 1104 been added to the generating set of i 1105 EXAMPLE: example mod2id; shows an example" 1130 1106 { 1131 1107 int p = printlevel-voice+3; // p=printlevel+1 (default: p=1) … … 1163 1139 1164 1140 proc id2mod(ideal i,intvec vpos) 1165 "USAGE: @code{id2mod(I,vpos)}; @code{I} ideal, @code{vpos}intvec1141 "USAGE: id2mod(I,vpos); I ideal, vpos intvec 1166 1142 NOTE: * use this procedure only makes sense if the ideal contains 1167 all @code{var(vpos[i])*var(vpos[j])}as monomial generators and1143 all var(vpos[i])*var(vpos[j]) as monomial generators and 1168 1144 all other generators are linear combinations of the 1169 @code{var(vpos[i])}over the ring in the other variables1170 @* * this is the inverse procedure to @code{mod2id} and should be1171 applied only to ideals created by @code{mod2id} using the same1172 intvec @code{vpos}(possibly after a standard basis computation)1173 RETURN: module corresponding to the ideal by replacing @code{var(vpos[i])}by1174 gen(i) and omitting all generators @code{var(vpos[i])*var(vpos[j])}1175 EXAMPLE: @code{example id2mod}; shows an example"1145 var(vpos[i]) over the ring in the other variables 1146 * this is the inverse procedure to mod2id and should be applied 1147 only to ideals created by mod2id using the same intvec vpos 1148 (possibly after a standard basis computation) 1149 RETURN: module corresponding to the ideal by replacing var(vpos[i]) by 1150 gen(i) and omitting all generators var(vpos[i])*var(vpos[j]) 1151 EXAMPLE: example id2mod; shows an example" 1176 1152 { 1177 1153 int p = printlevel-voice+3; // p=printlevel+1 (default: p=1) … … 1208 1184 1209 1185 proc subrInterred(ideal mon, ideal sm, intvec iv) 1210 "USAGE: @code{subrInterred(mon,sm,iv)};1211 @*@code{sm}: ideal in a ring r with n + s variables,1186 "USAGE: subrInterred(mon,sm,iv); 1187 sm: ideal in a ring r with n + s variables, 1212 1188 e.g. x_1,..,x_n and t_1,..,t_s 1213 @*@code{mon}: ideal with monomial generators (not divisible by1189 mon: ideal with monomial generators (not divisible by 1214 1190 one of the t_i) such that sm is contained in the module 1215 @code{k[t_1,..,t_s]*mon[1]+..+k[t_1,..,t_s]*mon[size(mon)]}1216 @*@code{iv}: intvec listing the variables which are supposed to be1217 usedas x_i1191 k[t_1,..,t_s]*mon[1]+..+k[t_1,..,t_s]*mon[size(mon)] 1192 iv: intvec listing the variables which are supposed to be used 1193 as x_i 1218 1194 RETURN: interreduced system of generators of sm seen as a submodule 1219 of @code{k[t_1,..,t_s]*mon[1]+..+k[t_1,..,t_s]*mon[size(mon)]} 1220 EXAMPLE: @code{example subrInterred}; shows an example 1221 " 1195 of k[t_1,..,t_s]*mon[1]+..+k[t_1,..,t_s]*mon[size(mon)] 1196 EXAMPLE: example subrInterred; shows an example" 1222 1197 { 1223 1198 int p = printlevel-voice+3; // p=printlevel+1 (default: p=1) … … 1236 1211 if (err==1) 1237 1212 { 1238 "mon has to be generated by monomials"; 1239 return("ERROR"); 1213 ERROR("mon has to be generated by monomials"); 1240 1214 } 1241 1215 intvec sv=sortvec(mon); … … 1280 1254 if(sm[i]-dummy[i]!=0) 1281 1255 { 1282 "the second argument is not a submodule of the assumed structure"; 1283 return("ERROR"); 1256 ERROR("the second argument is not a submodule of the assumed structure"); 1284 1257 } 1285 1258 } … … 1315 1288 } 1316 1289 //////////////////////////////////////////////////////////////////////// 1317
Note: See TracChangeset
for help on using the changeset viewer.