Changeset 6ba2a39 in git
 Timestamp:
 Oct 14, 2013, 11:52:07 AM (9 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
 Children:
 ac665c6c03e4e4354b586d1fd770d8d5669253cf
 Parents:
 f29e226d38b79f8a047c6d968c419de9ce584fb7
 gitauthor:
 Hans Schoenemann <hannes@mathematik.unikl.de>20131014 11:52:07+02:00
 gitcommitter:
 Hans Schoenemann <hannes@mathematik.unikl.de>20131014 11:55:23+02:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/LIB/schubert.lib
rf29e22 r6ba2a39 4 4 category="Algebraic Geometry"; 5 5 info=" 6 LIBRARY: Schubert.lib Proceduces for Intersection Theory7 8 AUTHOR: Hiep Dang, email: hiep@mathematik.unikl.de6 LIBRARY: Schubert.lib Proceduces for Intersection Theory 7 8 AUTHOR: Hiep Dang, email: hiep@mathematik.unikl.de 9 9 10 10 OVERVIEW: 11 11 12 We implement two new classes (variety and sheaf) and methods for computing13 with them. Here a variety is represented by the dimension and the Chow ring.14 A sheaf on a variety is represented by the Chern character.15 12 We implement new classes (variety, sheaf, stack, graph) and methods for 13 computing with them. Here a variety is represented by a nonnegative integer 14 which is its dimension and a graded ring which is its Chow ring. A sheaf is 15 represented by a variety and a polynomial which is its Chern character. 16 16 In particular, we implement the concrete varieties such as projective spaces 17 , Grassmannians, and projective bundles. Finally, the most important thing18 is a method for computing the intersection numbers (degrees of 0cycles). 19 17 , Grassmannians, and projective bundles. 18 19 <<<<<<< HEAD 20 20 PROCEDURES: 21 21 makeVariety(int,ideal) create a variety … … 39 39 minusSheaf(sheaf,sheaf) the quotient of two sheaves 40 40 plusSheaf(sheaf,sheaf) the direct sum of two sheaves 41 ======= 42 An important task of this library is related to the computation of 43 GromovWitten invariants. In particular, we implement new tools for the 44 computation in equivariant intersection theory. These tools are based on the 45 localization of moduli spaces of stable maps and Bott's formula. They are 46 useful for the computation of GromovWitten invariants. In order to do this, 47 we have to deal with moduli spaces of stable maps, which were introduced by 48 Kontsevich, and the graphs corresponding to the fixed point components of a 49 torus action on the moduli spaces of stable maps. 50 >>>>>>> 2ba3231... chg: new version of schubert.lib 41 51 42 52 REFERENCES: … … 52 62 intersection theory, 2010. 53 63 54 KEYWORDS: Intersection Theory, Enumerative Geometry, Schubert Calculus 64 Maxim Kontsevich, Enumeration of rational curves via torus actions, 1995. 65 66 PROCEDURES: 67 mod_init() create new objects in this library 68 makeVariety(int,ideal) create a variety 69 printVariety(variety) print procedure for a variety 70 productVariety(variety,variety) make the product of two varieties 71 ChowRing(variety) create the Chow ring of a variety 72 Grassmannian(int,int) create a Grassmannian as a variety 73 projectiveSpace(int) create a projective space as a variety 74 projectiveBundle(sheaf) create a projective bundle as a variety 75 integral(variety,poly) degree of a 0cycle on a variety 76 makeSheaf(variety,poly) create a sheaf 77 printSheaf(sheaf) print procedure for sheaves 78 rankSheaf(sheaf) return the rank of a sheaf 79 totalChernClass(sheaf) compute the total Chern class of a sheaf 80 ChernClass(sheaf,int) compute the kth Chern class of a sheaf 81 topChernClass(sheaf) compute the top Chern class of a sheaf 82 totalSegreClass(sheaf) compute the total Segre class of a sheaf 83 dualSheaf(sheaf) make the dual of a sheaf 84 tensorSheaf(sheaf,sheaf) make the tensor of two sheaves 85 symmetricPowerSheaf(sheaf,int) make the kth symmetric power of a sheaf 86 quotSheaf(sheaf,sheaf) make the quotient of two sheaves 87 addSheaf(sheaf,sheaf) make the direct sum of two sheaves 88 makeGraph(list,list) create a graph from a list of vertices 89 and a list of edges 90 printGraph(graph) print procedure for graphs 91 moduliSpace(variety,int) create a moduli space of stable maps as 92 an algebraic stack 93 printStack(stack) print procedure for stacks 94 dimStack(stack) compute the dimension of a stack 95 fixedPoints(stack) compute the list of graphs corresponding 96 the fixed point components of a torus 97 action on the stack 98 contributionBundle(stack,graph) compute the contribution bundle on a 99 stack at a graph 100 normalBundle(stack,graph) compute the normal bundle on a stack at 101 a graph 102 multipleCover(int) compute the contribution of multiple 103 covers of a smooth rational curve as a 104 GromovWitten invariant 105 linesHypersurface(int) compute the number of lines on a general 106 hypersurface 107 rationalCurve(int,list) compute the GromovWitten invariant 108 corresponding the number of rational 109 curves on a general CalabiYau threefold 110 part(poly,int) compute a homogeneous component of a 111 polynomial. 112 parts(poly,int,int) compute the sum of homogeneous 113 components of a polynomial 114 logg(poly,int) compute Chern characters from total 115 Chern classes. 116 expp(poly,int) compute total Chern classes from Chern 117 characters 118 SchubertClass(list) compute the Schubert classes on a 119 Grassmannian 120 dualPartition(list) compute the dual of a partition 121 122 KEYWORDS: Intersection Theory; Enumerative Geometry; Schubert Calculus; 123 Bott's formula. 124 55 125 "; 56 126 … … 61 131 62 132 //////////////////////////////////////////////////////////////////////////////// 63 /// create new classes: varieties and sheaves //////////////////////////////////133 /////////// create new objects in this library //////////////////////////////// 64 134 //////////////////////////////////////////////////////////////////////////////// 65 135 66 136 proc mod_init() 137 "USAGE: mod_init(); 138 THEORY: This is to create new objects in this library such as variety, 139 sheaf, stack, and graph. 140 KEYWORDS: variety, sheaf, stack, graph 141 EXAMPLE: example mod_init(); shows an example 142 " 67 143 { 68 144 newstruct("variety","int dimension, ring baseRing, ideal relations"); 69 145 newstruct("sheaf","variety currentVariety, poly ChernCharacter"); 70 71 system("install","variety","print",variety_print,1); 146 newstruct("graph","list vertices, list edges"); 147 newstruct("stack","variety currentVariety, int degreeCurve"); 148 149 system("install","variety","print",printVariety,1); 72 150 system("install","variety","*",productVariety,2); 73 system("install","sheaf","print", sheaf_print,1);151 system("install","sheaf","print",printSheaf,1); 74 152 system("install","sheaf","*",tensorSheaf,2); 75 system("install","sheaf","+",plusSheaf,2); 76 system("install","sheaf","",minusSheaf,2); 153 system("install","sheaf","+",addSheaf,2); 154 system("install","sheaf","",quotSheaf,2); 155 system("install","sheaf","^",symmetricPowerSheaf,2); 156 system("install","graph","print",printGraph,1); 157 system("install","stack","print",printStack,1); 158 } 159 example 160 { 161 "EXAMPLE:"; echo=2; 162 mod_init(); 163 } 164 165 //////////////////////////////////////////////////////////////////////////////// 166 //////// Procedures concerned with moduli spaces of stable maps //////////////// 167 //////////////////////////////////////////////////////////////////////////////// 168 169 proc printStack(stack M) 170 "USAGE: printStack(M); M stack 171 ASSUME: M is a moduli space of stable maps. 172 THEORY: This is the print function used by Singular to print a stack. 173 KEYWORDS: stack, moduli space of stable maps 174 EXAMPLE: example printStack; shows an example 175 " 176 { 177 "A moduli space of dimension", dimStack(M); 178 } 179 example 180 { 181 "EXAMPLE:"; echo=2; 182 ring r = 0,(x),dp; 183 variety P = projectiveSpace(4); 184 stack M = moduliSpace(P,2); 185 M; 186 } 187 188 proc moduliSpace(variety V, int d) 189 "USAGE: moduliSpace(V,d); V variety, d int 190 ASSUME: V is a projective space and d is a positive integer. 191 THEORY: This is the function used by Singular to create a moduli space of 192 stable maps from a genus zero curve to a projective space. 193 KEYWORDS: stack, moduli space of stable maps, rational curves 194 EXAMPLE: example moduliSpace; shows an example 195 " 196 { 197 stack M; 198 M.currentVariety = V; 199 M.degreeCurve = d; 200 return(M); 201 } 202 example 203 { 204 "EXAMPLE:"; echo=2; 205 ring r = 0,(x),dp; 206 variety P = projectiveSpace(4); 207 stack M = moduliSpace(P,2); 208 M; 209 } 210 211 proc dimStack(stack M) 212 "USAGE: dimStack(M); M stack 213 RETURN: int 214 INPUT: M is a moduli space of stable maps. 215 OUTPUT: the dimension of moduli space of stable maps. 216 KEYWORDS: dimension, moduli space of stable maps, rational curves 217 EXAMPLE: example dimStack; shows an example 218 " 219 { 220 variety V = M.currentVariety; 221 int n = V.dimension; 222 int d = M.degreeCurve; 223 return (n*d+n+d3); 224 } 225 example 226 { 227 "EXAMPLE:"; echo=2; 228 ring r = 0,(x),dp; 229 variety P = projectiveSpace(4); 230 stack M = moduliSpace(P,2); 231 dimStack(M); 232 } 233 234 proc fixedPoints(stack M) 235 "USAGE: fixedPoints(M); M stack 236 RETURN: list 237 INPUT: M is a moduli space of stable maps. 238 OUTPUT: a list of graphs corresponding the fixed point components of a torus 239 action on a moduli space of stable maps. 240 KEYWORDS: fixed points, moduli space of stable maps, graph 241 EXAMPLE: example fixedPoints; shows an example 242 " 243 { 244 int i,j,k,h,m,n,p; 245 list l; 246 int d = M.degreeCurve; 247 variety V = M.currentVariety; 248 int r = V.dimension; 249 for (i=0;i<=r;i++) 250 { 251 for (j=0;j<=r;j++) 252 { 253 if (i <> j) 254 { 255 l = insert(l,list(graph1(d,i,j),2*d),size(l)); 256 } 257 } 258 } 259 if (d == 2) 260 { 261 for (i=0;i<=r;i++) 262 { 263 for (j=0;j<=r;j++) 264 { 265 for (k=0;k<=r;k++) 266 { 267 if (i <> j and j <> k) 268 { 269 l = insert(l,list(graph2(list(1,1),i,j,k),2),size(l)); 270 } 271 } 272 } 273 } 274 } 275 if (d == 3) 276 { 277 for (i=0;i<=r;i++) 278 { 279 for (j=0;j<=r;j++) 280 { 281 for (k=0;k<=r;k++) 282 { 283 if (i <> j and j <> k) 284 { 285 l = insert(l,list(graph2(list(2,1),i,j,k),2),size(l)); 286 for (h=0;h<=r;h++) 287 { 288 if (h <> k) 289 { 290 l = insert(l,list(graph31(list(1,1,1),i,j,k,h),2),size(l)); 291 } 292 if (h <> j) 293 { 294 l = insert(l,list(graph32(list(1,1,1),i,j,k,h),6),size(l)); 295 } 296 } 297 } 298 } 299 } 300 } 301 } 302 if (d == 4) 303 { 304 for (i=0;i<=r;i++) 305 { 306 for (j=0;j<=r;j++) 307 { 308 for (k=0;k<=r;k++) 309 { 310 if (i <> j and j <> k) 311 { 312 l = insert(l,list(graph2(list(3,1),i,j,k),3),size(l)); 313 l = insert(l,list(graph2(list(2,2),i,j,k),8),size(l)); 314 for (h=0;h<=r;h++) 315 { 316 if (h <> k) 317 { 318 l = insert(l,list(graph31(list(2,1,1),i,j,k,h),2),size(l)); 319 l = insert(l,list(graph31(list(1,2,1),i,j,k,h),4),size(l)); 320 } 321 if (h <> j) 322 { 323 l = insert(l,list(graph32(list(2,1,1),i,j,k,h),4),size(l)); 324 } 325 for (m=0;m<=r;m++) 326 { 327 if (k <> h and m <> h) 328 { 329 l = insert(l,list(graph41(list(1,1,1,1),i,j,k,h,m),2),size(l)); 330 } 331 if (k <> h and m <> k) 332 { 333 l = insert(l,list(graph42(list(1,1,1,1),i,j,k,h,m),2),size(l)); 334 } 335 if (h <> j and m <> j) 336 { 337 l = insert(l,list(graph43(list(1,1,1,1),i,j,k,h,m),24),size(l)); 338 } 339 } 340 } 341 } 342 } 343 } 344 } 345 } 346 if (d == 5) 347 { 348 for (i=0;i<=r;i++) 349 { 350 for (j=0;j<=r;j++) 351 { 352 for (k=0;k<=r;k++) 353 { 354 if (i <> j and j <> k) 355 { 356 l = insert(l,list(graph2(list(4,1),i,j,k),4),size(l)); 357 l = insert(l,list(graph2(list(3,2),i,j,k),6),size(l)); 358 for (h=0;h<=r;h++) 359 { 360 if (k <> h) 361 { 362 l = insert(l,list(graph31(list(3,1,1),i,j,k,h),3),size(l)); 363 l = insert(l,list(graph31(list(1,3,1),i,j,k,h),6),size(l)); 364 l = insert(l,list(graph31(list(2,2,1),i,j,k,h),4),size(l)); 365 l = insert(l,list(graph31(list(2,1,2),i,j,k,h),8),size(l)); 366 } 367 if (j <> h) 368 { 369 l = insert(l,list(graph32(list(3,1,1),i,j,k,h),6),size(l)); 370 l = insert(l,list(graph32(list(2,2,1),i,j,k,h),8),size(l)); 371 } 372 for (m=0;m<=r;m++) 373 { 374 if (k <> h and h <> m) 375 { 376 l = insert(l,list(graph41(list(2,1,1,1),i,j,k,h,m),2),size(l)); 377 l = insert(l,list(graph41(list(1,2,1,1),i,j,k,h,m),2),size(l)); 378 } 379 if (k <> h and k <> m) 380 { 381 l = insert(l,list(graph42(list(2,1,1,1),i,j,k,h,m),4),size(l)); 382 l = insert(l,list(graph42(list(1,2,1,1),i,j,k,h,m),4),size(l)); 383 l = insert(l,list(graph42(list(1,1,2,1),i,j,k,h,m),2),size(l)); 384 } 385 if (j <> h and j <> m) 386 { 387 l = insert(l,list(graph43(list(2,1,1,1),i,j,k,h,m),12),size(l)); 388 } 389 for (n=0;n<=r;n++) 390 { 391 if (k <> h and h <> m and m <> n) 392 { 393 l = insert(l,list(graph51(list(1,1,1,1,1),i,j,k,h,m,n),2),size(l)); 394 } 395 if (k <> h and h <> m and h <> n) 396 { 397 l = insert(l,list(graph52(list(1,1,1,1,1),i,j,k,h,m,n),2),size(l)); 398 } 399 if (k <> h and k <> m and k <> n) 400 { 401 l = insert(l,list(graph53(list(1,1,1,1,1),i,j,k,h,m,n),6),size(l)); 402 } 403 if (j <> h and h <> m and h <> n) 404 { 405 l = insert(l,list(graph54(list(1,1,1,1,1),i,j,k,h,m,n),8),size(l)); 406 } 407 if (k <> h and k <> m and h <> n) 408 { 409 l = insert(l,list(graph55(list(1,1,1,1,1),i,j,k,h,m,n),2),size(l)); 410 } 411 if (j <> h and j <> m and j <> n) 412 { 413 l = insert(l,list(graph56(list(1,1,1,1,1),i,j,k,h,m,n),120),size(l)); 414 } 415 } 416 } 417 } 418 } 419 } 420 } 421 } 422 } 423 if (d == 6) 424 { 425 for (i=0;i<=r;i++) 426 { 427 for (j=0;j<=r;j++) 428 { 429 for (k=0;k<=r;k++) 430 { 431 if (i <> j and j <> k) 432 { 433 l = insert(l,list(graph2(list(5,1),i,j,k),5),size(l)); 434 l = insert(l,list(graph2(list(4,2),i,j,k),8),size(l)); 435 l = insert(l,list(graph2(list(3,3),i,j,k),18),size(l)); 436 for (h=0;h<=r;h++) 437 { 438 if (k <> h) 439 { 440 l = insert(l,list(graph31(list(4,1,1),i,j,k,h),4),size(l)); 441 l = insert(l,list(graph31(list(1,4,1),i,j,k,h),8),size(l)); 442 l = insert(l,list(graph31(list(3,2,1),i,j,k,h),6),size(l)); 443 l = insert(l,list(graph31(list(3,1,2),i,j,k,h),6),size(l)); 444 l = insert(l,list(graph31(list(1,3,2),i,j,k,h),6),size(l)); 445 l = insert(l,list(graph31(list(2,2,2),i,j,k,h),16),size(l)); 446 } 447 if (j <> h) 448 { 449 l = insert(l,list(graph32(list(4,1,1),i,j,k,h),8),size(l)); 450 l = insert(l,list(graph32(list(3,2,1),i,j,k,h),6),size(l)); 451 l = insert(l,list(graph32(list(2,2,2),i,j,k,h),48),size(l)); 452 } 453 for (m=0;m<=r;m++) 454 { 455 if (k <> h and h <> m) 456 { 457 l = insert(l,list(graph41(list(3,1,1,1),i,j,k,h,m),3),size(l)); 458 l = insert(l,list(graph41(list(1,3,1,1),i,j,k,h,m),3),size(l)); 459 l = insert(l,list(graph41(list(2,2,1,1),i,j,k,h,m),4),size(l)); 460 l = insert(l,list(graph41(list(2,1,2,1),i,j,k,h,m),4),size(l)); 461 l = insert(l,list(graph41(list(2,1,1,2),i,j,k,h,m),8),size(l)); 462 l = insert(l,list(graph41(list(1,2,2,1),i,j,k,h,m),8),size(l)); 463 } 464 if (k <> h and k <> m) 465 { 466 l = insert(l,list(graph42(list(3,1,1,1),i,j,k,h,m),6),size(l)); 467 l = insert(l,list(graph42(list(1,3,1,1),i,j,k,h,m),6),size(l)); 468 l = insert(l,list(graph42(list(1,1,3,1),i,j,k,h,m),3),size(l)); 469 l = insert(l,list(graph42(list(2,2,1,1),i,j,k,h,m),8),size(l)); 470 l = insert(l,list(graph42(list(1,1,2,2),i,j,k,h,m),8),size(l)); 471 l = insert(l,list(graph42(list(2,1,2,1),i,j,k,h,m),4),size(l)); 472 l = insert(l,list(graph42(list(1,2,2,1),i,j,k,h,m),4),size(l)); 473 } 474 if (j <> h and j <> m) 475 { 476 l = insert(l,list(graph43(list(3,1,1,1),i,j,k,h,m),18),size(l)); 477 l = insert(l,list(graph43(list(2,2,1,1),i,j,k,h,m),16),size(l)); 478 } 479 for (n=0;n<=r;n++) 480 { 481 if (k <> h and h <> m and m <> n) 482 { 483 l = insert(l,list(graph51(list(2,1,1,1,1),i,j,k,h,m,n),2),size(l)); 484 l = insert(l,list(graph51(list(1,2,1,1,1),i,j,k,h,m,n),2),size(l)); 485 l = insert(l,list(graph51(list(1,1,2,1,1),i,j,k,h,m,n),4),size(l)); 486 } 487 if (k <> h and h <> m and h <> n) 488 { 489 l = insert(l,list(graph52(list(2,1,1,1,1),i,j,k,h,m,n),4),size(l)); 490 l = insert(l,list(graph52(list(1,2,1,1,1),i,j,k,h,m,n),4),size(l)); 491 l = insert(l,list(graph52(list(1,1,2,1,1),i,j,k,h,m,n),4),size(l)); 492 l = insert(l,list(graph52(list(1,1,1,2,1),i,j,k,h,m,n),2),size(l)); 493 } 494 if (k <> h and k <> m and k <> n) 495 { 496 l = insert(l,list(graph53(list(2,1,1,1,1),i,j,k,h,m,n),12),size(l)); 497 l = insert(l,list(graph53(list(1,2,1,1,1),i,j,k,h,m,n),12),size(l)); 498 l = insert(l,list(graph53(list(1,1,2,1,1),i,j,k,h,m,n),4),size(l)); 499 } 500 if (j <> h and h <> m and h <> n) 501 { 502 l = insert(l,list(graph54(list(2,1,1,1,1),i,j,k,h,m,n),4),size(l)); 503 l = insert(l,list(graph54(list(1,1,2,1,1),i,j,k,h,m,n),16),size(l)); 504 } 505 if (k <> h and k <> m and h <> n) 506 { 507 l = insert(l,list(graph55(list(2,1,1,1,1),i,j,k,h,m,n),2),size(l)); 508 l = insert(l,list(graph55(list(1,2,1,1,1),i,j,k,h,m,n),2),size(l)); 509 l = insert(l,list(graph55(list(1,1,1,2,1),i,j,k,h,m,n),4),size(l)); 510 } 511 if (j <> h and j <> m and j <> n) 512 { 513 l = insert(l,list(graph56(list(2,1,1,1,1),i,j,k,h,m,n),48),size(l)); 514 } 515 for (p=0;p<=r;p++) 516 { 517 if (k <> h and h <> m and m <> n and n <> p) 518 { 519 l = insert(l,list(graph61(list(1,1,1,1,1,1),i,j,k,h,m,n,p),2),size(l)); 520 } 521 if (k <> h and h <> m and m <> n and m <> p) 522 { 523 l = insert(l,list(graph62(list(1,1,1,1,1,1),i,j,k,h,m,n,p),2),size(l)); 524 } 525 if (k <> h and h <> m and h <> n and n <> p) 526 { 527 l = insert(l,list(graph63(list(1,1,1,1,1,1),i,j,k,h,m,n,p),1),size(l)); 528 } 529 if (k <> h and h <> m and h <> n and h <> p) 530 { 531 l = insert(l,list(graph64(list(1,1,1,1,1,1),i,j,k,h,m,n,p),6),size(l)); 532 } 533 if (k <> h and k <> m and k <> n and n <> p) 534 { 535 l = insert(l,list(graph65(list(1,1,1,1,1,1),i,j,k,h,m,n,p),4),size(l)); 536 } 537 if (k <> h and k <> m and m <> p and h <> n) 538 { 539 l = insert(l,list(graph66(list(1,1,1,1,1,1),i,j,k,h,m,n,p),6),size(l)); 540 } 541 if (j <> h and h <> m and m <> n and m <> p) 542 { 543 l = insert(l,list(graph67(list(1,1,1,1,1,1),i,j,k,h,m,n,p),8),size(l)); 544 } 545 if (j <> h and h <> m and h <> n and h <> p) 546 { 547 l = insert(l,list(graph68(list(1,1,1,1,1,1),i,j,k,h,m,n,p),12),size(l)); 548 } 549 if (j <> h and h <> m and h <> n and n <> p) 550 { 551 l = insert(l,list(graph69(list(1,1,1,1,1,1),i,j,k,h,m,n,p),2),size(l)); 552 } 553 if (k <> h and k <> m and k <> n and k <> p) 554 { 555 l = insert(l,list(graph610(list(1,1,1,1,1,1),i,j,k,h,m,n,p),24),size(l)); 556 } 557 if (j <> h and j <> m and j <> n and j <> p) 558 { 559 l = insert(l,list(graph611(list(1,1,1,1,1,1),i,j,k,h,m,n,p),720),size(l)); 560 } 561 } 562 } 563 } 564 } 565 } 566 } 567 } 568 } 569 } 570 return (l); 571 } 572 example 573 { 574 "EXAMPLE:"; echo=2; 575 ring r = 0,(x),dp; 576 variety P = projectiveSpace(4); 577 stack M = moduliSpace(P,2); 578 def F = fixedPoints(M); 579 size(F); 580 typeof(F[1]) == "list"; 581 typeof(F[1][1]) == "graph"; 582 typeof(F[1][2]) == "int"; 583 } 584 585 static proc torusList(variety P) 586 "USAGE: torusList(P); P variety 587 RETURN: list 588 INPUT: P is a projective space 589 OUTPUT: a list of numbers 590 THEORY: This is a procedure concerning the enumeration of rational curves. 591 KEYWORDS: torus action 592 EXAMPLE: example torusList; shows an example 593 " 594 { 595 int i; 596 int n = P.dimension; 597 list l; 598 for (i=0;i<=n;i++) 599 { 600 l = insert(l,number(5^i),size(l)); 601 } 602 return (l); 603 } 604 example 605 { 606 "EXAMPLE:"; echo=2; 607 ring r = 0,(x),dp; 608 variety P = projectiveSpace(4); 609 def L = torusList(P); 610 L; 611 } 612 613 proc contributionBundle(stack M, graph G, list #) 614 "USAGE: contributionBundle(M,G,#); M stack, G graph, # list 615 RETURN: number 616 INPUT: M is a moduli space of stable maps, G is a graph, # is a list. 617 OUTPUT: a number corresponding to the contribution bundle on a moduli space 618 of stable maps at a fixed point component (graph) 619 KEYWORDS: contribution bundle, graph, multiple cover, rational curve, 620 SEE ALSO: normalBundle 621 EXAMPLE: example contributionBundle; shows an example 622 " 623 { 624 def R = basering; 625 setring R; 626 int i,j,a; 627 variety P = M.currentVariety; 628 def L = torusList(P); 629 int r = P.dimension; 630 int d; 631 if (size(#)==0) {d = 2*r  3;} 632 else 633 { 634 if (typeof(#[1]) == "int") {d = #[1];} 635 else {Error("invalid optional argument");} 636 } 637 list e = G.edges; 638 list v = G.vertices; 639 number E = 1; 640 number V = 1; 641 if (r == 1) 642 { 643 for (i=1;i<=size(v);i++) 644 { 645 V = V*(L[v[i][1]+1])^(v[i][2]1); 646 } 647 for (j=1;j<=size(e);j++) 648 { 649 number f = 1; 650 if (e[j][3]<>1) 651 { 652 for (a=1;a<e[j][3];a++) 653 { 654 f=f*(a*L[e[j][1]+1](e[j][3]a)*L[e[j][2]+1])/e[j][3]; 655 } 656 } 657 E = E*f; 658 kill f; 659 } 660 return ((E*V)^2); 661 } 662 else 663 { 664 for (i=1;i<=size(v);i++) 665 { 666 V = V*((d*L[v[i][1]+1])^(v[i][2]1)); 667 } 668 for (j=1;j<=size(e);j++) 669 { 670 number f = 1; 671 for (a=0;a<=d*e[j][3];a++) 672 { 673 f = f*((a*L[e[j][1]+1]+(d*e[j][3]a)*L[e[j][2]+1])/e[j][3]); 674 } 675 E = E*f; 676 kill f; 677 } 678 return (E/V); 679 } 680 } 681 example 682 { 683 "EXAMPLE:"; echo=2; 684 ring r = 0,(x),dp; 685 variety P = projectiveSpace(4); 686 stack M = moduliSpace(P,2); 687 def F = fixedPoints(M); 688 graph G = F[1][1]; 689 number f = contributionBundle(M,G); 690 number g = contributionBundle(M,G,5); 691 f == g; 692 } 693 694 proc normalBundle(stack M, graph G) 695 "USAGE: normalBundle(M,G); M stack, G graph 696 RETURN: number 697 INPUT: M is a moduli space of stable maps, G is a graph 698 OUTPUT: a number corresponding to the normal bundle on a moduli space of 699 stable maps at a graph 700 KEYWORDS: normal bundle, graph, rational curves, mutiple covers, lines on 701 hypersurfaces 702 SEE ALSO: contributionBundle 703 EXAMPLE: example normalBundle; shows an example 704 { 705 def R = basering; 706 setring R; 707 variety P = M.currentVariety; 708 def L = torusList(P); 709 int n = P.dimension; 710 list e = G.edges; 711 list v = G.vertices; 712 int i,j,k,h,b,m,a; 713 number N = 1; 714 for (j=1;j<=size(e);j++) 715 { 716 int d = e[j][3]; 717 number c = (1)^d*factorial(d)^2; 718 number y = c*(L[e[j][1]+1]L[e[j][2]+1])^(2*d)/(d^(2*d)); 719 for (k=0;k<=n;k++) 720 { 721 if (k <> e[j][1] and k <> e[j][2]) 722 { 723 for (a=0;a<=d;a++) 724 { 725 y=y*((a*L[e[j][1]+1]+(da)*L[e[j][2]+1])/d  L[k+1]); 726 } 727 } 728 } 729 N = N*y; 730 kill y,d,c; 731 } 732 for (i=1;i<=size(v);i++) 733 { 734 number F = 1; 735 for (h=3;h<=size(v[i]);h++) 736 { 737 F = F*(L[v[i][h][1]+1]L[v[i][h][2]+1])/v[i][h][3]; 738 } 739 if (v[i][2] == 1) 740 { 741 N = N/F; 742 kill F; 743 } 744 else 745 { 746 number z = 1; 747 for (m=0;m<=n;m++) 748 { 749 if (m<>v[i][1]) 750 { 751 z = z*(L[v[i][1]+1]L[m+1]); 752 } 753 } 754 if (v[i][2] == 3) 755 { 756 N = N*F/z^2; 757 kill F,z; 758 } 759 else 760 { 761 number g = 0; 762 for (b=3;b<=size(v[i]);b++) 763 { 764 g = g + v[i][b][3]/(L[v[i][b][1]+1]L[v[i][b][2]+1]); 765 } 766 N = N*F*g^(3v[i][2])/(z^(v[i][2]1)); 767 kill g,F,z; 768 } 769 } 770 } 771 return (N); 772 } 773 example 774 { 775 "EXAMPLE:"; echo=2; 776 ring r = 0,(x),dp; 777 variety P = projectiveSpace(4); 778 stack M = moduliSpace(P,2); 779 def F = fixedPoints(M); 780 graph G = F[1][1]; 781 number f = normalBundle(M,G); 782 f <> 0; 783 } 784 785 proc multipleCover(int d) 786 "USAGE: multipleCover(d); d int 787 RETURN: number 788 THEORY: This is the contribution of degree d multiple covers of a smooth 789 rational curve as a GromovWitten invariant. 790 KEYWORDS: GromovWitten invariants, multiple covers 791 SEE ALSO: rationalCurve, linesHypersurface 792 EXAMPLE: example multipleCover; shows an example 793 " 794 { 795 def R = basering; 796 setring R; 797 variety P = projectiveSpace(1); 798 stack M = moduliSpace(P,d); 799 def F = fixedPoints(M); 800 int i; 801 number r = 0; 802 for (i=1;i<=size(F);i++) 803 { 804 graph G = F[i][1]; 805 number s = contributionBundle(M,G); 806 number t = F[i][2]*normalBundle(M,G); 807 r = r + s/t; 808 kill s,t,G; 809 } 810 return (r); 811 } 812 example 813 { 814 "EXAMPLE:"; echo=2; 815 ring r = 0,(x),dp; 816 multipleCover(1); 817 multipleCover(2); 818 multipleCover(3); 819 multipleCover(4); 820 multipleCover(5); 821 } 822 823 proc linesHypersurface(int n) 824 "USAGE: linesHypersurface(n); n int 825 RETURN: number 826 THEORY: This is the number of lines on a general hypersurface of degree 827 d = 2n3 in an ndimensional projective space. 828 KEYWORDS: GromovWitten invariants, lines on hypersurfaces 829 SEE ALSO: linesHypersurface, multipleCover 830 EXAMPLE: example linesHypersurface; shows an example 831 " 832 { 833 def R = basering; 834 setring R; 835 variety P = projectiveSpace(n); 836 stack M = moduliSpace(P,1); 837 def F = fixedPoints(M); 838 int i; 839 poly r = 0; 840 for (i=1;i<=size(F);i++) 841 { 842 graph G = F[i][1]; 843 number s = contributionBundle(M,G); 844 number t = F[i][2]*normalBundle(M,G); 845 r = r + s/t; 846 kill s,t,G; 847 } 848 return (r); 849 } 850 example 851 { 852 "EXAMPLE:"; echo=2; 853 ring r = 0,(x),dp; 854 linesHypersurface(2); 855 linesHypersurface(3); 856 linesHypersurface(4); 857 linesHypersurface(5); 858 linesHypersurface(6); 859 linesHypersurface(7); 860 linesHypersurface(8); 861 linesHypersurface(9); 862 linesHypersurface(10); 863 } 864 865 proc rationalCurve(int d, list #) 866 "USAGE: rationalCurve(d,#); d int, # list 867 RETURN: number 868 THEORY: This is the GromovWitten invariant corresponding the number of 869 rational curves on a general CalabiYau threefold. 870 KEYWORDS: GromovWitten invariants, rational curves on CalabiYau threefolds 871 SEE ALSO: linesHypersurface, multipleCover 872 EXAMPLE: example rationalCurve; shows an example 873 " 874 { 875 def R = basering; 876 setring R; 877 int n,i,j; 878 if (size(#) == 0) {n = 4; list l = 5;} 879 else {n = size(#)+3; list l = #;} 880 variety P = projectiveSpace(n); 881 stack M = moduliSpace(P,d); 882 def F = fixedPoints(M); 883 number r = 0; 884 for (i=1;i<=size(F);i++) 885 { 886 graph G = F[i][1]; 887 number s = 1; 888 for (j=1;j<=size(l);j++) 889 { 890 s = s*contributionBundle(M,G,list(l[j])); 891 } 892 number t = F[i][2]*normalBundle(M,G); 893 r = r + s/t; 894 kill s,t,G; 895 } 896 return (r); 897 } 898 example 899 { 900 "EXAMPLE:"; echo=2; 901 ring r = 0,(x),dp; 902 rationalCurve(1); 903 /* 904 rationalCurve(2); 905 rationalCurve(3); 906 rationalCurve(4); 907 rationalCurve(5); 908 rationalCurve(1,list(4,2)); 909 rationalCurve(1,list(3,3)); 910 rationalCurve(1,list(3,2,2)); 911 rationalCurve(1,list(2,2,2,2)); 912 rationalCurve(2,list(4,2)); 913 rationalCurve(2,list(3,3)); 914 rationalCurve(2,list(3,2,2)); 915 rationalCurve(2,list(2,2,2,2)); 916 rationalCurve(3,list(4,2)); 917 rationalCurve(3,list(3,3)); 918 rationalCurve(3,list(3,2,2)); 919 rationalCurve(3,list(2,2,2,2)); 920 rationalCurve(4,list(4,2)); 921 rationalCurve(4,list(3,3)); 922 rationalCurve(4,list(3,2,2)); 923 rationalCurve(4,list(2,2,2,2)); 924 rationalCurve(5,list(4,2)); 925 rationalCurve(5,list(3,3)); 926 rationalCurve(5,list(3,2,2)); 927 rationalCurve(5,list(2,2,2,2)); 928 */ 929 } 930 931 //////////////////////////////////////////////////////////////////////////////// 932 /////////// Procedures concerned with graphs /////////////////////////////////// 933 //////////////////////////////////////////////////////////////////////////////// 934 935 proc printGraph(graph G) 936 "USAGE: printGraph(G); G graph 937 ASSUME: G is a graph. 938 THEORY: This is the print function used by Singular to print a graph. 939 KEYWORDS: graph 940 EXAMPLE: example printGraph; shows an example 941 " 942 { 943 "A graph with", size(G.vertices), "vertices and", size(G.edges), "edges"; 944 } 945 example 946 { 947 "EXAMPLE:"; echo=2; 948 ring R=(0,x1,x2,x3,x4),(q1,q2,q3,q4,q5,q6),dp; 949 graph G = makeGraph(list(list(0,1,list(0,1,2)),list(1,1,list(1,0,2))), 950 list(list(0,1,2))); 951 G; 952 } 953 954 proc makeGraph(list v, list e) 955 "USAGE: makeGraph(v,e); v list, e list 956 ASSUME: v is a list of vertices, e is a list of edges. 957 RETURN: graph with vertices v and edges e. 958 THEORY: Creates a graph from a list of vertices and edges. 959 KEYWORDS: graph 960 EXAMPLE: example makeGraph; shows an example 961 { 962 graph G; 963 G.vertices = v; 964 G.edges = e; 965 return(G); 966 } 967 example 968 { 969 "EXAMPLE:"; echo=2; 970 ring R=(0,x1,x2,x3,x4),(q1,q2,q3,q4,q5,q6),dp; 971 graph G = makeGraph(list(list(0,1,list(0,1,2)),list(1,1,list(1,0,2))), 972 list(list(0,1,2))); 973 G; 974 } 975 976 static proc graph1(int d, int i, int j) 977 { 978 graph G; 979 list f1 = i,j,d; 980 list f2 = j,i,d; 981 list v1 = i,1,f1; 982 list v2 = j,1,f2; 983 G.vertices = v1,v2; 984 G.edges = list(f1); 985 return (G); 986 } 987 988 static proc graph2(list d, int i, int j, int k) 989 { 990 graph G; 991 list f1 = i,j,d[1]; 992 list f2 = j,i,d[1]; 993 list f3 = j,k,d[2]; 994 list f4 = k,j,d[2]; 995 list v1 = i,1,f1; 996 list v2 = j,2,f2,f3; 997 list v3 = k,1,f4; 998 G.vertices = v1,v2,v3; 999 G.edges = f1,f3; 1000 return (G); 1001 } 1002 1003 static proc graph31(list d, int i, int j, int k, int h) 1004 { 1005 graph G; 1006 list f1 = i,j,d[1]; 1007 list f2 = j,i,d[1]; 1008 list f3 = j,k,d[2]; 1009 list f4 = k,j,d[2]; 1010 list f5 = k,h,d[3]; 1011 list f6 = h,k,d[3]; 1012 list v1 = i,1,f1; 1013 list v2 = j,2,f2,f3; 1014 list v3 = k,2,f4,f5; 1015 list v4 = h,1,f6; 1016 G.vertices = v1,v2,v3,v4; 1017 G.edges = f1,f3,f5; 1018 return (G); 1019 } 1020 1021 static proc graph32(list d, int i, int j, int k, int h) 1022 { 1023 graph G; 1024 list f1 = i,j,d[1]; 1025 list f2 = j,i,d[1]; 1026 list f3 = j,k,d[2]; 1027 list f4 = j,h,d[3]; 1028 list f5 = k,j,d[2]; 1029 list f6 = h,j,d[3]; 1030 list v1 = i,1,f1; 1031 list v2 = j,3,f2,f3,f4; 1032 list v3 = k,1,f5; 1033 list v4 = h,1,f6; 1034 G.vertices = v1,v2,v3,v4; 1035 G.edges = f1,f3,f4; 1036 return (G); 1037 } 1038 1039 static proc graph41(list d, int i, int j, int k, int h, int l) 1040 { 1041 graph G; 1042 list f1 = i,j,d[1]; 1043 list f2 = j,i,d[1]; 1044 list f3 = j,k,d[2]; 1045 list f4 = k,j,d[2]; 1046 list f5 = k,h,d[3]; 1047 list f6 = h,k,d[3]; 1048 list f7 = h,l,d[4]; 1049 list f8 = l,h,d[4]; 1050 list v1 = i,1,f1; 1051 list v2 = j,2,f2,f3; 1052 list v3 = k,2,f4,f5; 1053 list v4 = h,2,f6,f7; 1054 list v5 = l,1,f8; 1055 G.vertices = v1,v2,v3,v4,v5; 1056 G.edges = f1,f3,f5,f7; 1057 return (G); 1058 } 1059 1060 static proc graph42(list d, int i, int j, int k, int h, int l) 1061 { 1062 graph G; 1063 list f1 = i,j,d[1]; 1064 list f2 = j,i,d[1]; 1065 list f3 = j,k,d[2]; 1066 list f4 = k,j,d[2]; 1067 list f5 = k,h,d[3]; 1068 list f6 = k,l,d[4]; 1069 list f7 = h,k,d[3]; 1070 list f8 = l,k,d[4]; 1071 list v1 = i,1,f1; 1072 list v2 = j,2,f2,f3; 1073 list v3 = k,3,f4,f5,f6; 1074 list v4 = h,1,f7; 1075 list v5 = l,1,f8; 1076 G.vertices = v1,v2,v3,v4,v5; 1077 G.edges = f1,f3,f5,f6; 1078 return (G); 1079 } 1080 1081 static proc graph43(list d, int i, int j, int k, int h, int l) 1082 { 1083 graph G; 1084 list f1 = i,j,d[1]; 1085 list f2 = j,i,d[1]; 1086 list f3 = j,k,d[2]; 1087 list f4 = j,h,d[3]; 1088 list f5 = j,l,d[4]; 1089 list f6 = k,j,d[2]; 1090 list f7 = h,j,d[3]; 1091 list f8 = l,j,d[4]; 1092 list v1 = i,1,f1; 1093 list v2 = j,4,f2,f3,f4,f5; 1094 list v3 = k,1,f6; 1095 list v4 = h,1,f7; 1096 list v5 = l,1,f8; 1097 G.vertices = v1,v2,v3,v4,v5; 1098 G.edges = f1,f3,f4,f5; 1099 return (G); 1100 } 1101 1102 static proc graph51(list d, int i, int j, int k, int h, int m, int n) 1103 { 1104 graph G; 1105 list f1 = i,j,d[1]; 1106 list f2 = j,i,d[1]; 1107 list f3 = j,k,d[2]; 1108 list f4 = k,j,d[2]; 1109 list f5 = k,h,d[3]; 1110 list f6 = h,k,d[3]; 1111 list f7 = h,m,d[4]; 1112 list f8 = m,h,d[4]; 1113 list f9 = m,n,d[5]; 1114 list f10 = n,m,d[5]; 1115 list v1 = i,1,f1; 1116 list v2 = j,2,f2,f3; 1117 list v3 = k,2,f4,f5; 1118 list v4 = h,2,f6,f7; 1119 list v5 = m,2,f8,f9; 1120 list v6 = n,1,f10; 1121 G.vertices = v1,v2,v3,v4,v5,v6; 1122 G.edges = f1,f3,f5,f7,f9; 1123 return (G); 1124 } 1125 1126 static proc graph52(list d, int i, int j, int k, int h, int m, int n) 1127 { 1128 graph G; 1129 list f1 = i,j,d[1]; 1130 list f2 = j,i,d[1]; 1131 list f3 = j,k,d[2]; 1132 list f4 = k,j,d[2]; 1133 list f5 = k,h,d[3]; 1134 list f6 = h,k,d[3]; 1135 list f7 = h,m,d[4]; 1136 list f8 = m,h,d[4]; 1137 list f9 = h,n,d[5]; 1138 list f10 = n,h,d[5]; 1139 list v1 = i,1,f1; 1140 list v2 = j,2,f2,f3; 1141 list v3 = k,2,f4,f5; 1142 list v4 = h,3,f6,f7,f9; 1143 list v5 = m,1,f8; 1144 list v6 = n,1,f10; 1145 G.vertices = v1,v2,v3,v4,v5,v6; 1146 G.edges = f1,f3,f5,f7,f9; 1147 return (G); 1148 } 1149 1150 static proc graph53(list d, int i, int j, int k, int h, int m, int n) 1151 { 1152 graph G; 1153 list f1 = i,j,d[1]; 1154 list f2 = j,i,d[1]; 1155 list f3 = j,k,d[2]; 1156 list f4 = k,j,d[2]; 1157 list f5 = k,h,d[3]; 1158 list f6 = h,k,d[3]; 1159 list f7 = k,m,d[4]; 1160 list f8 = m,k,d[4]; 1161 list f9 = k,n,d[5]; 1162 list f10 = n,k,d[5]; 1163 list v1 = i,1,f1; 1164 list v2 = j,2,f2,f3; 1165 list v3 = k,4,f4,f5,f7,f9; 1166 list v4 = h,1,f6; 1167 list v5 = m,1,f8; 1168 list v6 = n,1,f10; 1169 G.vertices = v1,v2,v3,v4,v5,v6; 1170 G.edges = f1,f3,f5,f7,f9; 1171 return (G); 1172 } 1173 1174 static proc graph54(list d, int i, int j, int k, int h, int m, int n) 1175 { 1176 graph G; 1177 list f1 = i,j,d[1]; 1178 list f2 = j,i,d[1]; 1179 list f3 = j,k,d[2]; 1180 list f4 = k,j,d[2]; 1181 list f5 = j,h,d[3]; 1182 list f6 = h,j,d[3]; 1183 list f7 = h,m,d[4]; 1184 list f8 = m,h,d[4]; 1185 list f9 = h,n,d[5]; 1186 list f10 = n,h,d[5]; 1187 list v1 = i,1,f1; 1188 list v2 = j,3,f2,f3,f5; 1189 list v3 = k,1,f4; 1190 list v4 = h,3,f6,f7,f9; 1191 list v5 = m,1,f8; 1192 list v6 = n,1,f10; 1193 G.vertices = v1,v2,v3,v4,v5,v6; 1194 G.edges = f1,f3,f5,f7,f9; 1195 return (G); 1196 } 1197 1198 static proc graph55(list d, int i, int j, int k, int h, int m, int n) 1199 { 1200 graph G; 1201 list f1 = i,j,d[1]; 1202 list f2 = j,i,d[1]; 1203 list f3 = j,k,d[2]; 1204 list f4 = k,j,d[2]; 1205 list f5 = k,h,d[3]; 1206 list f6 = h,k,d[3]; 1207 list f7 = k,m,d[4]; 1208 list f8 = m,k,d[4]; 1209 list f9 = h,n,d[5]; 1210 list f10 = n,h,d[5]; 1211 list v1 = i,1,f1; 1212 list v2 = j,2,f2,f3; 1213 list v3 = k,3,f4,f5,f7; 1214 list v4 = h,2,f6,f9; 1215 list v5 = m,1,f8; 1216 list v6 = n,1,f10; 1217 G.vertices = v1,v2,v3,v4,v5,v6; 1218 G.edges = f1,f3,f5,f7,f9; 1219 return (G); 1220 } 1221 1222 static proc graph56(list d, int i, int j, int k, int h, int m, int n) 1223 { 1224 graph G; 1225 list f1 = i,j,d[1]; 1226 list f2 = j,i,d[1]; 1227 list f3 = j,k,d[2]; 1228 list f4 = k,j,d[2]; 1229 list f5 = j,h,d[3]; 1230 list f6 = h,j,d[3]; 1231 list f7 = j,m,d[4]; 1232 list f8 = m,j,d[4]; 1233 list f9 = j,n,d[5]; 1234 list f10 = n,j,d[5]; 1235 list v1 = i,1,f1; 1236 list v2 = j,5,f2,f3,f5,f7,f9; 1237 list v3 = k,1,f4; 1238 list v4 = h,1,f6; 1239 list v5 = m,1,f8; 1240 list v6 = n,1,f10; 1241 G.vertices = v1,v2,v3,v4,v5,v6; 1242 G.edges = f1,f3,f5,f7,f9; 1243 return (G); 1244 } 1245 1246 static proc graph61(list d, int i, int j, int k, int h, int m, int n, int p) 1247 { 1248 graph G; 1249 list f1 = i,j,d[1]; 1250 list f2 = j,i,d[1]; 1251 list f3 = j,k,d[2]; 1252 list f4 = k,j,d[2]; 1253 list f5 = k,h,d[3]; 1254 list f6 = h,k,d[3]; 1255 list f7 = h,m,d[4]; 1256 list f8 = m,h,d[4]; 1257 list f9 = m,n,d[5]; 1258 list f10 = n,m,d[5]; 1259 list f11 = n,p,d[6]; 1260 list f12 = p,n,d[6]; 1261 list v1 = i,1,f1; 1262 list v2 = j,2,f2,f3; 1263 list v3 = k,2,f4,f5; 1264 list v4 = h,2,f6,f7; 1265 list v5 = m,2,f8,f9; 1266 list v6 = n,2,f10,f11; 1267 list v7 = p,1,f12; 1268 G.vertices = v1,v2,v3,v4,v5,v6,v7; 1269 G.edges = f1,f3,f5,f7,f9,f11; 1270 return (G); 1271 } 1272 1273 static proc graph62(list d, int i, int j, int k, int h, int m, int n, int p) 1274 { 1275 graph G; 1276 list f1 = i,j,d[1]; 1277 list f2 = j,i,d[1]; 1278 list f3 = j,k,d[2]; 1279 list f4 = k,j,d[2]; 1280 list f5 = k,h,d[3]; 1281 list f6 = h,k,d[3]; 1282 list f7 = h,m,d[4]; 1283 list f8 = m,h,d[4]; 1284 list f9 = m,n,d[5]; 1285 list f10 = n,m,d[5]; 1286 list f11 = m,p,d[6]; 1287 list f12 = p,m,d[6]; 1288 list v1 = i,1,f1; 1289 list v2 = j,2,f2,f3; 1290 list v3 = k,2,f4,f5; 1291 list v4 = h,2,f6,f7; 1292 list v5 = m,3,f8,f9,f11; 1293 list v6 = n,1,f10; 1294 list v7 = p,1,f12; 1295 G.vertices = v1,v2,v3,v4,v5,v6,v7; 1296 G.edges = f1,f3,f5,f7,f9,f11; 1297 return (G); 1298 } 1299 1300 static proc graph63(list d, int i, int j, int k, int h, int m, int n, int p) 1301 { 1302 graph G; 1303 list f1 = i,j,d[1]; 1304 list f2 = j,i,d[1]; 1305 list f3 = j,k,d[2]; 1306 list f4 = k,j,d[2]; 1307 list f5 = k,h,d[3]; 1308 list f6 = h,k,d[3]; 1309 list f7 = h,m,d[4]; 1310 list f8 = m,h,d[4]; 1311 list f9 = h,n,d[5]; 1312 list f10 = n,h,d[5]; 1313 list f11 = n,p,d[6]; 1314 list f12 = p,n,d[6]; 1315 list v1 = i,1,f1; 1316 list v2 = j,2,f2,f3; 1317 list v3 = k,2,f4,f5; 1318 list v4 = h,3,f6,f7,f9; 1319 list v5 = m,1,f8; 1320 list v6 = n,2,f10,f11; 1321 list v7 = p,1,f12; 1322 G.vertices = v1,v2,v3,v4,v5,v6,v7; 1323 G.edges = f1,f3,f5,f7,f9,f11; 1324 return (G); 1325 } 1326 1327 static proc graph64(list d, int i, int j, int k, int h, int m, int n, int p) 1328 { 1329 graph G; 1330 list f1 = i,j,d[1]; 1331 list f2 = j,i,d[1]; 1332 list f3 = j,k,d[2]; 1333 list f4 = k,j,d[2]; 1334 list f5 = k,h,d[3]; 1335 list f6 = h,k,d[3]; 1336 list f7 = h,m,d[4]; 1337 list f8 = m,h,d[4]; 1338 list f9 = h,n,d[5]; 1339 list f10 = n,h,d[5]; 1340 list f11 = h,p,d[6]; 1341 list f12 = p,h,d[6]; 1342 list v1 = i,1,f1; 1343 list v2 = j,2,f2,f3; 1344 list v3 = k,2,f4,f5; 1345 list v4 = h,4,f6,f7,f9,f11; 1346 list v5 = m,1,f8; 1347 list v6 = n,1,f10; 1348 list v7 = p,1,f12; 1349 G.vertices = v1,v2,v3,v4,v5,v6,v7; 1350 G.edges = f1,f3,f5,f7,f9,f11; 1351 return (G); 1352 } 1353 1354 static proc graph65(list d, int i, int j, int k, int h, int m, int n, int p) 1355 { 1356 graph G; 1357 list f1 = i,j,d[1]; 1358 list f2 = j,i,d[1]; 1359 list f3 = j,k,d[2]; 1360 list f4 = k,j,d[2]; 1361 list f5 = k,h,d[3]; 1362 list f6 = h,k,d[3]; 1363 list f7 = k,m,d[4]; 1364 list f8 = m,k,d[4]; 1365 list f9 = k,n,d[5]; 1366 list f10 = n,k,d[5]; 1367 list f11 = n,p,d[6]; 1368 list f12 = p,n,d[6]; 1369 list v1 = i,1,f1; 1370 list v2 = j,2,f2,f3; 1371 list v3 = k,4,f4,f5,f7,f9; 1372 list v4 = h,1,f6; 1373 list v5 = m,1,f8; 1374 list v6 = n,2,f10,f11; 1375 list v7 = p,1,f12; 1376 G.vertices = v1,v2,v3,v4,v5,v6,v7; 1377 G.edges = f1,f3,f5,f7,f9,f11; 1378 return (G); 1379 } 1380 1381 static proc graph66(list d, int i, int j, int k, int h, int m, int n, int p) 1382 { 1383 graph G; 1384 list f1 = i,j,d[1]; 1385 list f2 = j,i,d[1]; 1386 list f3 = j,k,d[2]; 1387 list f4 = k,j,d[2]; 1388 list f5 = k,h,d[3]; 1389 list f6 = h,k,d[3]; 1390 list f7 = k,m,d[4]; 1391 list f8 = m,k,d[4]; 1392 list f9 = h,n,d[5]; 1393 list f10 = n,h,d[5]; 1394 list f11 = m,p,d[6]; 1395 list f12 = p,m,d[6]; 1396 list v1 = i,1,f1; 1397 list v2 = j,2,f2,f3; 1398 list v3 = k,3,f4,f5,f7; 1399 list v4 = h,2,f6,f9; 1400 list v5 = m,1,f8,f11; 1401 list v6 = n,1,f10; 1402 list v7 = p,1,f12; 1403 G.vertices = v1,v2,v3,v4,v5,v6,v7; 1404 G.edges = f1,f3,f5,f7,f9,f11; 1405 return (G); 1406 } 1407 1408 static proc graph67(list d, int i, int j, int k, int h, int m, int n, int p) 1409 { 1410 graph G; 1411 list f1 = i,j,d[1]; 1412 list f2 = j,i,d[1]; 1413 list f3 = j,k,d[2]; 1414 list f4 = k,j,d[2]; 1415 list f5 = j,h,d[3]; 1416 list f6 = h,j,d[3]; 1417 list f7 = h,m,d[4]; 1418 list f8 = m,h,d[4]; 1419 list f9 = m,n,d[5]; 1420 list f10 = n,m,d[5]; 1421 list f11 = m,p,d[6]; 1422 list f12 = p,m,d[6]; 1423 list v1 = i,1,f1; 1424 list v2 = j,3,f2,f3,f5; 1425 list v3 = k,1,f4; 1426 list v4 = h,2,f6,f7; 1427 list v5 = m,3,f8,f9,f11; 1428 list v6 = n,1,f10; 1429 list v7 = p,1,f12; 1430 G.vertices = v1,v2,v3,v4,v5,v6,v7; 1431 G.edges = f1,f3,f5,f7,f9,f11; 1432 return (G); 1433 } 1434 1435 static proc graph68(list d, int i, int j, int k, int h, int m, int n, int p) 1436 { 1437 graph G; 1438 list f1 = i,j,d[1]; 1439 list f2 = j,i,d[1]; 1440 list f3 = j,k,d[2]; 1441 list f4 = k,j,d[2]; 1442 list f5 = j,h,d[3]; 1443 list f6 = h,j,d[3]; 1444 list f7 = h,m,d[4]; 1445 list f8 = m,h,d[4]; 1446 list f9 = h,n,d[5]; 1447 list f10 = n,h,d[5]; 1448 list f11 = h,p,d[6]; 1449 list f12 = p,h,d[6]; 1450 list v1 = i,1,f1; 1451 list v2 = j,3,f2,f3,f5; 1452 list v3 = k,1,f4; 1453 list v4 = h,4,f6,f7,f9,f11; 1454 list v5 = m,1,f8; 1455 list v6 = n,1,f10; 1456 list v7 = p,1,f12; 1457 G.vertices = v1,v2,v3,v4,v5,v6,v7; 1458 G.edges = f1,f3,f5,f7,f9,f11; 1459 return (G); 1460 } 1461 1462 static proc graph69(list d, int i, int j, int k, int h, int m, int n, int p) 1463 { 1464 graph G; 1465 list f1 = i,j,d[1]; 1466 list f2 = j,i,d[1]; 1467 list f3 = j,k,d[2]; 1468 list f4 = k,j,d[2]; 1469 list f5 = j,h,d[3]; 1470 list f6 = h,j,d[3]; 1471 list f7 = h,m,d[4]; 1472 list f8 = m,h,d[4]; 1473 list f9 = h,n,d[5]; 1474 list f10 = n,h,d[5]; 1475 list f11 = n,p,d[6]; 1476 list f12 = p,n,d[6]; 1477 list v1 = i,1,f1; 1478 list v2 = j,3,f2,f3,f5; 1479 list v3 = k,1,f4; 1480 list v4 = h,3,f6,f7,f9; 1481 list v5 = m,1,f8; 1482 list v6 = n,2,f10,f11; 1483 list v7 = p,1,f12; 1484 G.vertices = v1,v2,v3,v4,v5,v6,v7; 1485 G.edges = f1,f3,f5,f7,f9,f11; 1486 return (G); 1487 } 1488 1489 static proc graph610(list d, int i, int j, int k, int h, int m, int n, int p) 1490 { 1491 graph G; 1492 list f1 = i,j,d[1]; 1493 list f2 = j,i,d[1]; 1494 list f3 = j,k,d[2]; 1495 list f4 = k,j,d[2]; 1496 list f5 = k,h,d[3]; 1497 list f6 = h,k,d[3]; 1498 list f7 = k,m,d[4]; 1499 list f8 = m,k,d[4]; 1500 list f9 = k,n,d[5]; 1501 list f10 = n,k,d[5]; 1502 list f11 = k,p,d[6]; 1503 list f12 = p,k,d[6]; 1504 list v1 = i,1,f1; 1505 list v2 = j,2,f2,f3; 1506 list v3 = k,5,f4,f5,f7,f9,f11; 1507 list v4 = h,1,f6; 1508 list v5 = m,1,f8; 1509 list v6 = n,1,f10; 1510 list v7 = p,1,f12; 1511 G.vertices = v1,v2,v3,v4,v5,v6,v7; 1512 G.edges = f1,f3,f5,f7,f9,f11; 1513 return (G); 1514 } 1515 1516 static proc graph611(list d, int i, int j, int k, int h, int m, int n, int p) 1517 { 1518 graph G; 1519 list f1 = i,j,d[1]; 1520 list f2 = j,i,d[1]; 1521 list f3 = j,k,d[2]; 1522 list f4 = k,j,d[2]; 1523 list f5 = j,h,d[3]; 1524 list f6 = h,j,d[3]; 1525 list f7 = j,m,d[4]; 1526 list f8 = m,j,d[4]; 1527 list f9 = j,n,d[5]; 1528 list f10 = n,j,d[5]; 1529 list f11 = j,p,d[6]; 1530 list f12 = p,j,d[6]; 1531 list v1 = i,1,f1; 1532 list v2 = j,6,f2,f3,f5,f7,f9,f11; 1533 list v3 = k,1,f4; 1534 list v4 = h,1,f6; 1535 list v5 = m,1,f8; 1536 list v6 = n,1,f10; 1537 list v7 = p,1,f12; 1538 G.vertices = v1,v2,v3,v4,v5,v6,v7; 1539 G.edges = f1,f3,f5,f7,f9,f11; 1540 return (G); 77 1541 } 78 1542 … … 80 1544 /// Auxilary Static Procedures in this Library ///////////////////////////////// 81 1545 //////////////////////////////////////////////////////////////////////////////// 82 ////////  part ////////////////////////////////////////////////////////////83 ////////  parts ////////////////////////////////////////////////////////////84 ////////  logg ////////////////////////////////////////////////////////////85 ////////  expp ////////////////////////////////////////////////////////////86 ////////  adams ////////////////////////////////////////////////////////////87 ////////  wedges ////////////////////////////////////////////////////////////88 ////////  schur ////////////////////////////////////////////////////////////89 ////////////////////////////////////////////////////////////////////////////////90 1546 91 1547 proc part(poly f, int n) 92 1548 "USAGE: part(f,n); f poly, n int 93 1549 RETURN: poly 94 PURPOSE: return the homogeneous component of degree n of the polynomial f.1550 PURPOSE: computing the homogeneous component of a polynomial. 95 1551 EXAMPLE: example part; shows examples 96 1552 " … … 121 1577 "USAGE: parts(f,i,j); f poly, i int, j int 122 1578 RETURN: poly 123 PURPOSE: return a polynomial which is the sum of the homogeneous components124 of degree from i to j of the polynomial f.1579 THEORY: computing a polynomial which is the sum of the homogeneous 1580 components of a polynomial. 125 1581 EXAMPLE: example parts; shows examples 126 1582 " … … 141 1597 parts(f,2,4); 142 1598 } 1599 143 1600 proc logg(poly f, int n) 144 1601 "USAGE: logg(f,n); f poly, n int 145 1602 RETURN: poly 146 PURPOSE: computing the Chern character from the total Chern class.1603 THEORY: computing Chern characters from total Chern classes. 147 1604 EXAMPLE: example logg; shows examples 148 1605 " … … 184 1641 "USAGE: expp(f,n); f poly, n int 185 1642 RETURN: poly 186 PURPOSE: computing t he total Chern class from the Chern character.1643 PURPOSE: computing total Chern classes from Chern characters. 187 1644 EXAMPLE: example expp; shows examples 188 1645 " … … 269 1726 270 1727 //////////////////////////////////////////////////////////////////////////////// 271 //////// Procedures concerned with varieties ///////////////////////////////////1728 //////// Procedures concerned with abstract varieties ////////////////////////// 272 1729 //////////////////////////////////////////////////////////////////////////////// 273 1730 274 proc variety_print(variety V) 1731 proc printVariety(variety V) 1732 "USAGE: printVariety(V); V variety 1733 ASSUME: V is an abstract variety 1734 THEORY: This is the print function used by Singular to print an abstract 1735 variety. 1736 KEYWORDS: abstract variety, projective space, Grassmannian 1737 EXAMPLE: example printVariety; shows an example 1738 " 275 1739 { 276 1740 "A variety of dimension", V.dimension; 277 1741 } 1742 example 1743 { 1744 "EXAMPLE:"; echo=2; 1745 ring r = 0, (h,e), wp(1,1); 1746 ideal rels = he,h2+e2; 1747 variety V = makeVariety(2,rels); 1748 V; 1749 } 278 1750 279 1751 proc makeVariety(int d, ideal i) 1752 "USAGE: makeVariety(d,i); d int, i ideal 1753 ASSUME: d is a nonnegative integer, i is an ideal 1754 RETURN: variety 1755 THEORY: create an abstract variety which has dimension d, and its Chow ring 1756 should be a quotient ring 1757 KEYWORDS: abstract variety, projective space, Grassmannian 1758 EXAMPLE: example makeVariety; shows an example 1759 " 280 1760 { 281 1761 def R = basering; … … 286 1766 return(V); 287 1767 } 1768 <<<<<<< HEAD 288 1769 289 1770 proc dimension(variety V) 290 { 291 return (V.dimension); 1771 ======= 1772 example 1773 >>>>>>> 2ba3231... chg: new version of schubert.lib 1774 { 1775 "EXAMPLE:"; echo=2; 1776 ring r = 0, (h,e), wp(1,1); 1777 ideal rels = he,h2+e2; 1778 variety V = makeVariety(2,rels); 1779 V; 1780 V.dimension; 1781 V.relations; 292 1782 } 293 1783 294 1784 proc ChowRing(variety V) 1785 "USAGE: ChowRing(V); V variety 1786 ASSUME: V is an abstract variety 1787 RETURN: qring 1788 KEYWORDS: Chow ring, abstract variety, projective space, Grassmannian 1789 EXAMPLE: example makeVariety; shows an example 1790 " 295 1791 { 296 1792 def R = V.baseRing; … … 300 1796 return (CR); 301 1797 } 302 303 proc relations(variety V) 304 { 305 def R = V.baseRing; 306 setring R; 307 ideal i = V.relations; 308 return (i); 1798 example 1799 { 1800 "EXAMPLE:"; echo=2; 1801 ring r = 0, (h,e), wp(1,1); 1802 ideal rels = he,h2+e2; 1803 int d = 2; 1804 variety V = makeVariety(2,rels); 1805 ChowRing(V); 309 1806 } 310 1807 … … 314 1811 "USAGE: Grassmannian(k,n); k int, n int 315 1812 RETURN: variety 316 PURPOSE: create a variety as a Grassmannian G(k,n). This variety has 317 diemnsion k(nk) and its Chow ring is the quotient ring of a 318 polynomial ring in nk variables q(1),...,q(nk) which are the 319 Chern classes of the tautological quotient bundle on the 320 Grassmannian G(k,n), modulo the ideal generated by nk polynomials 321 which come from the Giambelli formula. The monomial ordering of this 322 ring is 'wp' with vector (1..k,1..nk). Moreover, we export the 323 Chern characters of the tautological subbundle and quotient bundle 324 on G(k,n) (say 'subBundle' and 'quotientBundle'). 1813 THEORY: create a Grassmannian G(k,n) as an abstract variety. This abstract 1814 variety has diemnsion k(nk) and its Chow ring is the quotient ring 1815 of a polynomial ring in nk variables q(1),...,q(nk), which are the 1816 Chern classes of tautological quotient bundle on G(k,n), modulo some 1817 ideal generated by nk polynomials which come from the Giambelli 1818 formula. The monomial ordering of this Chow ring is 'wp' with vector 1819 (1..k,1..nk). Moreover, we export the Chern characters of 1820 tautological subbundle and quotient bundle on G(k,n) 1821 (say 'subBundle' and 'quotientBundle'). 1822 KEYWORDS: Grassmannian, abstract variety, Schubert calculus 1823 SEE ALSO: projectiveSpace, projectiveBundle 325 1824 EXAMPLE: example Grassmannian; shows examples 326 1825 " … … 368 1867 { 369 1868 "EXAMPLE:"; echo=2; 370 defG24 = Grassmannian(2,4);1869 variety G24 = Grassmannian(2,4); 371 1870 G24; 372 1871 def r = G24.baseRing; 1872 <<<<<<< HEAD 1873 ======= 1874 setring r; 1875 >>>>>>> 2ba3231... chg: new version of schubert.lib 373 1876 subBundle; 374 1877 quotientBundle; … … 381 1884 "USAGE: projectiveSpace(n); n int 382 1885 RETURN: variety 383 PURPOSE: create a variety as a projective space of dimension n. The Chow ring 384 is the quotient ring in one variable h modulo the ideal generated by 385 h^(n+1). 1886 THEORY: create a projective space of dimension n as an abstract variety. Its 1887 Chow ring is a quotient ring in one variable h modulo the ideal 1888 generated by h^(n+1). 1889 KEYWORDS: projective space, abstract variety 1890 SEE ALSO: Grassmannian, projectiveBundle 386 1891 EXAMPLE: example projectiveSpace; shows examples 387 1892 " … … 419 1924 { 420 1925 "EXAMPLE:"; echo=2; 421 defP = projectiveSpace(3);1926 variety P = projectiveSpace(3); 422 1927 P; 423 1928 P.dimension; … … 430 1935 proc projectiveBundle(sheaf S, list #) 431 1936 "USAGE: projectiveBundle(S); S sheaf 1937 INPUT: a sheaf on an abstract variety 432 1938 RETURN: variety 433 PURPOSE: create a variety which we work on. 1939 THEORY: create a projective bundle as an abstract variety. This is related 1940 to the enumeration of conics. 1941 KEYWORDS: projective bundle, abstract variety, sheaf, enumeration of conics 1942 SEE ALSO: projectiveSpace, Grassmannian 434 1943 EXAMPLE: example projectiveBundle; shows examples 435 1944 " … … 470 1979 { 471 1980 "EXAMPLE:"; echo=2; 472 def G35 = Grassmannian(3,5); 473 def R = G35.baseRing; 1981 variety G = Grassmannian(3,5); 1982 def r = G.baseRing; 1983 setring r; 1984 sheaf S = makeSheaf(G,subBundle); 1985 sheaf B = dualSheaf(S)^2; 1986 variety PB = projectiveBundle(B); 1987 PB; 1988 def R = PB.baseRing; 474 1989 setring R; 475 def S = makeSheaf(G35, subBundle);476 def B = symmetricPowerSheaf(dualSheaf(S),2);477 def PB = projectiveBundle(B);478 PB;479 def P = PB.baseRing;480 setring P;481 1990 QuotientBundle; 482 1991 ChowRing(PB); … … 484 1993 485 1994 proc productVariety(variety U, variety V) 1995 "USAGE: productVariety(U,V); U variety, V variety 1996 INPUT: two abstract varieties 1997 OUTPUT: a product variety as an abstract variety 1998 RETURN: variety 1999 KEYWORDS: product variety, abstract variety 2000 SEE ALSO: projectiveSpace, Grassmannian, projectiveBundle 2001 EXAMPLE: example productVariety; shows examples 2002 " 486 2003 { 487 2004 //def br = basering; … … 498 2015 ideal i2 = imap(vr,ii2); 499 2016 W.relations = i1 + i2; 2017 setring ur; 2018 kill ii1; 2019 setring vr; 2020 kill ii2; 500 2021 //setring br; 501 2022 return (W); 502 2023 } 2024 example 2025 { 2026 "EXAMPLE:"; echo=2; 2027 variety P = projectiveSpace(3); 2028 variety G = Grassmannian(2,4); 2029 variety W = productVariety(P,G); 2030 W; 2031 W.dimension == P.dimension + G.dimension; 2032 def r = W.baseRing; 2033 setring r; 2034 W.relations; 2035 } 503 2036 504 2037 //////////////////////////////////////////////////////////////////////////////// … … 506 2039 proc integral(variety V, poly f) 507 2040 "USAGE: integral(V,f); V variety, f poly 2041 INPUT: a abstract variety and a polynomial 508 2042 RETURN: int 509 PURPOSE: comput e theintersection numbers.510 EXAMPLE: example integral; shows examples2043 PURPOSE: computing intersection numbers. 2044 EXAMPLE: example integral; shows an example 511 2045 " 512 2046 { … … 519 2053 { 520 2054 "EXAMPLE:"; echo=2; 521 def G24= Grassmannian(2,4);522 def R = G24.baseRing;523 setring R;524 integral(G 24,q(1)^4);2055 variety G = Grassmannian(2,4); 2056 def r = G.baseRing; 2057 setring r; 2058 integral(G,q(1)^4); 525 2059 } 526 2060 527 2061 proc SchubertClass(list p) 528 2062 "USAGE: SchubertClass(p); p list 2063 INPUT: a list of integers which is a partition 529 2064 RETURN: poly 530 PURPOSE: compute the Schubert class on a Grassmannian.531 EXAMPLE: example SchubertClass; shows examples2065 PURPOSE: compute the Schubert classes on a Grassmannian. 2066 EXAMPLE: example SchubertClass; shows an example 532 2067 " 533 2068 { … … 546 2081 { 547 2082 "EXAMPLE:"; echo=2; 548 defG = Grassmannian(2,4);2083 variety G = Grassmannian(2,4); 549 2084 def r = G.baseRing; 550 2085 setring r; … … 556 2091 557 2092 proc dualPartition(int k, int n, list p) 2093 "USAGE: dualPartition(k,n,p); k int, n int, p list 2094 INPUT: two integers and a partition 2095 RETURN: list 2096 PURPOSE: compute the dual of a partition. 2097 SEE ALSO: SchubertClass 2098 EXAMPLE: example dualPartition; shows an example 2099 " 558 2100 { 559 2101 while (size(p) < k) … … 569 2111 return (l); 570 2112 } 571 572 //////////////////////////////////////////////////////////////////////////////// 2113 example 2114 { 2115 "EXAMPLE:"; echo=2; 2116 ring r = 0,(x),dp; 2117 dualPartition(2,4,list(2,1)); 2118 } 573 2119 574 2120 //////////////////////////////////////////////////////////////////////////////// … … 576 2122 //////////////////////////////////////////////////////////////////////////////// 577 2123 578 //////////////////////////////////////////////////////////////////////////////// 579 580 proc sheaf_print(sheaf S) 581 { 582 def V = S.currentVariety; 583 def R = V.baseRing; 584 setring R; 585 poly f = S.ChernCharacter; 586 "A sheaf of rank ", int(part(f,0)); 2124 proc printSheaf(sheaf S) 2125 "USAGE: printSheaf(S); S sheaf 2126 RETURN: string 2127 INPUT: a sheaf 2128 THEORY: This is the print function used by Singular to print a sheaf. 2129 SEE ALSO: makeSheaf, rankSheaf 2130 EXAMPLE: example printSheaf; shows an example 2131 " 2132 { 2133 "A sheaf of rank ", rankSheaf(S); 2134 } 2135 example 2136 { 2137 "EXAMPLE:"; echo=2; 2138 variety X; 2139 X.dimension = 4; 2140 ring r = 0,(c(1..2),d(1..3)),wp(1..2,1..3); 2141 setring r; 2142 X.baseRing = r; 2143 poly c = 1 + c(1) + c(2); 2144 poly ch = 2 + logg(c,4); 2145 sheaf S = makeSheaf(X,ch); 2146 S; 587 2147 } 588 2148 589 2149 proc makeSheaf(variety V, poly ch) 2150 "USAGE: makeSheaf(V,ch); V variety, ch poly 2151 RETURN: sheaf 2152 THEORY: create a sheaf on an abstract variety, and its Chern character is 2153 the polynomial ch. 2154 SEE ALSO: printSheaf, rankSheaf 2155 EXAMPLE: example makeSheaf; shows an example 2156 " 590 2157 { 591 2158 def R = basering; … … 595 2162 return(S); 596 2163 } 597 598 proc currentVariety(sheaf S) 599 { 600 return (S.currentVariety); 601 } 602 603 proc ChernCharacter(sheaf S) 604 { 605 return (S.ChernCharacter) 2164 example 2165 { 2166 "EXAMPLE:"; echo=2; 2167 variety X; 2168 X.dimension = 4; 2169 ring r = 0,(c(1..2),d(1..3)),wp(1..2,1..3); 2170 setring r; 2171 X.baseRing = r; 2172 poly c = 1 + c(1) + c(2); 2173 poly ch = 2 + logg(c,4); 2174 sheaf S = makeSheaf(X,ch); 2175 S; 606 2176 } 607 2177 … … 609 2179 "USAGE: rankSheaf(S); S sheaf 610 2180 RETURN: int 611 INPUT: S  a sheaf 612 OUTPUT: an integer which is the rank of the sheaf S. 613 EXAMPLE: example rankSheaf(S); shows examples 614 " 615 { 616 def V = S.currentVariety; 2181 INPUT: S is a sheaf 2182 OUTPUT: a positive integer which is the rank of a sheaf. 2183 SEE ALSO: makeSheaf, printSheaf 2184 EXAMPLE: example rankSheaf; shows an example 2185 " 2186 { 2187 variety V = S.currentVariety; 617 2188 def R = V.baseRing; 618 2189 setring R; … … 623 2194 { 624 2195 "EXAMPLE:"; echo=2; 625 def G24= Grassmannian(2,4);626 def R = G 24.baseRing;2196 variety G = Grassmannian(2,4); 2197 def R = G.baseRing; 627 2198 setring R; 628 def S = makeSheaf(G24,subBundle);2199 sheaf S = makeSheaf(G,subBundle); 629 2200 rankSheaf(S); 630 2201 } 631 2202 632 2203 proc totalChernClass(sheaf S) 633 "USAGE: totalChernClass(S); fsheaf2204 "USAGE: totalChernClass(S); S sheaf 634 2205 RETURN: poly 635 INPUT: S  a sheaf 636 OUTPUT: a polynomial which is the total Chern class of the sheaf S 637 EXAMPLE: example totalChernClass(S); shows examples 638 " 639 { 640 def V = S.currentVariety; 2206 INPUT: S is a sheaf 2207 OUTPUT: a polynomial which is the total Chern class of a sheaf 2208 SEE ALSO: totalSegreClass, topChernClass, ChernClass 2209 EXAMPLE: example totalChernClass; shows an example 2210 " 2211 { 2212 variety V = S.currentVariety; 641 2213 int d = V.dimension; 642 2214 def R = V.baseRing; … … 647 2219 return (reduce(f,rels)); 648 2220 } 2221 example 2222 { 2223 "EXAMPLE:"; echo=2; 2224 variety X; 2225 X.dimension = 4; 2226 ring r = 0,(c(1..2),d(1..3)),wp(1..2,1..3); 2227 setring r; 2228 X.baseRing = r; 2229 poly c = 1 + c(1) + c(2); 2230 poly ch = 2 + logg(c,4); 2231 sheaf E = makeSheaf(X,ch); 2232 sheaf S = E^3; 2233 totalChernClass(S); 2234 } 649 2235 650 2236 proc ChernClass(sheaf S, int i) 2237 "USAGE: ChernClass(S,i); S sheaf, i int 2238 INPUT: S is a sheaf, i is a nonnegative integer 2239 RETURN: poly 2240 THEORY: This is the ith Chern class of a sheaf 2241 SEE ALSO: topChernClass, totalChernClass 2242 EXAMPLE: example ChernClass; shows an example 2243 " 651 2244 { 652 2245 return (part(totalChernClass(S),i)); 2246 } 2247 example 2248 { 2249 "EXAMPLE:"; echo=2; 2250 variety X; 2251 X.dimension = 4; 2252 ring r = 0,(c(1..2),d(1..3)),wp(1..2,1..3); 2253 setring r; 2254 X.baseRing = r; 2255 poly c = 1 + c(1) + c(2); 2256 poly ch = 2 + logg(c,4); 2257 sheaf E = makeSheaf(X,ch); 2258 sheaf S = E^3; 2259 ChernClass(S,1); 2260 ChernClass(S,2); 2261 ChernClass(S,3); 2262 ChernClass(S,4); 653 2263 } 654 2264 … … 656 2266 "USAGE: topChernClass(S); S sheaf 657 2267 RETURN: poly 658 INPUT: S  a sheaf 659 OUTPUT: the top Chern class of the sheaf S 660 EXAMPLE: example topChernClass(S); shows examples 2268 INPUT: S is a sheaf 2269 THEORY: This is the top Chern class of a sheaf 2270 SEE ALSO: ChernClass, totalChernClass 2271 EXAMPLE: example topChernClass; shows an example 661 2272 " 662 2273 { … … 666 2277 { 667 2278 "EXAMPLE:"; echo=2; 668 def G24= Grassmannian(2,4);669 def R = G 24.baseRing;2279 variety G = Grassmannian(2,4); 2280 def R = G.baseRing; 670 2281 setring R; 671 def S = makeSheaf(G24,quotientBundle);672 def B = symmetricPowerSheaf(S,3);2282 sheaf S = makeSheaf(G,quotientBundle); 2283 sheaf B = S^3; 673 2284 topChernClass(B); 674 2285 } … … 677 2288 "USAGE: totalSegreClass(S); S sheaf 678 2289 RETURN: poly 679 INPUT: S  a sheaf 680 OUTPUT: a polynomial which is the total Segre class of the sheaf S. 681 EXAMPLE: example totalSegreClass(S); shows examples 2290 INPUT: S is a sheaf 2291 THEORY: This is the total Segre class of a sheaf. 2292 SEE AlSO: totalChernClass 2293 EXAMPLE: example totalSegreClass; shows an example 682 2294 " 683 2295 { 684 2296 //def D = dualSheaf(S); 685 defV = S.currentVariety;2297 variety V = S.currentVariety; 686 2298 def R = V.baseRing; 687 2299 setring R; … … 703 2315 { 704 2316 "EXAMPLE:"; echo=2; 705 def G24= Grassmannian(2,4);706 def R = G 24.baseRing;2317 variety G = Grassmannian(2,4); 2318 def R = G.baseRing; 707 2319 setring R; 708 def S = makeSheaf(G24,subBundle);2320 sheaf S = makeSheaf(G,subBundle); 709 2321 totalSegreClass(S); 710 2322 } … … 713 2325 "USAGE: dualSheaf(S); S sheaf 714 2326 RETURN: sheaf 715 INPUT: S a sheaf716 OUTPUT: the dual of the sheaf S 717 EXAMPLE: example dualSheaf (S); shows examples718 " 719 { 720 defV = S.currentVariety;2327 THEORY: This is the dual of a sheaf 2328 SEE ALSO: addSheaf, symmetricPowerSheaf, tensorSheaf, quotSheaf 2329 EXAMPLE: example dualSheaf; shows examples 2330 " 2331 { 2332 variety V = S.currentVariety; 721 2333 int d = V.dimension; 722 2334 def R = V.baseRing; … … 732 2344 { 733 2345 "EXAMPLE:"; echo=2; 734 def G24= Grassmannian(2,4);735 def R = G 24.baseRing;2346 variety G = Grassmannian(2,4); 2347 def R = G.baseRing; 736 2348 setring R; 737 def S = makeSheaf(G24,subBundle); 738 dualSheaf(S); 2349 sheaf S = makeSheaf(G,subBundle); 2350 sheaf D = dualSheaf(S); 2351 D; 739 2352 } 740 2353 … … 742 2355 "USAGE: tensorSheaf(A,B); A sheaf, B sheaf 743 2356 RETURN: sheaf 744 INPUT: A, B two sheaves745 OUTPUT: the tensor of two sheaves A and B 746 EXAMPLE: example tensorSheaf (A,B); shows examples2357 THEORY: This is the tensor product of two sheaves 2358 SEE ALSO: addSheaf, symmetricPowerSheaf, quotSheaf, dualSheaf 2359 EXAMPLE: example tensorSheaf; shows examples 747 2360 " 748 2361 { 749 2362 sheaf S; 750 defV1 = A.currentVariety;751 defV2 = B.currentVariety;2363 variety V1 = A.currentVariety; 2364 variety V2 = B.currentVariety; 752 2365 def R1 = V1.baseRing; 753 2366 setring R1; … … 777 2390 { 778 2391 "EXAMPLE:"; echo=2; 779 def G34= Grassmannian(3,4);780 def R = G 34.baseRing;2392 variety G = Grassmannian(3,4); 2393 def R = G.baseRing; 781 2394 setring R; 782 def S = makeSheaf(G34,subBundle); 783 def Q = makeSheaf(G34, quotientBundle); 784 S*Q; 2395 sheaf S = makeSheaf(G,subBundle); 2396 sheaf Q = makeSheaf(G,quotientBundle); 2397 sheaf T = S*Q; 2398 T; 785 2399 } 786 2400 … … 788 2402 "USAGE: symmetricPowerSheaf(S,n); S sheaf, n int 789 2403 RETURN: sheaf 790 INPUT: S  a sheaf 791 n  an integer 792 OUTPUT: the nth symmetric power of the sheaf S 793 EXAMPLE: example symmetricPowerSheaf(S,n); shows examples 794 " 795 { 796 def V = S.currentVariety; 2404 THEORY: This is the nth symmetric power of a sheaf 2405 SEE ALSO: quotSheaf, addSheaf, tensorSheaf, dualSheaf 2406 EXAMPLE: example symmetricPowerSheaf; shows examples 2407 " 2408 { 2409 variety V = S.currentVariety; 797 2410 def R = V.baseRing; 798 2411 setring R; … … 831 2444 { 832 2445 "EXAMPLE:"; echo=2; 833 def G24= Grassmannian(2,4);834 def R = G 24.baseRing;2446 variety G = Grassmannian(2,4); 2447 def R = G.baseRing; 835 2448 setring R; 836 def S = makeSheaf(G24,quotientBundle);837 def B = symmetricPowerSheaf(S,3);2449 sheaf S = makeSheaf(G,quotientBundle); 2450 sheaf B = symmetricPowerSheaf(S,3); 838 2451 B; 839 } 840 841 proc minusSheaf(sheaf A, sheaf B) 2452 sheaf A = S^3; 2453 A; 2454 A.ChernCharacter == B.ChernCharacter; 2455 } 2456 2457 proc quotSheaf(sheaf A, sheaf B) 2458 "USAGE: quotSheaf(A,B); A sheaf, B sheaf 2459 RETURN: sheaf 2460 THEORY: This is the quotient of two sheaves 2461 SEE ALSO: addSheaf, symmetricPowerSheaf, tensorSheaf, dualSheaf 2462 EXAMPLE: example quotSheaf; shows an example 2463 " 842 2464 { 843 2465 sheaf S; 844 defV1 = A.currentVariety;845 defV2 = B.currentVariety;2466 variety V1 = A.currentVariety; 2467 variety V2 = B.currentVariety; 846 2468 def R1 = V1.baseRing; 847 2469 setring R1; … … 866 2488 } 867 2489 } 868 869 proc plusSheaf(sheaf A, sheaf B) 2490 example 2491 { 2492 "EXAMPLE:"; echo=2; 2493 variety G = Grassmannian(3,5); 2494 def r = G.baseRing; 2495 setring r; 2496 sheaf S = makeSheaf(G,subBundle); 2497 sheaf B = dualSheaf(S)^2; 2498 sheaf B3 = dualSheaf(S)^3; 2499 sheaf B5 = dualSheaf(S)^5; 2500 variety PB = projectiveBundle(B); 2501 def R = PB.baseRing; 2502 setring R; 2503 sheaf Q = makeSheaf(PB,QuotientBundle); 2504 sheaf V = dualSheaf(Q)*B3; 2505 sheaf A = B5  V; 2506 A; 2507 } 2508 2509 proc addSheaf(sheaf A, sheaf B) 2510 "USAGE: addSheaf(A,B); A sheaf, B sheaf 2511 RETURN: sheaf 2512 THEORY: This is the direct sum of two sheaves. 2513 SEE ALSO: quotSheaf, symmetricPowerSheaf, tensorSheaf, dualSheaf 2514 EXAMPLE: example addSheaf; shows an example 2515 " 870 2516 { 871 2517 sheaf S; 872 defV1 = A.currentVariety;873 defV2 = B.currentVariety;2518 variety V1 = A.currentVariety; 2519 variety V2 = B.currentVariety; 874 2520 def R1 = V1.baseRing; 875 2521 setring R1; … … 894 2540 } 895 2541 } 896 897 //////////////////////////////////////////////////////////////////////////////// 898 899 proc geometricMultiplicity(ideal I, ideal J) 900 "USAGE: geometricMultiplicity(I,J); I,J = ideals 901 RETURN: int 902 INPUT: I, J  two ideals 903 OTPUT: an integer which is the intersection multiplicity of two subvarieties 904 defined by the ideals I, J at the origin. 905 EXAMPLE: example geometricMultiplicity(I,J); shows examples 906 " 907 { 908 def R = basering; 909 setring R; 910 ideal K = I + J; 911 int v = vdim(std(K)); 912 return (v); 913 } 914 example 915 { 916 "EXAMPLE:"; echo=2; 917 ring r = 0, (x,y,z,w), ds; 918 ideal I = xz,xw,yz,yw; 919 ideal J = xz,yw; 920 geometricMultiplicity(I,J); 921 } 922 923 //////////////////////////////////////////////////////////////////////////////// 924 925 proc serreMultiplicity(ideal I, ideal J) 926 "USAGE: serreMultiplicity(I,J); I,J = ideals 927 RETURN: int 928 INPUT: I, J  two ideals 929 OUTPUT: the intersection multiplicity (defined by J. P. Serre) 930 of two subvarieties defined by the ideals I, J at the origin. 931 EXAMPLE: example serreMultiplicity(I,J); shows examples 932 " 933 { 934 def R = basering; 935 setring R; 936 int i = 0; 937 int s = 0; 938 module m = std(Tor(i,I,J)); 939 int t = sum(hilb(m,2)); 940 kill m; 941 while (t != 0) 942 { 943 s = s + ((1)^i)*t; 944 i++; 945 module m = std(Tor(i,I,J)); 946 t = sum(hilb(m,2)); 947 kill m; 948 } 949 return (s); 950 } 951 example 952 { 953 "EXAMPLE:"; echo=2; 954 ring r = 0, (x,y,z,w), ds; 955 ideal I = xz,xw,yz,yw; 956 ideal J = xz,yw; 957 serreMultiplicity(I,J); 958 } 2542 example 2543 { 2544 "EXAMPLE:"; echo=2; 2545 variety G = Grassmannian(3,5); 2546 def r = G.baseRing; 2547 setring r; 2548 sheaf S = makeSheaf(G,subBundle); 2549 sheaf Q = makeSheaf(G,quotientBundle); 2550 sheaf D = S + Q; 2551 D; 2552 D.ChernCharacter == rankSheaf(D); 2553 totalChernClass(D) == 1; 2554 }
Note: See TracChangeset
for help on using the changeset viewer.