[380a17b] | 1 | //////////////////////////////////////////////////////////////////////////// |
---|
[3686937] | 2 | version="version sing.lib 4.0.0.0 Jun_2013 "; // $Id$ |
---|
[fd3fb7] | 3 | category="Singularities"; |
---|
[5480da] | 4 | info=" |
---|
[8bb77b] | 5 | LIBRARY: sing.lib Invariants of Singularities |
---|
[80a0f0] | 6 | AUTHORS: Gert-Martin Greuel, email: greuel@mathematik.uni-kl.de @* |
---|
[091424] | 7 | Bernd Martin, email: martin@math.tu-cottbus.de |
---|
[3d124a7] | 8 | |
---|
[f34c37c] | 9 | PROCEDURES: |
---|
[7d56875] | 10 | codim(id1, id2); vector space dimension of id2/id1 if finite |
---|
[3d124a7] | 11 | deform(i); infinitesimal deformations of ideal i |
---|
| 12 | dim_slocus(i); dimension of singular locus of ideal i |
---|
[3754ca] | 13 | is_active(f,id); is polynomial f an active element mod id? (id ideal/module) |
---|
[3d124a7] | 14 | is_ci(i); is ideal i a complete intersection? |
---|
| 15 | is_is(i); is ideal i an isolated singularity? |
---|
[3754ca] | 16 | is_reg(f,id); is polynomial f a regular element mod id? (id ideal/module) |
---|
[3d124a7] | 17 | is_regs(i[,id]); are gen's of ideal i regular sequence modulo id? |
---|
[c69ea5] | 18 | locstd(i); SB for local degree ordering without cancelling units |
---|
[3d124a7] | 19 | milnor(i); milnor number of ideal i; (assume i is ICIS in nf) |
---|
| 20 | nf_icis(i); generic combinations of generators; get ICIS in nf |
---|
| 21 | slocus(i); ideal of singular locus of ideal i |
---|
[cd6dbb2] | 22 | qhspectrum(f,w); spectrum numbers of w-homogeneous polynomial f |
---|
[3d124a7] | 23 | Tjurina(i); SB of Tjurina module of ideal i (assume i is ICIS) |
---|
| 24 | tjurina(i); Tjurina number of ideal i (assume i is ICIS) |
---|
[0b59f5] | 25 | T_1(i); T^1-module of ideal i |
---|
| 26 | T_2((i); T^2-module of ideal i |
---|
| 27 | T_12(i); T^1- and T^2-module of ideal i |
---|
[c69ea5] | 28 | tangentcone(id); compute tangent cone of id |
---|
| 29 | |
---|
[5480da] | 30 | "; |
---|
[3d124a7] | 31 | |
---|
[6f2edc] | 32 | LIB "inout.lib"; |
---|
[3d124a7] | 33 | LIB "random.lib"; |
---|
[c69ea5] | 34 | LIB "primdec.lib"; |
---|
[3d124a7] | 35 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 36 | |
---|
| 37 | proc deform (ideal id) |
---|
[d2b2a7] | 38 | "USAGE: deform(id); id=ideal or poly |
---|
[3d124a7] | 39 | RETURN: matrix, columns are kbase of infinitesimal deformations |
---|
[6f2edc] | 40 | EXAMPLE: example deform; shows an example |
---|
[d2b2a7] | 41 | " |
---|
[6f2edc] | 42 | { |
---|
[0b59f5] | 43 | list L=T_1(id,""); |
---|
[6f2edc] | 44 | def K=L[1]; attrib(K,"isSB",1); |
---|
| 45 | return(L[2]*kbase(K)); |
---|
[3d124a7] | 46 | } |
---|
| 47 | example |
---|
| 48 | { "EXAMPLE:"; echo = 2; |
---|
[6f2edc] | 49 | ring r = 32003,(x,y,z),ds; |
---|
| 50 | ideal i = xy,xz,yz; |
---|
| 51 | matrix T = deform(i); |
---|
| 52 | print(T); |
---|
| 53 | print(deform(x3+y5+z2)); |
---|
[3d124a7] | 54 | } |
---|
| 55 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 56 | |
---|
| 57 | proc dim_slocus (ideal i) |
---|
[d2b2a7] | 58 | "USAGE: dim_slocus(i); i ideal or poly |
---|
[3d124a7] | 59 | RETURN: dimension of singular locus of i |
---|
| 60 | EXAMPLE: example dim_slocus; shows an example |
---|
[d2b2a7] | 61 | " |
---|
[3d124a7] | 62 | { |
---|
| 63 | return(dim(std(slocus(i)))); |
---|
| 64 | } |
---|
| 65 | example |
---|
| 66 | { "EXAMPLE:"; echo = 2; |
---|
[6f2edc] | 67 | ring r = 32003,(x,y,z),ds; |
---|
| 68 | ideal i = x5+y6+z6,x2+2y2+3z2; |
---|
[3d124a7] | 69 | dim_slocus(i); |
---|
| 70 | } |
---|
| 71 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 72 | |
---|
[0463d5c] | 73 | proc is_active (poly f,def id) |
---|
[d2b2a7] | 74 | "USAGE: is_active(f,id); f poly, id ideal or module |
---|
[3d124a7] | 75 | RETURN: 1 if f is an active element modulo id (i.e. dim(id)=dim(id+f*R^n)+1, |
---|
| 76 | if id is a submodule of R^n) resp. 0 if f is not active. |
---|
[6f2edc] | 77 | The basering may be a quotient ring |
---|
[3d124a7] | 78 | NOTE: regular parameters are active but not vice versa (id may have embedded |
---|
| 79 | components). proc is_reg tests whether f is a regular parameter |
---|
| 80 | EXAMPLE: example is_active; shows an example |
---|
[d2b2a7] | 81 | " |
---|
[3d124a7] | 82 | { |
---|
[6f2edc] | 83 | if( size(id)==0 ) { return(1); } |
---|
[3d124a7] | 84 | if( typeof(id)=="ideal" ) { ideal m=f; } |
---|
[6f2edc] | 85 | if( typeof(id)=="module" ) { module m=f*freemodule(nrows(id)); } |
---|
[3d124a7] | 86 | return(dim(std(id))-dim(std(id+m))); |
---|
| 87 | } |
---|
| 88 | example |
---|
| 89 | { "EXAMPLE:"; echo = 2; |
---|
[6f2edc] | 90 | ring r =32003,(x,y,z),ds; |
---|
| 91 | ideal i = yx3+y,yz3+y3z; |
---|
| 92 | poly f = x; |
---|
[3d124a7] | 93 | is_active(f,i); |
---|
[6f2edc] | 94 | qring q = std(x4y5); |
---|
| 95 | poly f = x; |
---|
| 96 | module m = [yx3+x,yx3+y3x]; |
---|
[3d124a7] | 97 | is_active(f,m); |
---|
| 98 | } |
---|
| 99 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 100 | |
---|
| 101 | proc is_ci (ideal i) |
---|
[d2b2a7] | 102 | "USAGE: is_ci(i); i ideal |
---|
[3d124a7] | 103 | RETURN: intvec = sequence of dimensions of ideals (j[1],...,j[k]), for |
---|
[6f2edc] | 104 | k=1,...,size(j), where j is minimal base of i. i is a complete |
---|
| 105 | intersection if last number equals nvars-size(i) |
---|
| 106 | NOTE: dim(0-ideal) = -1. You may first apply simplify(i,10); in order to |
---|
| 107 | delete zeroes and multiples from set of generators |
---|
| 108 | printlevel >=0: display comments (default) |
---|
[3d124a7] | 109 | EXAMPLE: example is_ci; shows an example |
---|
[d2b2a7] | 110 | " |
---|
[3d124a7] | 111 | { |
---|
| 112 | int n; intvec dimvec; ideal id; |
---|
| 113 | i=minbase(i); |
---|
| 114 | int s = ncols(i); |
---|
[6f2edc] | 115 | int p = printlevel-voice+3; // p=printlevel+1 (default: p=1) |
---|
[3d124a7] | 116 | //--------------------------- compute dimensions ------------------------------ |
---|
[6f2edc] | 117 | for( n=1; n<=s; n=n+1 ) |
---|
| 118 | { |
---|
[3d124a7] | 119 | id = i[1..n]; |
---|
| 120 | dimvec[n] = dim(std(id)); |
---|
| 121 | } |
---|
| 122 | n = dimvec[s]; |
---|
[6f2edc] | 123 | //--------------------------- output ------------------------------------------ |
---|
| 124 | if( n+s != nvars(basering) ) |
---|
| 125 | { dbprint(p,"// no complete intersection"); } |
---|
| 126 | if( n+s == nvars(basering) ) |
---|
| 127 | { dbprint(p,"// complete intersection of dim "+string(n)); } |
---|
| 128 | dbprint(p,"// dim-sequence:"); |
---|
[3d124a7] | 129 | return(dimvec); |
---|
| 130 | } |
---|
| 131 | example |
---|
[6f2edc] | 132 | { "EXAMPLE:"; echo = 2; |
---|
| 133 | int p = printlevel; |
---|
| 134 | printlevel = 1; // display comments |
---|
| 135 | ring r = 32003,(x,y,z),ds; |
---|
| 136 | ideal i = x4+y5+z6,xyz,yx2+xz2+zy7; |
---|
| 137 | is_ci(i); |
---|
| 138 | i = xy,yz; |
---|
[3d124a7] | 139 | is_ci(i); |
---|
[6f2edc] | 140 | printlevel = p; |
---|
[3d124a7] | 141 | } |
---|
| 142 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 143 | |
---|
| 144 | proc is_is (ideal i) |
---|
[d2b2a7] | 145 | "USAGE: is_is(id); id ideal or poly |
---|
[3d124a7] | 146 | RETURN: intvec = sequence of dimensions of singular loci of ideals |
---|
[80a0f0] | 147 | generated by id[1]..id[i], k = 1..size(id); @* |
---|
| 148 | dim(0-ideal) = -1; |
---|
[3d124a7] | 149 | id defines an isolated singularity if last number is 0 |
---|
[6f2edc] | 150 | NOTE: printlevel >=0: display comments (default) |
---|
[3d124a7] | 151 | EXAMPLE: example is_is; shows an example |
---|
[d2b2a7] | 152 | " |
---|
[3d124a7] | 153 | { |
---|
| 154 | int l; intvec dims; ideal j; |
---|
[6f2edc] | 155 | int p = printlevel-voice+3; // p=printlevel+1 (default: p=1) |
---|
[3d124a7] | 156 | //--------------------------- compute dimensions ------------------------------ |
---|
[6f2edc] | 157 | for( l=1; l<=ncols(i); l=l+1 ) |
---|
[3d124a7] | 158 | { |
---|
[6f2edc] | 159 | j = i[1..l]; |
---|
[3d124a7] | 160 | dims[l] = dim(std(slocus(j))); |
---|
| 161 | } |
---|
[6f2edc] | 162 | dbprint(p,"// dim of singular locus = "+string(dims[size(dims)]), |
---|
| 163 | "// isolated singularity if last number is 0 in dim-sequence:"); |
---|
[3d124a7] | 164 | return(dims); |
---|
| 165 | } |
---|
| 166 | example |
---|
| 167 | { "EXAMPLE:"; echo = 2; |
---|
[6f2edc] | 168 | int p = printlevel; |
---|
| 169 | printlevel = 1; |
---|
| 170 | ring r = 32003,(x,y,z),ds; |
---|
| 171 | ideal i = x2y,x4+y5+z6,yx2+xz2+zy7; |
---|
[3d124a7] | 172 | is_is(i); |
---|
[6f2edc] | 173 | poly f = xy+yz; |
---|
[3d124a7] | 174 | is_is(f); |
---|
[6f2edc] | 175 | printlevel = p; |
---|
[3d124a7] | 176 | } |
---|
| 177 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 178 | |
---|
[0463d5c] | 179 | proc is_reg (poly f,def id) |
---|
[d2b2a7] | 180 | "USAGE: is_reg(f,id); f poly, id ideal or module |
---|
[3d124a7] | 181 | RETURN: 1 if multiplication with f is injective modulo id, 0 otherwise |
---|
[fd5013] | 182 | NOTE: Let R be the basering and id a submodule of R^n. The procedure checks |
---|
[3d124a7] | 183 | injectivity of multiplication with f on R^n/id. The basering may be a |
---|
[fd5013] | 184 | quotient ring. |
---|
[3d124a7] | 185 | EXAMPLE: example is_reg; shows an example |
---|
[d2b2a7] | 186 | " |
---|
[3d124a7] | 187 | { |
---|
| 188 | if( f==0 ) { return(0); } |
---|
| 189 | int d,ii; |
---|
| 190 | def q = quotient(id,ideal(f)); |
---|
| 191 | id=std(id); |
---|
| 192 | d=size(q); |
---|
[6f2edc] | 193 | for( ii=1; ii<=d; ii=ii+1 ) |
---|
[3d124a7] | 194 | { |
---|
| 195 | if( reduce(q[ii],id)!=0 ) |
---|
| 196 | { return(0); } |
---|
| 197 | } |
---|
| 198 | return(1); |
---|
| 199 | } |
---|
[6f2edc] | 200 | example |
---|
[3d124a7] | 201 | { "EXAMPLE:"; echo = 2; |
---|
[6f2edc] | 202 | ring r = 32003,(x,y),ds; |
---|
| 203 | ideal i = x8,y8; |
---|
| 204 | ideal j = (x+y)^4; |
---|
| 205 | i = intersect(i,j); |
---|
| 206 | poly f = xy; |
---|
[3d124a7] | 207 | is_reg(f,i); |
---|
| 208 | } |
---|
| 209 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 210 | |
---|
| 211 | proc is_regs (ideal i, list #) |
---|
[d2b2a7] | 212 | "USAGE: is_regs(i[,id]); i poly, id ideal or module (default: id=0) |
---|
[3d124a7] | 213 | RETURN: 1 if generators of i are a regular sequence modulo id, 0 otherwise |
---|
[fd5013] | 214 | NOTE: Let R be the basering and id a submodule of R^n. The procedure checks |
---|
[3d124a7] | 215 | injectivity of multiplication with i[k] on R^n/id+i[1..k-1]. |
---|
[fd5013] | 216 | The basering may be a quotient ring. |
---|
[6f2edc] | 217 | printlevel >=0: display comments (default) |
---|
| 218 | printlevel >=1: display comments during computation |
---|
[3d124a7] | 219 | EXAMPLE: example is_regs; shows an example |
---|
[d2b2a7] | 220 | " |
---|
[3d124a7] | 221 | { |
---|
[6f2edc] | 222 | int d,ii,r; |
---|
| 223 | int p = printlevel-voice+3; // p=printlevel+1 (default: p=1) |
---|
[3d124a7] | 224 | if( size(#)==0 ) { ideal id; } |
---|
| 225 | else { def id=#[1]; } |
---|
| 226 | if( size(i)==0 ) { return(0); } |
---|
[6f2edc] | 227 | d=size(i); |
---|
[3d124a7] | 228 | if( typeof(id)=="ideal" ) { ideal m=1; } |
---|
[6f2edc] | 229 | if( typeof(id)=="module" ) { module m=freemodule(nrows(id)); } |
---|
| 230 | for( ii=1; ii<=d; ii=ii+1 ) |
---|
| 231 | { |
---|
| 232 | if( p>=2 ) |
---|
[3d124a7] | 233 | { "// checking whether element",ii,"is regular mod 1 ..",ii-1; } |
---|
[6f2edc] | 234 | if( is_reg(i[ii],id)==0 ) |
---|
| 235 | { |
---|
| 236 | dbprint(p,"// elements 1.."+string(ii-1)+" are regular, " + |
---|
| 237 | string(ii)+" is not regular mod 1.."+string(ii-1)); |
---|
| 238 | return(0); |
---|
[3d124a7] | 239 | } |
---|
[6f2edc] | 240 | id=id+i[ii]*m; |
---|
[3d124a7] | 241 | } |
---|
[6f2edc] | 242 | if( p>=1 ) { "// elements are a regular sequence of length",d; } |
---|
[3d124a7] | 243 | return(1); |
---|
| 244 | } |
---|
[6f2edc] | 245 | example |
---|
[3d124a7] | 246 | { "EXAMPLE:"; echo = 2; |
---|
[6f2edc] | 247 | int p = printlevel; |
---|
| 248 | printlevel = 1; |
---|
| 249 | ring r1 = 32003,(x,y,z),ds; |
---|
| 250 | ideal i = x8,y8,(x+y)^4; |
---|
[3d124a7] | 251 | is_regs(i); |
---|
[6f2edc] | 252 | module m = [x,0,y]; |
---|
| 253 | i = x8,(x+z)^4;; |
---|
[3d124a7] | 254 | is_regs(i,m); |
---|
[6f2edc] | 255 | printlevel = p; |
---|
[3d124a7] | 256 | } |
---|
| 257 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 258 | |
---|
| 259 | proc milnor (ideal i) |
---|
[d2b2a7] | 260 | "USAGE: milnor(i); i ideal or poly |
---|
[3d124a7] | 261 | RETURN: Milnor number of i, if i is ICIS (isolated complete intersection |
---|
[6f2edc] | 262 | singularity) in generic form, resp. -1 if not |
---|
[3d124a7] | 263 | NOTE: use proc nf_icis to put generators in generic form |
---|
[a2c96e] | 264 | printlevel >=1: display comments |
---|
[3d124a7] | 265 | EXAMPLE: example milnor; shows an example |
---|
[d2b2a7] | 266 | " |
---|
[6f2edc] | 267 | { |
---|
| 268 | i = simplify(i,10); //delete zeroes and multiples from set of generators |
---|
[3d124a7] | 269 | int n = size(i); |
---|
| 270 | int l,q,m_nr; ideal t; intvec disc; |
---|
[a2c96e] | 271 | int p = printlevel-voice+2; // p=printlevel+1 (default: p=0) |
---|
[6f2edc] | 272 | //---------------------------- hypersurface case ------------------------------ |
---|
[457d505] | 273 | if( n==1 or i==0 ) |
---|
[3d124a7] | 274 | { |
---|
| 275 | i = std(jacob(i[1])); |
---|
[6f2edc] | 276 | m_nr = vdim(i); |
---|
[a2c96e] | 277 | if( m_nr<0 and p>=1 ) { "// Milnor number is infinite"; } |
---|
[6f2edc] | 278 | return(m_nr); |
---|
[3d124a7] | 279 | } |
---|
| 280 | //------------ isolated complete intersection singularity (ICIS) -------------- |
---|
| 281 | for( l=n; l>0; l=l-1) |
---|
[6f2edc] | 282 | { t = minor(jacob(i),l); |
---|
| 283 | i[l] = 0; |
---|
[3d124a7] | 284 | q = vdim(std(i+t)); |
---|
| 285 | disc[l]= q; |
---|
| 286 | if( q ==-1 ) |
---|
[6f2edc] | 287 | { if( p>=1 ) |
---|
[3d124a7] | 288 | { "// not in generic form or no ICIS; use proc nf_icis to put"; |
---|
[6f2edc] | 289 | "// generators in generic form and then try milnor again!"; } |
---|
[3d124a7] | 290 | return(q); |
---|
| 291 | } |
---|
[6f2edc] | 292 | m_nr = q-m_nr; |
---|
[3d124a7] | 293 | } |
---|
[6f2edc] | 294 | //---------------------------- change sign ------------------------------------ |
---|
| 295 | if (m_nr < 0) { m_nr=-m_nr; } |
---|
| 296 | if( p>=1 ) { "//sequence of discriminant numbers:",disc; } |
---|
[3d124a7] | 297 | return(m_nr); |
---|
| 298 | } |
---|
| 299 | example |
---|
| 300 | { "EXAMPLE:"; echo = 2; |
---|
[6f2edc] | 301 | int p = printlevel; |
---|
[a2c96e] | 302 | printlevel = 2; |
---|
[6f2edc] | 303 | ring r = 32003,(x,y,z),ds; |
---|
| 304 | ideal j = x5+y6+z6,x2+2y2+3z2,xyz+yx; |
---|
[3d124a7] | 305 | milnor(j); |
---|
[6f2edc] | 306 | poly f = x7+y7+(x-y)^2*x2y2+z2; |
---|
| 307 | milnor(f); |
---|
| 308 | printlevel = p; |
---|
[3d124a7] | 309 | } |
---|
| 310 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 311 | |
---|
| 312 | proc nf_icis (ideal i) |
---|
[d2b2a7] | 313 | "USAGE: nf_icis(i); i ideal |
---|
[3d124a7] | 314 | RETURN: ideal = generic linear combination of generators of i if i is an ICIS |
---|
| 315 | (isolated complete intersection singularity), return i if not |
---|
| 316 | NOTE: this proc is useful in connection with proc milnor |
---|
[6f2edc] | 317 | printlevel >=0: display comments (default) |
---|
[3d124a7] | 318 | EXAMPLE: example nf_icis; shows an example |
---|
[d2b2a7] | 319 | " |
---|
[3d124a7] | 320 | { |
---|
| 321 | i = simplify(i,10); //delete zeroes and multiples from set of generators |
---|
[6f2edc] | 322 | int p,b = 100,0; |
---|
[3d124a7] | 323 | int n = size(i); |
---|
| 324 | matrix mat=freemodule(n); |
---|
[6f2edc] | 325 | int P = printlevel-voice+3; // P=printlevel+1 (default: P=1) |
---|
| 326 | //---------------------------- test: complete intersection? ------------------- |
---|
[3d124a7] | 327 | intvec sl = is_ci(i); |
---|
[6f2edc] | 328 | if( n+sl[n] != nvars(basering) ) |
---|
| 329 | { |
---|
| 330 | dbprint(P,"// no complete intersection"); |
---|
| 331 | return(i); |
---|
[3d124a7] | 332 | } |
---|
[6f2edc] | 333 | //--------------- test: isolated singularity in generic form? ----------------- |
---|
[3d124a7] | 334 | sl = is_is(i); |
---|
| 335 | if ( sl[n] != 0 ) |
---|
| 336 | { |
---|
[6f2edc] | 337 | dbprint(P,"// no isolated singularity"); |
---|
[3d124a7] | 338 | return(i); |
---|
| 339 | } |
---|
[6f2edc] | 340 | //------------ produce generic linear combinations of generators -------------- |
---|
[3d124a7] | 341 | int prob; |
---|
[6f2edc] | 342 | while ( sum(sl) != 0 ) |
---|
[3d124a7] | 343 | { prob=prob+1; |
---|
[6f2edc] | 344 | p=p-25; b=b+10; |
---|
[3d124a7] | 345 | i = genericid(i,p,b); // proc genericid from random.lib |
---|
| 346 | sl = is_is(i); |
---|
| 347 | } |
---|
[6f2edc] | 348 | dbprint(P,"// ICIS in generic form after "+string(prob)+" genericity loop(s)"); |
---|
| 349 | return(i); |
---|
[3d124a7] | 350 | } |
---|
| 351 | example |
---|
| 352 | { "EXAMPLE:"; echo = 2; |
---|
[6f2edc] | 353 | int p = printlevel; |
---|
| 354 | printlevel = 1; |
---|
| 355 | ring r = 32003,(x,y,z),ds; |
---|
| 356 | ideal i = x3+y4,z4+yx; |
---|
| 357 | nf_icis(i); |
---|
| 358 | ideal j = x3+y4,xy,yz; |
---|
[3d124a7] | 359 | nf_icis(j); |
---|
[6f2edc] | 360 | printlevel = p; |
---|
[3d124a7] | 361 | } |
---|
| 362 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 363 | |
---|
| 364 | proc slocus (ideal i) |
---|
[9f9f2c] | 365 | "USAGE: slocus(i); i ideal |
---|
[3c4dcc] | 366 | RETURN: ideal of singular locus of i |
---|
[c69ea5] | 367 | EXAMPLE: example slocus; shows an example |
---|
| 368 | " |
---|
| 369 | { |
---|
| 370 | def R=basering; |
---|
| 371 | int j,k; |
---|
| 372 | ideal res; |
---|
| 373 | |
---|
| 374 | if(ord_test(basering)!=1) |
---|
| 375 | { |
---|
| 376 | string va=varstr(basering); |
---|
| 377 | if( size( parstr(basering))>0){va=va+","+parstr(basering);} |
---|
| 378 | execute ("ring S = ("+charstr(basering)+"),("+va+"),dp;"); |
---|
| 379 | ideal i=imap(R,i); |
---|
| 380 | list l=equidim(i); |
---|
| 381 | setring R; |
---|
| 382 | list l=imap(S,l); |
---|
| 383 | } |
---|
| 384 | else |
---|
| 385 | { |
---|
| 386 | list l=equidim(i); |
---|
| 387 | } |
---|
| 388 | int n=size(l); |
---|
| 389 | if (n==1){return(slocusEqi(i));} |
---|
| 390 | res=slocusEqi(l[1]); |
---|
| 391 | for(j=2;j<=n;j++){res=intersect(res,slocusEqi(l[j]));} |
---|
| 392 | for(j=1;j<n;j++) |
---|
| 393 | { |
---|
| 394 | for(k=j+1;k<=n;k++){res=intersect(res,l[j]+l[k]);} |
---|
| 395 | } |
---|
| 396 | return(res); |
---|
| 397 | } |
---|
| 398 | example |
---|
| 399 | { "EXAMPLE:"; echo = 2; |
---|
| 400 | ring r = 0,(u,v,w,x,y,z),dp; |
---|
| 401 | ideal i = wx,wy,wz,vx,vy,vz,ux,uy,uz,y3-x2;; |
---|
| 402 | slocus(i); |
---|
| 403 | } |
---|
| 404 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 405 | |
---|
| 406 | static proc slocusEqi (ideal i) |
---|
| 407 | "USAGE: slocus(i); i ideal |
---|
[9f9f2c] | 408 | RETURN: ideal of singular locus of i if i is pure dimensional |
---|
| 409 | NOTE: this proc returns i and c-minors of jacobian ideal of i where c is the |
---|
[b9b906] | 410 | codimension of i. Hence, if i is not pure dimensional, slocus may |
---|
| 411 | return an ideal such that its 0-locus is strictly contained in the |
---|
[9f9f2c] | 412 | singular locus of i |
---|
[3d124a7] | 413 | EXAMPLE: example slocus; shows an example |
---|
[d2b2a7] | 414 | " |
---|
[3d124a7] | 415 | { |
---|
[c69ea5] | 416 | ideal ist=std(i); |
---|
| 417 | if(deg(ist[1])==0){return(ist);} |
---|
| 418 | int cod = nvars(basering)-dim(ist); |
---|
[3d124a7] | 419 | i = i+minor(jacob(i),cod); |
---|
[6f2edc] | 420 | return(i); |
---|
[3d124a7] | 421 | } |
---|
| 422 | example |
---|
| 423 | { "EXAMPLE:"; echo = 2; |
---|
[9f9f2c] | 424 | ring r = 0,(x,y,z),ds; |
---|
[6f2edc] | 425 | ideal i = x5+y6+z6,x2+2y2+3z2; |
---|
[9f9f2c] | 426 | slocus(i); |
---|
[3d124a7] | 427 | } |
---|
| 428 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 429 | |
---|
[cd6dbb2] | 430 | proc qhspectrum (poly f, intvec w) |
---|
[fd5013] | 431 | "USAGE: qhspectrum(f,w); f=poly, w=intvec |
---|
[0fbdd1] | 432 | ASSUME: f is a weighted homogeneous isolated singularity w.r.t. the weights |
---|
| 433 | given by w; w must consist of as many positive integers as there |
---|
| 434 | are variables of the basering |
---|
| 435 | COMPUTE: the spectral numbers of the w-homogeneous polynomial f, computed in a |
---|
[80a0f0] | 436 | ring of characteristic 0 |
---|
[82716e] | 437 | RETURN: intvec d,s1,...,su where: |
---|
[c69ea5] | 438 | d = w-degree(f) and si/d = i-th spectral-number(f) |
---|
[82716e] | 439 | No return value if basering has parameters or if f is no isolated |
---|
[fd5013] | 440 | singularity, displays a warning in this case. |
---|
[cd6dbb2] | 441 | EXAMPLE: example qhspectrum; shows an example |
---|
[d2b2a7] | 442 | " |
---|
[0fbdd1] | 443 | { |
---|
| 444 | int i,d,W; |
---|
| 445 | intvec sp; |
---|
| 446 | def r = basering; |
---|
| 447 | if( find(charstr(r),",")!=0 ) |
---|
| 448 | { |
---|
| 449 | "// coefficient field must not have parameters!"; |
---|
| 450 | return(); |
---|
| 451 | } |
---|
| 452 | ring s = 0,x(1..nvars(r)),ws(w); |
---|
| 453 | map phi = r,maxideal(1); |
---|
| 454 | poly f = phi(f); |
---|
| 455 | d = ord(f); |
---|
| 456 | W = sum(w)-d; |
---|
| 457 | ideal k = std(jacob(f)); |
---|
| 458 | if( vdim(k) == -1 ) |
---|
| 459 | { |
---|
| 460 | "// f is no isolated singuarity!"; |
---|
| 461 | return(); |
---|
| 462 | } |
---|
| 463 | k = kbase(k); |
---|
| 464 | for (i=1; i<=size(k); i++) |
---|
[82716e] | 465 | { |
---|
[0fbdd1] | 466 | sp[i]=W+ord(k[i]); |
---|
| 467 | } |
---|
| 468 | list L = sort(sp); |
---|
| 469 | sp = d,L[1]; |
---|
| 470 | return(sp); |
---|
| 471 | } |
---|
[82716e] | 472 | example |
---|
[0fbdd1] | 473 | { "EXAMPLE:"; echo = 2; |
---|
| 474 | ring r; |
---|
| 475 | poly f=x3+y5+z2; |
---|
| 476 | intvec w=10,6,15; |
---|
[cd6dbb2] | 477 | qhspectrum(f,w); |
---|
[0fbdd1] | 478 | // the spectrum numbers are: |
---|
| 479 | // 1/30,7/30,11/30,13/30,17/30,19/30,23/30,29/30 |
---|
| 480 | } |
---|
| 481 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 482 | |
---|
[0463d5c] | 483 | proc Tjurina (def id, list #) |
---|
[d2b2a7] | 484 | "USAGE: Tjurina(id[,<any>]); id=ideal or poly |
---|
[6f2edc] | 485 | ASSUME: id=ICIS (isolated complete intersection singularity) |
---|
| 486 | RETURN: standard basis of Tjurina-module of id, |
---|
| 487 | of type module if id=ideal, resp. of type ideal if id=poly. |
---|
[80a0f0] | 488 | If a second argument is present (of any type) return a list: @* |
---|
[6f2edc] | 489 | [1] = Tjurina number, |
---|
| 490 | [2] = k-basis of miniversal deformation, |
---|
| 491 | [3] = SB of Tjurina module, |
---|
| 492 | [4] = Tjurina module |
---|
| 493 | DISPLAY: Tjurina number if printlevel >= 0 (default) |
---|
| 494 | NOTE: Tjurina number = -1 implies that id is not an ICIS |
---|
| 495 | EXAMPLE: example Tjurina; shows examples |
---|
[d2b2a7] | 496 | " |
---|
[3d124a7] | 497 | { |
---|
| 498 | //---------------------------- initialisation --------------------------------- |
---|
[6f2edc] | 499 | def i = simplify(id,10); |
---|
[3d124a7] | 500 | int tau,n = 0,size(i); |
---|
| 501 | if( size(ideal(i))==1 ) { def m=i; } // hypersurface case |
---|
| 502 | else { def m=i*freemodule(n); } // complete intersection case |
---|
| 503 | //--------------- compute Tjurina module, Tjurina number etc ------------------ |
---|
| 504 | def t1 = jacob(i)+m; // Tjurina module/ideal |
---|
| 505 | def st1 = std(t1); // SB of Tjurina module/ideal |
---|
| 506 | tau = vdim(st1); // Tjurina number |
---|
[6f2edc] | 507 | dbprint(printlevel-voice+3,"// Tjurina number = "+string(tau)); |
---|
| 508 | if( size(#)>0 ) |
---|
| 509 | { |
---|
| 510 | def kB = kbase(st1); // basis of miniversal deformation |
---|
| 511 | return(tau,kB,st1,t1); |
---|
| 512 | } |
---|
[3d124a7] | 513 | return(st1); |
---|
| 514 | } |
---|
| 515 | example |
---|
| 516 | { "EXAMPLE:"; echo = 2; |
---|
[6f2edc] | 517 | int p = printlevel; |
---|
| 518 | printlevel = 1; |
---|
| 519 | ring r = 0,(x,y,z),ds; |
---|
| 520 | poly f = x5+y6+z7+xyz; // singularity T[5,6,7] |
---|
| 521 | list T = Tjurina(f,""); |
---|
| 522 | show(T[1]); // Tjurina number, should be 16 |
---|
| 523 | show(T[2]); // basis of miniversal deformation |
---|
| 524 | show(T[3]); // SB of Tjurina ideal |
---|
| 525 | show(T[4]); ""; // Tjurina ideal |
---|
| 526 | ideal j = x2+y2+z2,x2+2y2+3z2; |
---|
| 527 | show(kbase(Tjurina(j))); // basis of miniversal deformation |
---|
| 528 | hilb(Tjurina(j)); // Hilbert series of Tjurina module |
---|
| 529 | printlevel = p; |
---|
[3d124a7] | 530 | } |
---|
| 531 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 532 | |
---|
| 533 | proc tjurina (ideal i) |
---|
[d2b2a7] | 534 | "USAGE: tjurina(id); id=ideal or poly |
---|
[6f2edc] | 535 | ASSUME: id=ICIS (isolated complete intersection singularity) |
---|
[3d124a7] | 536 | RETURN: int = Tjurina number of id |
---|
[6f2edc] | 537 | NOTE: Tjurina number = -1 implies that id is not an ICIS |
---|
[3d124a7] | 538 | EXAMPLE: example tjurina; shows an example |
---|
[d2b2a7] | 539 | " |
---|
[3d124a7] | 540 | { |
---|
[6f2edc] | 541 | return(vdim(Tjurina(i))); |
---|
[3d124a7] | 542 | } |
---|
| 543 | example |
---|
| 544 | { "EXAMPLE:"; echo = 2; |
---|
| 545 | ring r=32003,(x,y,z),(c,ds); |
---|
| 546 | ideal j=x2+y2+z2,x2+2y2+3z2; |
---|
[6f2edc] | 547 | tjurina(j); |
---|
[3d124a7] | 548 | } |
---|
| 549 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 550 | |
---|
[0b59f5] | 551 | proc T_1 (ideal id, list #) |
---|
| 552 | "USAGE: T_1(id[,<any>]); id = ideal or poly |
---|
| 553 | RETURN: T_1(id): of type module/ideal if id is of type ideal/poly. |
---|
| 554 | We call T_1(id) the T_1-module of id. It is a std basis of the |
---|
[3d124a7] | 555 | presentation of 1st order deformations of P/id, if P is the basering. |
---|
[6f2edc] | 556 | If a second argument is present (of any type) return a list of |
---|
| 557 | 3 modules: |
---|
[0b59f5] | 558 | [1]= T_1(id) |
---|
[3d124a7] | 559 | [2]= generators of normal bundle of id, lifted to P |
---|
[6f2edc] | 560 | [3]= module of relations of [2], lifted to P |
---|
| 561 | (note: transpose[3]*[2]=0 mod id) |
---|
| 562 | The list contains all non-easy objects which must be computed |
---|
[0b59f5] | 563 | to get T_1(id). |
---|
| 564 | DISPLAY: k-dimension of T_1(id) if printlevel >= 0 (default) |
---|
| 565 | NOTE: T_1(id) itself is usually of minor importance. Nevertheless, from it |
---|
[6f2edc] | 566 | all relevant information can be obtained. The most important are |
---|
[0b59f5] | 567 | probably vdim(T_1(id)); (which computes the Tjurina number), |
---|
[fd5013] | 568 | hilb(T_1(id)); and kbase(T_1(id)). |
---|
| 569 | If T_1 is called with two arguments, then matrix([2])*(kbase([1])) |
---|
[6f2edc] | 570 | represents a basis of 1st order semiuniversal deformation of id |
---|
| 571 | (use proc 'deform', to get this in a direct way). |
---|
[fd5013] | 572 | For a complete intersection the proc Tjurina is faster. |
---|
[0b59f5] | 573 | EXAMPLE: example T_1; shows an example |
---|
[d2b2a7] | 574 | " |
---|
[3d124a7] | 575 | { |
---|
[1e1ec4] | 576 | def RR=basering; |
---|
| 577 | list RRL=ringlist(RR); |
---|
| 578 | if(RRL[4]!=0) |
---|
| 579 | { |
---|
| 580 | int aa=size(#); |
---|
| 581 | ideal QU=RRL[4]; |
---|
| 582 | RRL[4]=ideal(0); |
---|
| 583 | def RS=ring(RRL); |
---|
| 584 | setring RS; |
---|
| 585 | ideal id=imap(RR,id); |
---|
| 586 | ideal QU=imap(RR,QU); |
---|
| 587 | if(aa) |
---|
| 588 | { |
---|
| 589 | list RES=T_1(id+QU,1); |
---|
| 590 | } |
---|
| 591 | else |
---|
| 592 | { |
---|
| 593 | module RES=T_1(id+QU); |
---|
| 594 | } |
---|
| 595 | setring RR; |
---|
| 596 | def RES=imap(RS,RES); |
---|
| 597 | return(RES); |
---|
| 598 | } |
---|
[3d124a7] | 599 | ideal J=simplify(id,10); |
---|
| 600 | //--------------------------- hypersurface case ------------------------------- |
---|
[6f2edc] | 601 | if( size(J)<2 ) |
---|
| 602 | { |
---|
| 603 | ideal t1 = std(J+jacob(J[1])); |
---|
| 604 | module nb = [1]; module pnb; |
---|
[0b59f5] | 605 | dbprint(printlevel-voice+3,"// dim T_1 = "+string(vdim(t1))); |
---|
[82716e] | 606 | if( size(#)>0 ) |
---|
| 607 | { |
---|
| 608 | module st1 = t1*gen(1); |
---|
[0fbdd1] | 609 | attrib(st1,"isSB",1); |
---|
[82716e] | 610 | return(st1,nb,pnb); |
---|
[0fbdd1] | 611 | } |
---|
[3d124a7] | 612 | return(t1); |
---|
| 613 | } |
---|
| 614 | //--------------------------- presentation of J ------------------------------- |
---|
| 615 | int rk; |
---|
[3939bc] | 616 | def P = basering; |
---|
[3d124a7] | 617 | module jac, t1; |
---|
[6f2edc] | 618 | jac = jacob(J); // jacobian matrix of J converted to module |
---|
[3939bc] | 619 | list A=nres(J,2); // compute presentation of J |
---|
| 620 | def A(1..2)=A[1..2]; kill A; // A(2) = 1st syzygy module of J |
---|
[3d124a7] | 621 | //---------- go to quotient ring mod J and compute normal bundle -------------- |
---|
[3939bc] | 622 | qring R = std(J); |
---|
[6f2edc] | 623 | module jac = fetch(P,jac); |
---|
| 624 | module t1 = transpose(fetch(P,A(2))); |
---|
[fb9532f] | 625 | list B=nres(t1,2); // resolve t1, B(2)=(J/J^2)*=normal_bdl |
---|
[3939bc] | 626 | def B(1..2)=B[1..2]; kill B; |
---|
[6f2edc] | 627 | t1 = modulo(B(2),jac); // pres. of normal_bdl/trivial_deformations |
---|
| 628 | rk=nrows(t1); |
---|
[3d124a7] | 629 | //-------------------------- pull back to basering ---------------------------- |
---|
[3939bc] | 630 | setring P; |
---|
[0b59f5] | 631 | t1 = fetch(R,t1)+J*freemodule(rk); // T_1-module, presentation of T_1 |
---|
[6f2edc] | 632 | t1 = std(t1); |
---|
[0b59f5] | 633 | dbprint(printlevel-voice+3,"// dim T_1 = "+string(vdim(t1))); |
---|
[6f2edc] | 634 | if( size(#)>0 ) |
---|
| 635 | { |
---|
| 636 | module B2 = fetch(R,B(2)); // presentation of normal bundle |
---|
| 637 | list L = t1,B2,A(2); |
---|
| 638 | attrib(L[1],"isSB",1); |
---|
| 639 | return(L); |
---|
[3d124a7] | 640 | } |
---|
[6f2edc] | 641 | return(t1); |
---|
[3d124a7] | 642 | } |
---|
[6f2edc] | 643 | example |
---|
[3d124a7] | 644 | { "EXAMPLE:"; echo = 2; |
---|
[6f2edc] | 645 | int p = printlevel; |
---|
| 646 | printlevel = 1; |
---|
| 647 | ring r = 32003,(x,y,z),(c,ds); |
---|
| 648 | ideal i = xy,xz,yz; |
---|
[0b59f5] | 649 | module T = T_1(i); |
---|
| 650 | vdim(T); // Tjurina number = dim_K(T_1), should be 3 |
---|
| 651 | list L=T_1(i,""); |
---|
[6f2edc] | 652 | module kB = kbase(L[1]); |
---|
[3d124a7] | 653 | print(L[2]*kB); // basis of 1st order miniversal deformation |
---|
[6f2edc] | 654 | show(L[2]); // presentation of normal bundle |
---|
| 655 | print(L[3]); // relations of i |
---|
| 656 | print(transpose(L[3])*L[2]); // should be 0 (mod i) |
---|
| 657 | printlevel = p; |
---|
[3d124a7] | 658 | } |
---|
| 659 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 660 | |
---|
[0b59f5] | 661 | proc T_2 (ideal id, list #) |
---|
| 662 | "USAGE: T_2(id[,<any>]); id = ideal |
---|
| 663 | RETURN: T_2(id): T_2-module of id . This is a std basis of a presentation of |
---|
[6f2edc] | 664 | the module of obstructions of R=P/id, if P is the basering. |
---|
| 665 | If a second argument is present (of any type) return a list of |
---|
| 666 | 4 modules and 1 ideal: |
---|
[0b59f5] | 667 | [1]= T_2(id) |
---|
[3d124a7] | 668 | [2]= standard basis of id (ideal) |
---|
[80a0f0] | 669 | [3]= module of relations of id (=1st syzygy module of id) @* |
---|
[6f2edc] | 670 | [4]= presentation of syz/kos |
---|
| 671 | [5]= relations of Hom_P([3]/kos,R), lifted to P |
---|
| 672 | The list contains all non-easy objects which must be computed |
---|
[0b59f5] | 673 | to get T_2(id). |
---|
| 674 | DISPLAY: k-dimension of T_2(id) if printlevel >= 0 (default) |
---|
| 675 | NOTE: The most important information is probably vdim(T_2(id)). |
---|
[fd5013] | 676 | Use proc miniversal to get equations of the miniversal deformation. |
---|
[0b59f5] | 677 | EXAMPLE: example T_2; shows an example |
---|
[d2b2a7] | 678 | " |
---|
[3d124a7] | 679 | { |
---|
[1e1ec4] | 680 | def RR=basering; |
---|
| 681 | list RRL=ringlist(RR); |
---|
| 682 | if(RRL[4]!=0) |
---|
| 683 | { |
---|
| 684 | int aa=size(#); |
---|
| 685 | ideal QU=RRL[4]; |
---|
| 686 | RRL[4]=ideal(0); |
---|
| 687 | def RS=ring(RRL); |
---|
| 688 | setring RS; |
---|
| 689 | ideal id=imap(RR,id); |
---|
| 690 | ideal QU=imap(RR,QU); |
---|
| 691 | if(aa) |
---|
| 692 | { |
---|
| 693 | list RES=T_2(id+QU,1); |
---|
| 694 | } |
---|
| 695 | else |
---|
| 696 | { |
---|
| 697 | module RES=T_2(id+QU); |
---|
| 698 | } |
---|
| 699 | setring RR; |
---|
| 700 | def RES=imap(RS,RES); |
---|
| 701 | return(RES); |
---|
| 702 | } |
---|
| 703 | |
---|
[3d124a7] | 704 | //--------------------------- initialisation ---------------------------------- |
---|
| 705 | def P = basering; |
---|
[6f2edc] | 706 | ideal J = id; |
---|
| 707 | module kos,SK,B2,t2; |
---|
| 708 | list L; |
---|
[3d124a7] | 709 | int n,rk; |
---|
[6f2edc] | 710 | //------------------- presentation of non-trivial syzygies -------------------- |
---|
[3939bc] | 711 | list A=nres(J,2); // resolve J, A(2)=syz |
---|
| 712 | def A(1..2)=A[1..2]; kill A; |
---|
[3d124a7] | 713 | kos = koszul(2,J); // module of Koszul relations |
---|
[6f2edc] | 714 | SK = modulo(A(2),kos); // presentation of syz/kos |
---|
[3d124a7] | 715 | ideal J0 = std(J); // standard basis of J |
---|
[6f2edc] | 716 | //?*** sollte bei der Berechnung von res mit anfallen, zu aendern!! |
---|
[3d124a7] | 717 | //---------------------- fetch to quotient ring mod J ------------------------- |
---|
[3939bc] | 718 | qring R = J0; // make P/J the basering |
---|
[6f2edc] | 719 | module A2' = transpose(fetch(P,A(2))); // dual of syz |
---|
| 720 | module t2 = transpose(fetch(P,SK)); // dual of syz/kos |
---|
[3939bc] | 721 | list B=nres(t2,2); // resolve (syz/kos)* |
---|
| 722 | def B(1..2)=B[1..2]; kill B; |
---|
[0b59f5] | 723 | t2 = modulo(B(2),A2'); // presentation of T_2 |
---|
[6f2edc] | 724 | rk = nrows(t2); |
---|
[3d124a7] | 725 | //--------------------- fetch back to basering ------------------------------- |
---|
[3939bc] | 726 | setring P; |
---|
[3d124a7] | 727 | t2 = fetch(R,t2)+J*freemodule(rk); |
---|
[6f2edc] | 728 | t2 = std(t2); |
---|
[0b59f5] | 729 | dbprint(printlevel-voice+3,"// dim T_2 = "+string(vdim(t2))); |
---|
[6f2edc] | 730 | if( size(#)>0 ) |
---|
| 731 | { |
---|
| 732 | B2 = fetch(R,B(2)); // generators of Hom_P(syz/kos,R) |
---|
| 733 | L = t2,J0,A(2),SK,B2; |
---|
| 734 | return(L); |
---|
[3d124a7] | 735 | } |
---|
[6f2edc] | 736 | return(t2); |
---|
[3d124a7] | 737 | } |
---|
| 738 | example |
---|
| 739 | { "EXAMPLE:"; echo = 2; |
---|
[6f2edc] | 740 | int p = printlevel; |
---|
| 741 | printlevel = 1; |
---|
| 742 | ring r = 32003,(x,y),(c,dp); |
---|
| 743 | ideal j = x6-y4,x6y6,x2y4-x5y2; |
---|
[0b59f5] | 744 | module T = T_2(j); |
---|
[6f2edc] | 745 | vdim(T); |
---|
| 746 | hilb(T);""; |
---|
| 747 | ring r1 = 0,(x,y,z),dp; |
---|
| 748 | ideal id = xy,xz,yz; |
---|
[0b59f5] | 749 | list L = T_2(id,""); |
---|
| 750 | vdim(L[1]); // vdim of T_2 |
---|
[6f2edc] | 751 | print(L[3]); // syzygy module of id |
---|
| 752 | printlevel = p; |
---|
[3d124a7] | 753 | } |
---|
| 754 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 755 | |
---|
[0b59f5] | 756 | proc T_12 (ideal i, list #) |
---|
| 757 | "USAGE: T_12(i[,any]); i = ideal |
---|
[80a0f0] | 758 | RETURN: T_12(i): list of 2 modules: @* |
---|
| 759 | * standard basis of T_1-module =T_1(i), 1st order deformations @* |
---|
| 760 | * standard basis of T_2-module =T_2(i), obstructions of R=P/i @* |
---|
[6f2edc] | 761 | If a second argument is present (of any type) return a list of |
---|
[80a0f0] | 762 | 9 modules, matrices, integers: @* |
---|
[0b59f5] | 763 | [1]= standard basis of T_1-module |
---|
| 764 | [2]= standard basis of T_2-module |
---|
| 765 | [3]= vdim of T_1 |
---|
| 766 | [4]= vdim of T_2 |
---|
[80a0f0] | 767 | [5]= matrix, whose cols present infinitesimal deformations @* |
---|
| 768 | [6]= matrix, whose cols are generators of relations of i(=syz(i)) @* |
---|
| 769 | [7]= matrix, presenting Hom_P(syz/kos,R), lifted to P @* |
---|
[0b59f5] | 770 | [8]= presentation of T_1-module, no std basis |
---|
| 771 | [9]= presentation of T_2-module, no std basis |
---|
| 772 | DISPLAY: k-dimension of T_1 and T_2 if printlevel >= 0 (default) |
---|
[3d124a7] | 773 | NOTE: Use proc miniversal from deform.lib to get miniversal deformation of i, |
---|
[fd5013] | 774 | the list contains all objects used by proc miniversal. |
---|
[0b59f5] | 775 | EXAMPLE: example T_12; shows an example |
---|
[d2b2a7] | 776 | " |
---|
[3d124a7] | 777 | { |
---|
[1e1ec4] | 778 | def RR=basering; |
---|
| 779 | list RRL=ringlist(RR); |
---|
| 780 | if(RRL[4]!=0) |
---|
| 781 | { |
---|
| 782 | int aa=size(#); |
---|
| 783 | ideal QU=RRL[4]; |
---|
| 784 | RRL[4]=ideal(0); |
---|
| 785 | def RS=ring(RRL); |
---|
| 786 | setring RS; |
---|
| 787 | ideal id=imap(RR,id); |
---|
| 788 | ideal QU=imap(RR,QU); |
---|
| 789 | if(aa) |
---|
| 790 | { |
---|
| 791 | list RES=T_12(id+QU,1); |
---|
| 792 | } |
---|
| 793 | else |
---|
| 794 | { |
---|
| 795 | list RES=T_12(id+QU); |
---|
| 796 | } |
---|
| 797 | setring RR; |
---|
| 798 | list RES=imap(RS,RES); |
---|
| 799 | return(RES); |
---|
| 800 | } |
---|
| 801 | |
---|
[3d124a7] | 802 | //--------------------------- initialisation ---------------------------------- |
---|
| 803 | int n,r1,r2,d1,d2; |
---|
[3bc8cd] | 804 | def P = basering; |
---|
[3d124a7] | 805 | i = simplify(i,10); |
---|
[6f2edc] | 806 | module jac,t1,t2,sbt1,sbt2; |
---|
[0b59f5] | 807 | matrix Kos,Syz,SK,kbT_1,Sx; |
---|
[6f2edc] | 808 | list L; |
---|
[3d124a7] | 809 | ideal i0 = std(i); |
---|
| 810 | //-------------------- presentation of non-trivial syzygies ------------------- |
---|
[3939bc] | 811 | list I= nres(i,2); // resolve i |
---|
[6f2edc] | 812 | Syz = matrix(I[2]); // syz(i) |
---|
[3d124a7] | 813 | jac = jacob(i); // jacobi ideal |
---|
[6f2edc] | 814 | Kos = koszul(2,i); // koszul-relations |
---|
| 815 | SK = modulo(Syz,Kos); // presentation of syz/kos |
---|
[3d124a7] | 816 | //--------------------- fetch to quotient ring mod i ------------------------- |
---|
[3bc8cd] | 817 | qring Ox = i0; // make P/i the basering |
---|
[6f2edc] | 818 | module Jac = fetch(P,jac); |
---|
| 819 | matrix No = transpose(fetch(P,Syz)); // ker(No) = Hom(syz,Ox) |
---|
| 820 | module So = transpose(fetch(P,SK)); // Hom(syz/kos,R) |
---|
[3939bc] | 821 | list resS = nres(So,2); |
---|
[6f2edc] | 822 | matrix Sx = resS[2]; |
---|
[3939bc] | 823 | list resN = nres(No,2); |
---|
[6f2edc] | 824 | matrix Nx = resN[2]; |
---|
[0b59f5] | 825 | module T_2 = modulo(Sx,No); // presentation of T_2 |
---|
| 826 | r2 = nrows(T_2); |
---|
| 827 | module T_1 = modulo(Nx,Jac); // presentation of T_1 |
---|
| 828 | r1 = nrows(T_1); |
---|
[3d124a7] | 829 | //------------------------ pull back to basering ------------------------------ |
---|
[3bc8cd] | 830 | setring P; |
---|
[0b59f5] | 831 | t1 = fetch(Ox,T_1)+i*freemodule(r1); |
---|
| 832 | t2 = fetch(Ox,T_2)+i*freemodule(r2); |
---|
[3d124a7] | 833 | sbt1 = std(t1); |
---|
| 834 | d1 = vdim(sbt1); |
---|
[6f2edc] | 835 | sbt2 = std(t2); |
---|
[3d124a7] | 836 | d2 = vdim(sbt2); |
---|
[0b59f5] | 837 | dbprint(printlevel-voice+3,"// dim T_1 = "+string(d1),"// dim T_2 = "+string(d2)); |
---|
[3d124a7] | 838 | if ( size(#)>0) |
---|
| 839 | { |
---|
[3bc8cd] | 840 | if (d1>0) |
---|
| 841 | { |
---|
[0b59f5] | 842 | kbT_1 = fetch(Ox,Nx)*kbase(sbt1); |
---|
[3bc8cd] | 843 | } |
---|
| 844 | else |
---|
| 845 | { |
---|
[0b59f5] | 846 | kbT_1 = 0; |
---|
[82716e] | 847 | } |
---|
[3bc8cd] | 848 | Sx = fetch(Ox,Sx); |
---|
[0b59f5] | 849 | L = sbt1,sbt2,d1,d2,kbT_1,Syz,Sx,t1,t2; |
---|
[3bc8cd] | 850 | return(L); |
---|
[3d124a7] | 851 | } |
---|
[6f2edc] | 852 | L = sbt1,sbt2; |
---|
| 853 | return(L); |
---|
[3d124a7] | 854 | } |
---|
| 855 | example |
---|
| 856 | { "EXAMPLE:"; echo = 2; |
---|
[6f2edc] | 857 | int p = printlevel; |
---|
| 858 | printlevel = 1; |
---|
[720ff4] | 859 | ring r = 199,(x,y,z,u,v),(c,ws(4,3,2,3,4)); |
---|
[6f2edc] | 860 | ideal i = xz-y2,yz2-xu,xv-yzu,yu-z3,z2u-yv,zv-u2; |
---|
| 861 | //a cyclic quotient singularity |
---|
[0b59f5] | 862 | list L = T_12(i,1); |
---|
[6f2edc] | 863 | print(L[5]); //matrix of infin. deformations |
---|
| 864 | printlevel = p; |
---|
[3d124a7] | 865 | } |
---|
| 866 | /////////////////////////////////////////////////////////////////////////////// |
---|
[0463d5c] | 867 | proc codim (def id1,def id2) |
---|
[d2b2a7] | 868 | "USAGE: codim(id1,id2); id1,id2 ideal or module, both must be standard bases |
---|
[0fbdd1] | 869 | RETURN: int, which is: |
---|
[a2c96e] | 870 | 1. the vectorspace dimension of id1/id2 if id2 is contained in id1 |
---|
| 871 | and if this number is finite@* |
---|
[fd5013] | 872 | 2. -1 if the dimension of id1/id2 is infinite@* |
---|
[a2c96e] | 873 | 3. -2 if id2 is not contained in id1 |
---|
| 874 | COMPUTE: consider the Hilbert series iv1(t) of id1 and iv2(t) of id2. |
---|
| 875 | If codim(id1,id2) is finite, q(t)=(iv2(t)-iv1(t))/(1-t)^n is |
---|
| 876 | rational, and the codimension is the sum of the coefficients of q(t) |
---|
| 877 | (n = dimension of basering). |
---|
[0fbdd1] | 878 | EXAMPLE: example codim; shows an example |
---|
[d2b2a7] | 879 | " |
---|
[1e745b] | 880 | { |
---|
[b082fc] | 881 | if (attrib(id1,"isSB")!=1) { "first argument of codim is not a SB";} |
---|
| 882 | if (attrib(id2,"isSB")!=1) { "second argument of codim is not a SB";} |
---|
[1e745b] | 883 | intvec iv1, iv2, iv; |
---|
| 884 | int i, d1, d2, dd, i1, i2, ia, ie; |
---|
[0fbdd1] | 885 | //--------------------------- check id2 < id1 ------------------------------- |
---|
| 886 | ideal led = lead(id1); |
---|
| 887 | attrib(led, "isSB",1); |
---|
| 888 | i = size(NF(lead(id2),led)); |
---|
[1e745b] | 889 | if ( i > 0 ) |
---|
| 890 | { |
---|
| 891 | return(-2); |
---|
| 892 | } |
---|
| 893 | //--------------------------- 1. check finiteness --------------------------- |
---|
| 894 | i1 = dim(id1); |
---|
| 895 | i2 = dim(id2); |
---|
| 896 | if (i1 < 0) |
---|
| 897 | { |
---|
[a2c96e] | 898 | if ( i2 < 0 ) |
---|
| 899 | { |
---|
| 900 | return(0); |
---|
| 901 | } |
---|
[1e745b] | 902 | if (i2 == 0) |
---|
| 903 | { |
---|
[a2c96e] | 904 | return (vdim(id2)); |
---|
[1e745b] | 905 | } |
---|
| 906 | else |
---|
| 907 | { |
---|
| 908 | return(-1); |
---|
| 909 | } |
---|
| 910 | } |
---|
| 911 | if (i2 != i1) |
---|
| 912 | { |
---|
| 913 | return(-1); |
---|
| 914 | } |
---|
| 915 | if (i2 <= 0) |
---|
| 916 | { |
---|
| 917 | return(vdim(id2)-vdim(id1)); |
---|
| 918 | } |
---|
[0fbdd1] | 919 | // if (mult(id2) != mult(id1)) |
---|
| 920 | //{ |
---|
| 921 | // return(-1); |
---|
| 922 | // } |
---|
[1e745b] | 923 | //--------------------------- module --------------------------------------- |
---|
| 924 | d1 = nrows(id1); |
---|
| 925 | d2 = nrows(id2); |
---|
| 926 | dd = 0; |
---|
| 927 | if (d1 > d2) |
---|
| 928 | { |
---|
| 929 | id2=id2,maxideal(1)*gen(d1); |
---|
| 930 | dd = -1; |
---|
| 931 | } |
---|
| 932 | if (d2 > d1) |
---|
| 933 | { |
---|
| 934 | id1=id1,maxideal(1)*gen(d2); |
---|
| 935 | dd = 1; |
---|
| 936 | } |
---|
| 937 | //--------------------------- compute first hilbertseries ------------------ |
---|
| 938 | iv1 = hilb(id1,1); |
---|
| 939 | i1 = size(iv1); |
---|
| 940 | iv2 = hilb(id2,1); |
---|
| 941 | i2 = size(iv2); |
---|
| 942 | //--------------------------- difference of hilbertseries ------------------ |
---|
| 943 | if (i2 > i1) |
---|
| 944 | { |
---|
| 945 | for ( i=1; i<=i1; i=i+1) |
---|
| 946 | { |
---|
| 947 | iv2[i] = iv2[i]-iv1[i]; |
---|
| 948 | } |
---|
| 949 | ie = i2; |
---|
| 950 | iv = iv2; |
---|
| 951 | } |
---|
| 952 | else |
---|
| 953 | { |
---|
| 954 | for ( i=1; i<=i2; i=i+1) |
---|
| 955 | { |
---|
| 956 | iv1[i] = iv2[i]-iv1[i]; |
---|
| 957 | } |
---|
| 958 | iv = iv1; |
---|
| 959 | for (ie=i1;ie>=0;ie=ie-1) |
---|
| 960 | { |
---|
| 961 | if (ie == 0) |
---|
| 962 | { |
---|
[82716e] | 963 | return(0); |
---|
[1e745b] | 964 | } |
---|
| 965 | if (iv[ie] != 0) |
---|
| 966 | { |
---|
| 967 | break; |
---|
| 968 | } |
---|
| 969 | } |
---|
| 970 | } |
---|
| 971 | ia = 1; |
---|
| 972 | while (iv[ia] == 0) { ia=ia+1; } |
---|
| 973 | //--------------------------- ia <= nonzeros <= ie ------------------------- |
---|
| 974 | iv1 = iv[ia]; |
---|
| 975 | for(i=ia+1;i<=ie;i=i+1) |
---|
| 976 | { |
---|
| 977 | iv1=iv1,iv[i]; |
---|
| 978 | } |
---|
| 979 | //--------------------------- compute second hilbertseries ----------------- |
---|
| 980 | iv2 = hilb(iv1); |
---|
| 981 | //--------------------------- check finitenes ------------------------------ |
---|
| 982 | i2 = size(iv2); |
---|
| 983 | i1 = ie - ia + 1 - i2; |
---|
| 984 | if (i1 != nvars(basering)) |
---|
| 985 | { |
---|
| 986 | return(-1); |
---|
| 987 | } |
---|
| 988 | //--------------------------- compute result ------------------------------- |
---|
| 989 | i1 = 0; |
---|
| 990 | for ( i=1; i<=i2; i=i+1) |
---|
| 991 | { |
---|
| 992 | i1 = i1 + iv2[i]; |
---|
| 993 | } |
---|
| 994 | return(i1+dd); |
---|
| 995 | } |
---|
[0fbdd1] | 996 | example |
---|
| 997 | { "EXAMPLE:"; echo = 2; |
---|
[c1969f] | 998 | ring r = 0,(x,y),dp; |
---|
[0fbdd1] | 999 | ideal j = y6,x4; |
---|
| 1000 | ideal m = x,y; |
---|
| 1001 | attrib(m,"isSB",1); //let Singular know that ideals are a standard basis |
---|
[82716e] | 1002 | attrib(j,"isSB",1); |
---|
[0fbdd1] | 1003 | codim(m,j); // should be 23 (Milnor number -1 of y7-x5) |
---|
| 1004 | } |
---|
[c69ea5] | 1005 | |
---|
| 1006 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 1007 | |
---|
[0463d5c] | 1008 | proc tangentcone (def id,list #) |
---|
[c69ea5] | 1009 | "USAGE: tangentcone(id [,n]); id = ideal, n = int |
---|
| 1010 | RETURN: the tangent cone of id |
---|
[fd5013] | 1011 | NOTE: The procedure works for any monomial ordering. |
---|
| 1012 | If n=0 use std w.r.t. local ordering ds, if n=1 use locstd. |
---|
[c69ea5] | 1013 | EXAMPLE: example tangentcone; shows an example |
---|
| 1014 | " |
---|
| 1015 | { |
---|
| 1016 | int ii,n; |
---|
| 1017 | def bas = basering; |
---|
| 1018 | ideal tang; |
---|
| 1019 | if (size(#) !=0) { n= #[1]; } |
---|
| 1020 | if( n==0 ) |
---|
| 1021 | { |
---|
[1e1ec4] | 1022 | def @newr@=changeord(list(list("ds",1:nvars(basering)))); |
---|
| 1023 | setring @newr@; |
---|
[c69ea5] | 1024 | ideal @id = imap(bas,id); |
---|
| 1025 | @id = std(@id); |
---|
| 1026 | setring bas; |
---|
| 1027 | id = imap(@newr@,@id); |
---|
| 1028 | kill @newr@; |
---|
| 1029 | } |
---|
| 1030 | else |
---|
| 1031 | { |
---|
| 1032 | id = locstd(id); |
---|
| 1033 | } |
---|
[3c4dcc] | 1034 | |
---|
[c69ea5] | 1035 | for(ii=1; ii<=size(id); ii++) |
---|
| 1036 | { |
---|
[3c4dcc] | 1037 | tang[ii]=jet(id[ii],mindeg(id[ii])); |
---|
[c69ea5] | 1038 | } |
---|
[3c4dcc] | 1039 | return(tang); |
---|
[c69ea5] | 1040 | } |
---|
| 1041 | example |
---|
| 1042 | { "EXAMPLE:"; echo = 2; |
---|
| 1043 | ring R = 0,(x,y,z),ds; |
---|
| 1044 | ideal i = 7xyz+z5,x2+y3+z7,5z5+y5; |
---|
| 1045 | tangentcone(i); |
---|
[3c4dcc] | 1046 | } |
---|
[c69ea5] | 1047 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 1048 | |
---|
[0463d5c] | 1049 | proc locstd (def id) |
---|
[c69ea5] | 1050 | "USAGE: locstd (id); id = ideal |
---|
| 1051 | RETURN: a standard basis for a local degree ordering |
---|
| 1052 | NOTE: the procedure homogenizes id w.r.t. a new 1st variable @t@, computes |
---|
[3754ca] | 1053 | a SB w.r.t. (dp(1),dp) and substitutes @t@ by 1. |
---|
[c69ea5] | 1054 | Hence the result is a SB with respect to an ordering which sorts |
---|
| 1055 | first w.r.t. the order and then refines it with dp. This is a |
---|
| 1056 | local degree ordering. |
---|
| 1057 | This is done in order to avoid cancellation of units and thus |
---|
| 1058 | be able to use option(contentSB); |
---|
| 1059 | EXAMPLE: example locstd; shows an example |
---|
| 1060 | " |
---|
| 1061 | { |
---|
| 1062 | int ii; |
---|
| 1063 | def bas = basering; |
---|
[3c4dcc] | 1064 | execute("ring @r_locstd |
---|
[c69ea5] | 1065 | =("+charstr(bas)+"),(@t@,"+varstr(bas)+"),(dp(1),dp);"); |
---|
| 1066 | ideal @id = imap(bas,id); |
---|
| 1067 | ideal @hid = homog(@id,@t@); |
---|
| 1068 | @hid = std(@hid); |
---|
| 1069 | @hid = subst(@hid,@t@,1); |
---|
| 1070 | setring bas; |
---|
| 1071 | def @hid = imap(@r_locstd,@hid); |
---|
| 1072 | attrib(@hid,"isSB",1); |
---|
| 1073 | kill @r_locstd; |
---|
[3c4dcc] | 1074 | return(@hid); |
---|
[c69ea5] | 1075 | } |
---|
| 1076 | example |
---|
| 1077 | { "EXAMPLE:"; echo = 2; |
---|
| 1078 | ring R = 0,(x,y,z),ds; |
---|
| 1079 | ideal i = xyz+z5,2x2+y3+z7,3z5+y5; |
---|
| 1080 | locstd(i); |
---|
[3c4dcc] | 1081 | } |
---|