[7476bc] | 1 | //////////////////////////////////////////////////////////////////////////////// |
---|
[11d225] | 2 | version="version schubert.lib 4.0.0.0 Nov_2013 "; // $Id$ |
---|
[2d5ff5] | 3 | category="Algebraic Geometry"; |
---|
| 4 | info=" |
---|
[11d225] | 5 | LIBRARY: schubert.lib Proceduces for Intersection Theory |
---|
[2d5ff5] | 6 | |
---|
[11d225] | 7 | AUTHOR: Hiep Dang, email: hiep@mathematik.uni-kl.de |
---|
[2d5ff5] | 8 | |
---|
[31e974] | 9 | OVERVIEW: |
---|
[2d5ff5] | 10 | |
---|
[6ba2a39] | 11 | We implement new classes (variety, sheaf, stack, graph) and methods for |
---|
[11d225] | 12 | computing with them. An abstract variety is represented by a nonnegative |
---|
| 13 | integer which is its dimension and a graded ring which is its Chow ring. |
---|
| 14 | An abstract sheaf is represented by a variety and a polynomial which is its |
---|
| 15 | Chern character. In particular, we implement the concrete varieties such as |
---|
| 16 | projective spaces, Grassmannians, and projective bundles. |
---|
[2d5ff5] | 17 | |
---|
[6ba2a39] | 18 | An important task of this library is related to the computation of |
---|
| 19 | Gromov-Witten invariants. In particular, we implement new tools for the |
---|
| 20 | computation in equivariant intersection theory. These tools are based on the |
---|
| 21 | localization of moduli spaces of stable maps and Bott's formula. They are |
---|
| 22 | useful for the computation of Gromov-Witten invariants. In order to do this, |
---|
| 23 | we have to deal with moduli spaces of stable maps, which were introduced by |
---|
| 24 | Kontsevich, and the graphs corresponding to the fixed point components of a |
---|
| 25 | torus action on the moduli spaces of stable maps. |
---|
[31e974] | 26 | |
---|
[11d225] | 27 | As an insightful example, the numbers of rational curves on general complete |
---|
| 28 | intersection Calabi-Yau threefolds in projective spaces are computed up to |
---|
| 29 | degree 6. The results are all in agreement with predictions made from mirror |
---|
| 30 | symmetry computations. |
---|
| 31 | |
---|
[31e974] | 32 | REFERENCES: |
---|
| 33 | |
---|
| 34 | Hiep Dang, Intersection theory with applications to the computation of |
---|
| 35 | Gromov-Witten invariants, Ph.D thesis, TU Kaiserslautern, 2013. |
---|
| 36 | |
---|
| 37 | Sheldon Katz and Stein A. Stromme, Schubert-A Maple package for intersection |
---|
| 38 | theory and enumerative geometry, 1992. |
---|
| 39 | |
---|
| 40 | Daniel R. Grayson, Michael E. Stillman, Stein A. Stromme, David Eisenbud and |
---|
| 41 | Charley Crissman, Schubert2-A Macaulay2 package for computation in |
---|
| 42 | intersection theory, 2010. |
---|
[2d5ff5] | 43 | |
---|
[6ba2a39] | 44 | Maxim Kontsevich, Enumeration of rational curves via torus actions, 1995. |
---|
| 45 | |
---|
| 46 | PROCEDURES: |
---|
| 47 | mod_init() create new objects in this library |
---|
| 48 | makeVariety(int,ideal) create a variety |
---|
| 49 | printVariety(variety) print procedure for a variety |
---|
| 50 | productVariety(variety,variety) make the product of two varieties |
---|
| 51 | ChowRing(variety) create the Chow ring of a variety |
---|
| 52 | Grassmannian(int,int) create a Grassmannian as a variety |
---|
| 53 | projectiveSpace(int) create a projective space as a variety |
---|
| 54 | projectiveBundle(sheaf) create a projective bundle as a variety |
---|
| 55 | integral(variety,poly) degree of a 0-cycle on a variety |
---|
| 56 | makeSheaf(variety,poly) create a sheaf |
---|
| 57 | printSheaf(sheaf) print procedure for sheaves |
---|
| 58 | rankSheaf(sheaf) return the rank of a sheaf |
---|
| 59 | totalChernClass(sheaf) compute the total Chern class of a sheaf |
---|
| 60 | ChernClass(sheaf,int) compute the k-th Chern class of a sheaf |
---|
| 61 | topChernClass(sheaf) compute the top Chern class of a sheaf |
---|
| 62 | totalSegreClass(sheaf) compute the total Segre class of a sheaf |
---|
| 63 | dualSheaf(sheaf) make the dual of a sheaf |
---|
| 64 | tensorSheaf(sheaf,sheaf) make the tensor of two sheaves |
---|
| 65 | symmetricPowerSheaf(sheaf,int) make the k-th symmetric power of a sheaf |
---|
| 66 | quotSheaf(sheaf,sheaf) make the quotient of two sheaves |
---|
| 67 | addSheaf(sheaf,sheaf) make the direct sum of two sheaves |
---|
| 68 | makeGraph(list,list) create a graph from a list of vertices |
---|
| 69 | and a list of edges |
---|
| 70 | printGraph(graph) print procedure for graphs |
---|
| 71 | moduliSpace(variety,int) create a moduli space of stable maps as |
---|
| 72 | an algebraic stack |
---|
| 73 | printStack(stack) print procedure for stacks |
---|
| 74 | dimStack(stack) compute the dimension of a stack |
---|
| 75 | fixedPoints(stack) compute the list of graphs corresponding |
---|
| 76 | the fixed point components of a torus |
---|
| 77 | action on the stack |
---|
| 78 | contributionBundle(stack,graph) compute the contribution bundle on a |
---|
| 79 | stack at a graph |
---|
| 80 | normalBundle(stack,graph) compute the normal bundle on a stack at |
---|
| 81 | a graph |
---|
| 82 | multipleCover(int) compute the contribution of multiple |
---|
| 83 | covers of a smooth rational curve as a |
---|
| 84 | Gromov-Witten invariant |
---|
| 85 | linesHypersurface(int) compute the number of lines on a general |
---|
| 86 | hypersurface |
---|
| 87 | rationalCurve(int,list) compute the Gromov-Witten invariant |
---|
| 88 | corresponding the number of rational |
---|
| 89 | curves on a general Calabi-Yau threefold |
---|
| 90 | part(poly,int) compute a homogeneous component of a |
---|
| 91 | polynomial. |
---|
| 92 | parts(poly,int,int) compute the sum of homogeneous |
---|
| 93 | components of a polynomial |
---|
| 94 | logg(poly,int) compute Chern characters from total |
---|
| 95 | Chern classes. |
---|
| 96 | expp(poly,int) compute total Chern classes from Chern |
---|
| 97 | characters |
---|
| 98 | SchubertClass(list) compute the Schubert classes on a |
---|
| 99 | Grassmannian |
---|
| 100 | dualPartition(list) compute the dual of a partition |
---|
| 101 | |
---|
[11d225] | 102 | KEYWORDS: Intersection theory; Enumerative geometry; Schubert calculus; |
---|
| 103 | Bott's formula; Gromov-Witten invariants. |
---|
[6ba2a39] | 104 | |
---|
[31e974] | 105 | "; |
---|
[2d5ff5] | 106 | |
---|
| 107 | //////////////////////////////////////////////////////////////////////////////// |
---|
| 108 | |
---|
[31e974] | 109 | LIB "general.lib"; |
---|
| 110 | LIB "homolog.lib"; |
---|
[2d5ff5] | 111 | |
---|
| 112 | //////////////////////////////////////////////////////////////////////////////// |
---|
[6ba2a39] | 113 | /////////// create new objects in this library //////////////////////////////// |
---|
[2d5ff5] | 114 | //////////////////////////////////////////////////////////////////////////////// |
---|
| 115 | |
---|
[31e974] | 116 | proc mod_init() |
---|
[6ba2a39] | 117 | "USAGE: mod_init(); |
---|
| 118 | THEORY: This is to create new objects in this library such as variety, |
---|
| 119 | sheaf, stack, and graph. |
---|
| 120 | KEYWORDS: variety, sheaf, stack, graph |
---|
| 121 | EXAMPLE: example mod_init(); shows an example |
---|
| 122 | " |
---|
[2d5ff5] | 123 | { |
---|
[31e974] | 124 | newstruct("variety","int dimension, ring baseRing, ideal relations"); |
---|
| 125 | newstruct("sheaf","variety currentVariety, poly ChernCharacter"); |
---|
[6ba2a39] | 126 | newstruct("graph","list vertices, list edges"); |
---|
| 127 | newstruct("stack","variety currentVariety, int degreeCurve"); |
---|
[31e974] | 128 | |
---|
[6ba2a39] | 129 | system("install","variety","print",printVariety,1); |
---|
[31e974] | 130 | system("install","variety","*",productVariety,2); |
---|
[6ba2a39] | 131 | system("install","sheaf","print",printSheaf,1); |
---|
[31e974] | 132 | system("install","sheaf","*",tensorSheaf,2); |
---|
[6ba2a39] | 133 | system("install","sheaf","+",addSheaf,2); |
---|
| 134 | system("install","sheaf","-",quotSheaf,2); |
---|
| 135 | system("install","sheaf","^",symmetricPowerSheaf,2); |
---|
| 136 | system("install","graph","print",printGraph,1); |
---|
| 137 | system("install","stack","print",printStack,1); |
---|
| 138 | } |
---|
| 139 | example |
---|
| 140 | { |
---|
| 141 | "EXAMPLE:"; echo=2; |
---|
| 142 | mod_init(); |
---|
[2d5ff5] | 143 | } |
---|
| 144 | |
---|
| 145 | //////////////////////////////////////////////////////////////////////////////// |
---|
[6ba2a39] | 146 | //////// Procedures concerned with moduli spaces of stable maps //////////////// |
---|
| 147 | //////////////////////////////////////////////////////////////////////////////// |
---|
| 148 | |
---|
| 149 | proc printStack(stack M) |
---|
| 150 | "USAGE: printStack(M); M stack |
---|
| 151 | ASSUME: M is a moduli space of stable maps. |
---|
| 152 | THEORY: This is the print function used by Singular to print a stack. |
---|
| 153 | KEYWORDS: stack, moduli space of stable maps |
---|
| 154 | EXAMPLE: example printStack; shows an example |
---|
| 155 | " |
---|
| 156 | { |
---|
| 157 | "A moduli space of dimension", dimStack(M); |
---|
| 158 | } |
---|
| 159 | example |
---|
| 160 | { |
---|
| 161 | "EXAMPLE:"; echo=2; |
---|
| 162 | ring r = 0,(x),dp; |
---|
| 163 | variety P = projectiveSpace(4); |
---|
| 164 | stack M = moduliSpace(P,2); |
---|
| 165 | M; |
---|
| 166 | } |
---|
| 167 | |
---|
| 168 | proc moduliSpace(variety V, int d) |
---|
| 169 | "USAGE: moduliSpace(V,d); V variety, d int |
---|
| 170 | ASSUME: V is a projective space and d is a positive integer. |
---|
| 171 | THEORY: This is the function used by Singular to create a moduli space of |
---|
| 172 | stable maps from a genus zero curve to a projective space. |
---|
| 173 | KEYWORDS: stack, moduli space of stable maps, rational curves |
---|
| 174 | EXAMPLE: example moduliSpace; shows an example |
---|
| 175 | " |
---|
| 176 | { |
---|
| 177 | stack M; |
---|
| 178 | M.currentVariety = V; |
---|
| 179 | M.degreeCurve = d; |
---|
| 180 | return(M); |
---|
| 181 | } |
---|
| 182 | example |
---|
| 183 | { |
---|
| 184 | "EXAMPLE:"; echo=2; |
---|
| 185 | ring r = 0,(x),dp; |
---|
| 186 | variety P = projectiveSpace(4); |
---|
| 187 | stack M = moduliSpace(P,2); |
---|
| 188 | M; |
---|
| 189 | } |
---|
| 190 | |
---|
| 191 | proc dimStack(stack M) |
---|
| 192 | "USAGE: dimStack(M); M stack |
---|
| 193 | RETURN: int |
---|
| 194 | INPUT: M is a moduli space of stable maps. |
---|
| 195 | OUTPUT: the dimension of moduli space of stable maps. |
---|
| 196 | KEYWORDS: dimension, moduli space of stable maps, rational curves |
---|
| 197 | EXAMPLE: example dimStack; shows an example |
---|
| 198 | " |
---|
| 199 | { |
---|
| 200 | variety V = M.currentVariety; |
---|
| 201 | int n = V.dimension; |
---|
| 202 | int d = M.degreeCurve; |
---|
| 203 | return (n*d+n+d-3); |
---|
| 204 | } |
---|
| 205 | example |
---|
| 206 | { |
---|
| 207 | "EXAMPLE:"; echo=2; |
---|
| 208 | ring r = 0,(x),dp; |
---|
| 209 | variety P = projectiveSpace(4); |
---|
| 210 | stack M = moduliSpace(P,2); |
---|
| 211 | dimStack(M); |
---|
| 212 | } |
---|
| 213 | |
---|
| 214 | proc fixedPoints(stack M) |
---|
| 215 | "USAGE: fixedPoints(M); M stack |
---|
| 216 | RETURN: list |
---|
| 217 | INPUT: M is a moduli space of stable maps. |
---|
| 218 | OUTPUT: a list of graphs corresponding the fixed point components of a torus |
---|
| 219 | action on a moduli space of stable maps. |
---|
| 220 | KEYWORDS: fixed points, moduli space of stable maps, graph |
---|
| 221 | EXAMPLE: example fixedPoints; shows an example |
---|
| 222 | " |
---|
| 223 | { |
---|
[11d225] | 224 | int i,j,k,h,m,n,p,q; |
---|
[6ba2a39] | 225 | list l; |
---|
| 226 | int d = M.degreeCurve; |
---|
| 227 | variety V = M.currentVariety; |
---|
| 228 | int r = V.dimension; |
---|
| 229 | for (i=0;i<=r;i++) |
---|
| 230 | { |
---|
| 231 | for (j=0;j<=r;j++) |
---|
| 232 | { |
---|
| 233 | if (i <> j) |
---|
| 234 | { |
---|
[11d225] | 235 | l[size(l)+1] = list(graph1(d,i,j),2*d); |
---|
[6ba2a39] | 236 | } |
---|
| 237 | } |
---|
| 238 | } |
---|
| 239 | if (d == 2) |
---|
| 240 | { |
---|
| 241 | for (i=0;i<=r;i++) |
---|
| 242 | { |
---|
| 243 | for (j=0;j<=r;j++) |
---|
| 244 | { |
---|
| 245 | for (k=0;k<=r;k++) |
---|
| 246 | { |
---|
| 247 | if (i <> j and j <> k) |
---|
| 248 | { |
---|
[11d225] | 249 | l[size(l)+1] = list(graph2(list(1,1),i,j,k),2); |
---|
[6ba2a39] | 250 | } |
---|
| 251 | } |
---|
| 252 | } |
---|
| 253 | } |
---|
| 254 | } |
---|
| 255 | if (d == 3) |
---|
| 256 | { |
---|
| 257 | for (i=0;i<=r;i++) |
---|
| 258 | { |
---|
| 259 | for (j=0;j<=r;j++) |
---|
| 260 | { |
---|
| 261 | for (k=0;k<=r;k++) |
---|
| 262 | { |
---|
| 263 | if (i <> j and j <> k) |
---|
| 264 | { |
---|
[11d225] | 265 | l[size(l)+1] = list(graph2(list(2,1),i,j,k),2); |
---|
[6ba2a39] | 266 | for (h=0;h<=r;h++) |
---|
| 267 | { |
---|
| 268 | if (h <> k) |
---|
| 269 | { |
---|
[11d225] | 270 | l[size(l)+1] = list(graph31(list(1,1,1),i,j,k,h),2); |
---|
[6ba2a39] | 271 | } |
---|
| 272 | if (h <> j) |
---|
| 273 | { |
---|
[11d225] | 274 | l[size(l)+1] = list(graph32(list(1,1,1),i,j,k,h),6); |
---|
[6ba2a39] | 275 | } |
---|
| 276 | } |
---|
| 277 | } |
---|
| 278 | } |
---|
| 279 | } |
---|
| 280 | } |
---|
| 281 | } |
---|
| 282 | if (d == 4) |
---|
| 283 | { |
---|
| 284 | for (i=0;i<=r;i++) |
---|
| 285 | { |
---|
| 286 | for (j=0;j<=r;j++) |
---|
| 287 | { |
---|
| 288 | for (k=0;k<=r;k++) |
---|
| 289 | { |
---|
| 290 | if (i <> j and j <> k) |
---|
| 291 | { |
---|
[11d225] | 292 | l[size(l)+1] = list(graph2(list(3,1),i,j,k),3); |
---|
| 293 | l[size(l)+1] = list(graph2(list(2,2),i,j,k),8); |
---|
[6ba2a39] | 294 | for (h=0;h<=r;h++) |
---|
| 295 | { |
---|
| 296 | if (h <> k) |
---|
| 297 | { |
---|
[11d225] | 298 | l[size(l)+1] = list(graph31(list(2,1,1),i,j,k,h),2); |
---|
| 299 | l[size(l)+1] = list(graph31(list(1,2,1),i,j,k,h),4); |
---|
[6ba2a39] | 300 | } |
---|
| 301 | if (h <> j) |
---|
| 302 | { |
---|
[11d225] | 303 | l[size(l)+1] = list(graph32(list(2,1,1),i,j,k,h),4); |
---|
[6ba2a39] | 304 | } |
---|
| 305 | for (m=0;m<=r;m++) |
---|
| 306 | { |
---|
| 307 | if (k <> h and m <> h) |
---|
| 308 | { |
---|
[11d225] | 309 | l[size(l)+1] = list(graph41(list(1,1,1,1),i,j,k,h,m),2); |
---|
[6ba2a39] | 310 | } |
---|
| 311 | if (k <> h and m <> k) |
---|
| 312 | { |
---|
[11d225] | 313 | l[size(l)+1] = list(graph42(list(1,1,1,1),i,j,k,h,m),2); |
---|
[6ba2a39] | 314 | } |
---|
| 315 | if (h <> j and m <> j) |
---|
| 316 | { |
---|
[11d225] | 317 | l[size(l)+1] = list(graph43(list(1,1,1,1),i,j,k,h,m),24); |
---|
[6ba2a39] | 318 | } |
---|
| 319 | } |
---|
| 320 | } |
---|
| 321 | } |
---|
| 322 | } |
---|
| 323 | } |
---|
| 324 | } |
---|
| 325 | } |
---|
| 326 | if (d == 5) |
---|
| 327 | { |
---|
| 328 | for (i=0;i<=r;i++) |
---|
| 329 | { |
---|
| 330 | for (j=0;j<=r;j++) |
---|
| 331 | { |
---|
| 332 | for (k=0;k<=r;k++) |
---|
| 333 | { |
---|
| 334 | if (i <> j and j <> k) |
---|
| 335 | { |
---|
[11d225] | 336 | l[size(l)+1] = list(graph2(list(4,1),i,j,k),4); |
---|
| 337 | l[size(l)+1] = list(graph2(list(3,2),i,j,k),6); |
---|
[6ba2a39] | 338 | for (h=0;h<=r;h++) |
---|
| 339 | { |
---|
| 340 | if (k <> h) |
---|
| 341 | { |
---|
[11d225] | 342 | l[size(l)+1] = list(graph31(list(3,1,1),i,j,k,h),3); |
---|
| 343 | l[size(l)+1] = list(graph31(list(1,3,1),i,j,k,h),6); |
---|
| 344 | l[size(l)+1] = list(graph31(list(2,2,1),i,j,k,h),4); |
---|
| 345 | l[size(l)+1] = list(graph31(list(2,1,2),i,j,k,h),8); |
---|
[6ba2a39] | 346 | } |
---|
| 347 | if (j <> h) |
---|
| 348 | { |
---|
[11d225] | 349 | l[size(l)+1] = list(graph32(list(3,1,1),i,j,k,h),6); |
---|
| 350 | l[size(l)+1] = list(graph32(list(2,2,1),i,j,k,h),8); |
---|
[6ba2a39] | 351 | } |
---|
| 352 | for (m=0;m<=r;m++) |
---|
| 353 | { |
---|
| 354 | if (k <> h and h <> m) |
---|
| 355 | { |
---|
[11d225] | 356 | l[size(l)+1] = list(graph41(list(2,1,1,1),i,j,k,h,m),2); |
---|
| 357 | l[size(l)+1] = list(graph41(list(1,2,1,1),i,j,k,h,m),2); |
---|
[6ba2a39] | 358 | } |
---|
| 359 | if (k <> h and k <> m) |
---|
| 360 | { |
---|
[11d225] | 361 | l[size(l)+1] = list(graph42(list(2,1,1,1),i,j,k,h,m),4); |
---|
| 362 | l[size(l)+1] = list(graph42(list(1,2,1,1),i,j,k,h,m),4); |
---|
| 363 | l[size(l)+1] = list(graph42(list(1,1,2,1),i,j,k,h,m),2); |
---|
[6ba2a39] | 364 | } |
---|
| 365 | if (j <> h and j <> m) |
---|
| 366 | { |
---|
[11d225] | 367 | l[size(l)+1] = list(graph43(list(2,1,1,1),i,j,k,h,m),12); |
---|
[6ba2a39] | 368 | } |
---|
| 369 | for (n=0;n<=r;n++) |
---|
| 370 | { |
---|
| 371 | if (k <> h and h <> m and m <> n) |
---|
| 372 | { |
---|
[11d225] | 373 | l[size(l)+1] = list(graph51(list(1,1,1,1,1),i,j,k,h,m,n),2); |
---|
[6ba2a39] | 374 | } |
---|
| 375 | if (k <> h and h <> m and h <> n) |
---|
| 376 | { |
---|
[11d225] | 377 | l[size(l)+1] = list(graph52(list(1,1,1,1,1),i,j,k,h,m,n),2); |
---|
[6ba2a39] | 378 | } |
---|
| 379 | if (k <> h and k <> m and k <> n) |
---|
| 380 | { |
---|
[11d225] | 381 | l[size(l)+1] = list(graph53(list(1,1,1,1,1),i,j,k,h,m,n),6); |
---|
[6ba2a39] | 382 | } |
---|
| 383 | if (j <> h and h <> m and h <> n) |
---|
| 384 | { |
---|
[11d225] | 385 | l[size(l)+1] = list(graph54(list(1,1,1,1,1),i,j,k,h,m,n),8); |
---|
[6ba2a39] | 386 | } |
---|
| 387 | if (k <> h and k <> m and h <> n) |
---|
| 388 | { |
---|
[11d225] | 389 | l[size(l)+1] = list(graph55(list(1,1,1,1,1),i,j,k,h,m,n),2); |
---|
[6ba2a39] | 390 | } |
---|
| 391 | if (j <> h and j <> m and j <> n) |
---|
| 392 | { |
---|
[11d225] | 393 | l[size(l)+1] = list(graph56(list(1,1,1,1,1),i,j,k,h,m,n),120); |
---|
[6ba2a39] | 394 | } |
---|
| 395 | } |
---|
| 396 | } |
---|
| 397 | } |
---|
| 398 | } |
---|
| 399 | } |
---|
| 400 | } |
---|
| 401 | } |
---|
| 402 | } |
---|
| 403 | if (d == 6) |
---|
| 404 | { |
---|
| 405 | for (i=0;i<=r;i++) |
---|
| 406 | { |
---|
| 407 | for (j=0;j<=r;j++) |
---|
| 408 | { |
---|
| 409 | for (k=0;k<=r;k++) |
---|
| 410 | { |
---|
| 411 | if (i <> j and j <> k) |
---|
| 412 | { |
---|
[11d225] | 413 | l[size(l)+1] = list(graph2(list(5,1),i,j,k),5); |
---|
| 414 | l[size(l)+1] = list(graph2(list(4,2),i,j,k),8); |
---|
| 415 | l[size(l)+1] = list(graph2(list(3,3),i,j,k),18); |
---|
[6ba2a39] | 416 | for (h=0;h<=r;h++) |
---|
| 417 | { |
---|
| 418 | if (k <> h) |
---|
| 419 | { |
---|
[11d225] | 420 | l[size(l)+1] = list(graph31(list(4,1,1),i,j,k,h),4); |
---|
| 421 | l[size(l)+1] = list(graph31(list(1,4,1),i,j,k,h),8); |
---|
| 422 | l[size(l)+1] = list(graph31(list(3,2,1),i,j,k,h),6); |
---|
| 423 | l[size(l)+1] = list(graph31(list(3,1,2),i,j,k,h),6); |
---|
| 424 | l[size(l)+1] = list(graph31(list(1,3,2),i,j,k,h),6); |
---|
| 425 | l[size(l)+1] = list(graph31(list(2,2,2),i,j,k,h),16); |
---|
[6ba2a39] | 426 | } |
---|
| 427 | if (j <> h) |
---|
| 428 | { |
---|
[11d225] | 429 | l[size(l)+1] = list(graph32(list(4,1,1),i,j,k,h),8); |
---|
| 430 | l[size(l)+1] = list(graph32(list(3,2,1),i,j,k,h),6); |
---|
| 431 | l[size(l)+1] = list(graph32(list(2,2,2),i,j,k,h),48); |
---|
[6ba2a39] | 432 | } |
---|
| 433 | for (m=0;m<=r;m++) |
---|
| 434 | { |
---|
| 435 | if (k <> h and h <> m) |
---|
| 436 | { |
---|
[11d225] | 437 | l[size(l)+1] = list(graph41(list(3,1,1,1),i,j,k,h,m),3); |
---|
| 438 | l[size(l)+1] = list(graph41(list(1,3,1,1),i,j,k,h,m),3); |
---|
| 439 | l[size(l)+1] = list(graph41(list(2,2,1,1),i,j,k,h,m),4); |
---|
| 440 | l[size(l)+1] = list(graph41(list(2,1,2,1),i,j,k,h,m),4); |
---|
| 441 | l[size(l)+1] = list(graph41(list(2,1,1,2),i,j,k,h,m),8); |
---|
| 442 | l[size(l)+1] = list(graph41(list(1,2,2,1),i,j,k,h,m),8); |
---|
[6ba2a39] | 443 | } |
---|
| 444 | if (k <> h and k <> m) |
---|
| 445 | { |
---|
[11d225] | 446 | l[size(l)+1] = list(graph42(list(3,1,1,1),i,j,k,h,m),6); |
---|
| 447 | l[size(l)+1] = list(graph42(list(1,3,1,1),i,j,k,h,m),6); |
---|
| 448 | l[size(l)+1] = list(graph42(list(1,1,3,1),i,j,k,h,m),3); |
---|
| 449 | l[size(l)+1] = list(graph42(list(2,2,1,1),i,j,k,h,m),8); |
---|
| 450 | l[size(l)+1] = list(graph42(list(1,1,2,2),i,j,k,h,m),8); |
---|
| 451 | l[size(l)+1] = list(graph42(list(2,1,2,1),i,j,k,h,m),4); |
---|
| 452 | l[size(l)+1] = list(graph42(list(1,2,2,1),i,j,k,h,m),4); |
---|
[6ba2a39] | 453 | } |
---|
| 454 | if (j <> h and j <> m) |
---|
| 455 | { |
---|
[11d225] | 456 | l[size(l)+1] = list(graph43(list(3,1,1,1),i,j,k,h,m),18); |
---|
| 457 | l[size(l)+1] = list(graph43(list(2,2,1,1),i,j,k,h,m),16); |
---|
[6ba2a39] | 458 | } |
---|
| 459 | for (n=0;n<=r;n++) |
---|
| 460 | { |
---|
| 461 | if (k <> h and h <> m and m <> n) |
---|
| 462 | { |
---|
[11d225] | 463 | l[size(l)+1] = list(graph51(list(2,1,1,1,1),i,j,k,h,m,n),2); |
---|
| 464 | l[size(l)+1] = list(graph51(list(1,2,1,1,1),i,j,k,h,m,n),2); |
---|
| 465 | l[size(l)+1] = list(graph51(list(1,1,2,1,1),i,j,k,h,m,n),4); |
---|
[6ba2a39] | 466 | } |
---|
| 467 | if (k <> h and h <> m and h <> n) |
---|
| 468 | { |
---|
[11d225] | 469 | l[size(l)+1] = list(graph52(list(2,1,1,1,1),i,j,k,h,m,n),4); |
---|
| 470 | l[size(l)+1] = list(graph52(list(1,2,1,1,1),i,j,k,h,m,n),4); |
---|
| 471 | l[size(l)+1] = list(graph52(list(1,1,2,1,1),i,j,k,h,m,n),4); |
---|
| 472 | l[size(l)+1] = list(graph52(list(1,1,1,2,1),i,j,k,h,m,n),2); |
---|
[6ba2a39] | 473 | } |
---|
| 474 | if (k <> h and k <> m and k <> n) |
---|
| 475 | { |
---|
[11d225] | 476 | l[size(l)+1] = list(graph53(list(2,1,1,1,1),i,j,k,h,m,n),12); |
---|
| 477 | l[size(l)+1] = list(graph53(list(1,2,1,1,1),i,j,k,h,m,n),12); |
---|
| 478 | l[size(l)+1] = list(graph53(list(1,1,2,1,1),i,j,k,h,m,n),4); |
---|
[6ba2a39] | 479 | } |
---|
| 480 | if (j <> h and h <> m and h <> n) |
---|
| 481 | { |
---|
[11d225] | 482 | l[size(l)+1] = list(graph54(list(2,1,1,1,1),i,j,k,h,m,n),4); |
---|
| 483 | l[size(l)+1] = list(graph54(list(1,1,2,1,1),i,j,k,h,m,n),16); |
---|
[6ba2a39] | 484 | } |
---|
| 485 | if (k <> h and k <> m and h <> n) |
---|
| 486 | { |
---|
[11d225] | 487 | l[size(l)+1] = list(graph55(list(2,1,1,1,1),i,j,k,h,m,n),2); |
---|
| 488 | l[size(l)+1] = list(graph55(list(1,2,1,1,1),i,j,k,h,m,n),2); |
---|
| 489 | l[size(l)+1] = list(graph55(list(1,1,1,2,1),i,j,k,h,m,n),4); |
---|
[6ba2a39] | 490 | } |
---|
| 491 | if (j <> h and j <> m and j <> n) |
---|
| 492 | { |
---|
[11d225] | 493 | l[size(l)+1] = list(graph56(list(2,1,1,1,1),i,j,k,h,m,n),48); |
---|
[6ba2a39] | 494 | } |
---|
| 495 | for (p=0;p<=r;p++) |
---|
| 496 | { |
---|
| 497 | if (k <> h and h <> m and m <> n and n <> p) |
---|
| 498 | { |
---|
[11d225] | 499 | l[size(l)+1] = list(graph61(list(1,1,1,1,1,1),i,j,k,h,m,n,p),2); |
---|
[6ba2a39] | 500 | } |
---|
| 501 | if (k <> h and h <> m and m <> n and m <> p) |
---|
| 502 | { |
---|
[11d225] | 503 | l[size(l)+1] = list(graph62(list(1,1,1,1,1,1),i,j,k,h,m,n,p),2); |
---|
[6ba2a39] | 504 | } |
---|
| 505 | if (k <> h and h <> m and h <> n and n <> p) |
---|
| 506 | { |
---|
[11d225] | 507 | l[size(l)+1] = list(graph63(list(1,1,1,1,1,1),i,j,k,h,m,n,p),1); |
---|
[6ba2a39] | 508 | } |
---|
| 509 | if (k <> h and h <> m and h <> n and h <> p) |
---|
| 510 | { |
---|
[11d225] | 511 | l[size(l)+1] = list(graph64(list(1,1,1,1,1,1),i,j,k,h,m,n,p),6); |
---|
[6ba2a39] | 512 | } |
---|
| 513 | if (k <> h and k <> m and k <> n and n <> p) |
---|
| 514 | { |
---|
[11d225] | 515 | l[size(l)+1] = list(graph65(list(1,1,1,1,1,1),i,j,k,h,m,n,p),4); |
---|
[6ba2a39] | 516 | } |
---|
| 517 | if (k <> h and k <> m and m <> p and h <> n) |
---|
| 518 | { |
---|
[11d225] | 519 | l[size(l)+1] = list(graph66(list(1,1,1,1,1,1),i,j,k,h,m,n,p),6); |
---|
[6ba2a39] | 520 | } |
---|
| 521 | if (j <> h and h <> m and m <> n and m <> p) |
---|
| 522 | { |
---|
[11d225] | 523 | l[size(l)+1] = list(graph67(list(1,1,1,1,1,1),i,j,k,h,m,n,p),8); |
---|
[6ba2a39] | 524 | } |
---|
| 525 | if (j <> h and h <> m and h <> n and h <> p) |
---|
| 526 | { |
---|
[11d225] | 527 | l[size(l)+1] = list(graph68(list(1,1,1,1,1,1),i,j,k,h,m,n,p),12); |
---|
[6ba2a39] | 528 | } |
---|
| 529 | if (j <> h and h <> m and h <> n and n <> p) |
---|
| 530 | { |
---|
[11d225] | 531 | l[size(l)+1] = list(graph69(list(1,1,1,1,1,1),i,j,k,h,m,n,p),2); |
---|
[6ba2a39] | 532 | } |
---|
| 533 | if (k <> h and k <> m and k <> n and k <> p) |
---|
| 534 | { |
---|
[11d225] | 535 | l[size(l)+1] = list(graph610(list(1,1,1,1,1,1),i,j,k,h,m,n,p),24); |
---|
[6ba2a39] | 536 | } |
---|
| 537 | if (j <> h and j <> m and j <> n and j <> p) |
---|
| 538 | { |
---|
[11d225] | 539 | l[size(l)+1] = list(graph611(list(1,1,1,1,1,1),i,j,k,h,m,n,p),720); |
---|
[6ba2a39] | 540 | } |
---|
| 541 | } |
---|
| 542 | } |
---|
| 543 | } |
---|
| 544 | } |
---|
| 545 | } |
---|
| 546 | } |
---|
| 547 | } |
---|
| 548 | } |
---|
| 549 | } |
---|
| 550 | return (l); |
---|
| 551 | } |
---|
| 552 | example |
---|
| 553 | { |
---|
| 554 | "EXAMPLE:"; echo=2; |
---|
[11d225] | 555 | ring r = 0,x,dp; |
---|
[6ba2a39] | 556 | variety P = projectiveSpace(4); |
---|
| 557 | stack M = moduliSpace(P,2); |
---|
| 558 | def F = fixedPoints(M); |
---|
| 559 | size(F); |
---|
| 560 | typeof(F[1]) == "list"; |
---|
| 561 | typeof(F[1][1]) == "graph"; |
---|
| 562 | typeof(F[1][2]) == "int"; |
---|
| 563 | } |
---|
| 564 | |
---|
| 565 | static proc torusList(variety P) |
---|
| 566 | "USAGE: torusList(P); P variety |
---|
| 567 | RETURN: list |
---|
| 568 | INPUT: P is a projective space |
---|
| 569 | OUTPUT: a list of numbers |
---|
| 570 | THEORY: This is a procedure concerning the enumeration of rational curves. |
---|
| 571 | KEYWORDS: torus action |
---|
| 572 | EXAMPLE: example torusList; shows an example |
---|
| 573 | " |
---|
| 574 | { |
---|
| 575 | int i; |
---|
| 576 | int n = P.dimension; |
---|
| 577 | list l; |
---|
| 578 | for (i=0;i<=n;i++) |
---|
| 579 | { |
---|
[11d225] | 580 | l = insert(l,number(10^i),size(l)); |
---|
[6ba2a39] | 581 | } |
---|
| 582 | return (l); |
---|
| 583 | } |
---|
| 584 | example |
---|
| 585 | { |
---|
| 586 | "EXAMPLE:"; echo=2; |
---|
[11d225] | 587 | ring r = 0,x,dp; |
---|
[6ba2a39] | 588 | variety P = projectiveSpace(4); |
---|
| 589 | def L = torusList(P); |
---|
| 590 | L; |
---|
| 591 | } |
---|
| 592 | |
---|
| 593 | proc contributionBundle(stack M, graph G, list #) |
---|
| 594 | "USAGE: contributionBundle(M,G,#); M stack, G graph, # list |
---|
| 595 | RETURN: number |
---|
| 596 | INPUT: M is a moduli space of stable maps, G is a graph, # is a list. |
---|
| 597 | OUTPUT: a number corresponding to the contribution bundle on a moduli space |
---|
| 598 | of stable maps at a fixed point component (graph) |
---|
| 599 | KEYWORDS: contribution bundle, graph, multiple cover, rational curve, |
---|
| 600 | SEE ALSO: normalBundle |
---|
| 601 | EXAMPLE: example contributionBundle; shows an example |
---|
| 602 | " |
---|
| 603 | { |
---|
| 604 | def R = basering; |
---|
| 605 | setring R; |
---|
| 606 | int i,j,a; |
---|
| 607 | variety P = M.currentVariety; |
---|
| 608 | def L = torusList(P); |
---|
| 609 | int r = P.dimension; |
---|
| 610 | int d; |
---|
| 611 | if (size(#)==0) {d = 2*r - 3;} |
---|
| 612 | else |
---|
| 613 | { |
---|
| 614 | if (typeof(#[1]) == "int") {d = #[1];} |
---|
| 615 | else {Error("invalid optional argument");} |
---|
| 616 | } |
---|
| 617 | list e = G.edges; |
---|
| 618 | list v = G.vertices; |
---|
| 619 | number E = 1; |
---|
| 620 | number V = 1; |
---|
| 621 | if (r == 1) |
---|
| 622 | { |
---|
| 623 | for (i=1;i<=size(v);i++) |
---|
| 624 | { |
---|
| 625 | V = V*(-L[v[i][1]+1])^(v[i][2]-1); |
---|
| 626 | } |
---|
| 627 | for (j=1;j<=size(e);j++) |
---|
| 628 | { |
---|
| 629 | number f = 1; |
---|
| 630 | if (e[j][3]<>1) |
---|
| 631 | { |
---|
| 632 | for (a=1;a<e[j][3];a++) |
---|
| 633 | { |
---|
| 634 | f=f*(-a*L[e[j][1]+1]-(e[j][3]-a)*L[e[j][2]+1])/e[j][3]; |
---|
| 635 | } |
---|
| 636 | } |
---|
| 637 | E = E*f; |
---|
| 638 | kill f; |
---|
| 639 | } |
---|
| 640 | return ((E*V)^2); |
---|
| 641 | } |
---|
| 642 | else |
---|
| 643 | { |
---|
| 644 | for (i=1;i<=size(v);i++) |
---|
| 645 | { |
---|
| 646 | V = V*((d*L[v[i][1]+1])^(v[i][2]-1)); |
---|
| 647 | } |
---|
| 648 | for (j=1;j<=size(e);j++) |
---|
| 649 | { |
---|
| 650 | number f = 1; |
---|
| 651 | for (a=0;a<=d*e[j][3];a++) |
---|
| 652 | { |
---|
| 653 | f = f*((a*L[e[j][1]+1]+(d*e[j][3]-a)*L[e[j][2]+1])/e[j][3]); |
---|
| 654 | } |
---|
| 655 | E = E*f; |
---|
| 656 | kill f; |
---|
| 657 | } |
---|
| 658 | return (E/V); |
---|
| 659 | } |
---|
| 660 | } |
---|
| 661 | example |
---|
| 662 | { |
---|
| 663 | "EXAMPLE:"; echo=2; |
---|
[11d225] | 664 | ring r = 0,x,dp; |
---|
[6ba2a39] | 665 | variety P = projectiveSpace(4); |
---|
| 666 | stack M = moduliSpace(P,2); |
---|
| 667 | def F = fixedPoints(M); |
---|
| 668 | graph G = F[1][1]; |
---|
| 669 | number f = contributionBundle(M,G); |
---|
| 670 | number g = contributionBundle(M,G,5); |
---|
| 671 | f == g; |
---|
| 672 | } |
---|
| 673 | |
---|
| 674 | proc normalBundle(stack M, graph G) |
---|
| 675 | "USAGE: normalBundle(M,G); M stack, G graph |
---|
| 676 | RETURN: number |
---|
| 677 | INPUT: M is a moduli space of stable maps, G is a graph |
---|
| 678 | OUTPUT: a number corresponding to the normal bundle on a moduli space of |
---|
| 679 | stable maps at a graph |
---|
| 680 | KEYWORDS: normal bundle, graph, rational curves, mutiple covers, lines on |
---|
| 681 | hypersurfaces |
---|
| 682 | SEE ALSO: contributionBundle |
---|
| 683 | EXAMPLE: example normalBundle; shows an example |
---|
| 684 | { |
---|
| 685 | def R = basering; |
---|
| 686 | setring R; |
---|
| 687 | variety P = M.currentVariety; |
---|
| 688 | def L = torusList(P); |
---|
| 689 | int n = P.dimension; |
---|
| 690 | list e = G.edges; |
---|
| 691 | list v = G.vertices; |
---|
| 692 | int i,j,k,h,b,m,a; |
---|
| 693 | number N = 1; |
---|
| 694 | for (j=1;j<=size(e);j++) |
---|
| 695 | { |
---|
| 696 | int d = e[j][3]; |
---|
| 697 | number c = (-1)^d*factorial(d)^2; |
---|
[11d225] | 698 | number y = c*(L[e[j][1]+1]-L[e[j][2]+1])^(2*d)/(number(d)^(2*d)); |
---|
[6ba2a39] | 699 | for (k=0;k<=n;k++) |
---|
| 700 | { |
---|
| 701 | if (k <> e[j][1] and k <> e[j][2]) |
---|
| 702 | { |
---|
| 703 | for (a=0;a<=d;a++) |
---|
| 704 | { |
---|
| 705 | y=y*((a*L[e[j][1]+1]+(d-a)*L[e[j][2]+1])/d - L[k+1]); |
---|
| 706 | } |
---|
| 707 | } |
---|
| 708 | } |
---|
| 709 | N = N*y; |
---|
| 710 | kill y,d,c; |
---|
| 711 | } |
---|
| 712 | for (i=1;i<=size(v);i++) |
---|
| 713 | { |
---|
| 714 | number F = 1; |
---|
| 715 | for (h=3;h<=size(v[i]);h++) |
---|
| 716 | { |
---|
| 717 | F = F*(L[v[i][h][1]+1]-L[v[i][h][2]+1])/v[i][h][3]; |
---|
| 718 | } |
---|
| 719 | if (v[i][2] == 1) |
---|
| 720 | { |
---|
| 721 | N = N/F; |
---|
| 722 | kill F; |
---|
| 723 | } |
---|
| 724 | else |
---|
| 725 | { |
---|
| 726 | number z = 1; |
---|
| 727 | for (m=0;m<=n;m++) |
---|
| 728 | { |
---|
| 729 | if (m<>v[i][1]) |
---|
| 730 | { |
---|
| 731 | z = z*(L[v[i][1]+1]-L[m+1]); |
---|
| 732 | } |
---|
| 733 | } |
---|
| 734 | if (v[i][2] == 3) |
---|
| 735 | { |
---|
| 736 | N = N*F/z^2; |
---|
| 737 | kill F,z; |
---|
| 738 | } |
---|
| 739 | else |
---|
| 740 | { |
---|
| 741 | number g = 0; |
---|
| 742 | for (b=3;b<=size(v[i]);b++) |
---|
| 743 | { |
---|
| 744 | g = g + v[i][b][3]/(L[v[i][b][1]+1]-L[v[i][b][2]+1]); |
---|
| 745 | } |
---|
| 746 | N = N*F*g^(3-v[i][2])/(z^(v[i][2]-1)); |
---|
| 747 | kill g,F,z; |
---|
| 748 | } |
---|
| 749 | } |
---|
| 750 | } |
---|
| 751 | return (N); |
---|
| 752 | } |
---|
| 753 | example |
---|
| 754 | { |
---|
| 755 | "EXAMPLE:"; echo=2; |
---|
[11d225] | 756 | ring r = 0,x,dp; |
---|
[6ba2a39] | 757 | variety P = projectiveSpace(4); |
---|
| 758 | stack M = moduliSpace(P,2); |
---|
| 759 | def F = fixedPoints(M); |
---|
| 760 | graph G = F[1][1]; |
---|
| 761 | number f = normalBundle(M,G); |
---|
| 762 | f <> 0; |
---|
| 763 | } |
---|
| 764 | |
---|
| 765 | proc multipleCover(int d) |
---|
| 766 | "USAGE: multipleCover(d); d int |
---|
| 767 | RETURN: number |
---|
| 768 | THEORY: This is the contribution of degree d multiple covers of a smooth |
---|
| 769 | rational curve as a Gromov-Witten invariant. |
---|
| 770 | KEYWORDS: Gromov-Witten invariants, multiple covers |
---|
| 771 | SEE ALSO: rationalCurve, linesHypersurface |
---|
| 772 | EXAMPLE: example multipleCover; shows an example |
---|
| 773 | " |
---|
| 774 | { |
---|
| 775 | def R = basering; |
---|
| 776 | setring R; |
---|
| 777 | variety P = projectiveSpace(1); |
---|
| 778 | stack M = moduliSpace(P,d); |
---|
| 779 | def F = fixedPoints(M); |
---|
| 780 | int i; |
---|
| 781 | number r = 0; |
---|
| 782 | for (i=1;i<=size(F);i++) |
---|
| 783 | { |
---|
| 784 | graph G = F[i][1]; |
---|
| 785 | number s = contributionBundle(M,G); |
---|
| 786 | number t = F[i][2]*normalBundle(M,G); |
---|
| 787 | r = r + s/t; |
---|
| 788 | kill s,t,G; |
---|
| 789 | } |
---|
| 790 | return (r); |
---|
| 791 | } |
---|
| 792 | example |
---|
| 793 | { |
---|
| 794 | "EXAMPLE:"; echo=2; |
---|
[11d225] | 795 | ring r = 0,x,dp; |
---|
[6ba2a39] | 796 | multipleCover(1); |
---|
| 797 | multipleCover(2); |
---|
| 798 | multipleCover(3); |
---|
| 799 | multipleCover(4); |
---|
| 800 | multipleCover(5); |
---|
[11d225] | 801 | multipleCover(6); |
---|
[6ba2a39] | 802 | } |
---|
| 803 | |
---|
| 804 | proc linesHypersurface(int n) |
---|
| 805 | "USAGE: linesHypersurface(n); n int |
---|
| 806 | RETURN: number |
---|
| 807 | THEORY: This is the number of lines on a general hypersurface of degree |
---|
| 808 | d = 2n-3 in an n-dimensional projective space. |
---|
| 809 | KEYWORDS: Gromov-Witten invariants, lines on hypersurfaces |
---|
| 810 | SEE ALSO: linesHypersurface, multipleCover |
---|
| 811 | EXAMPLE: example linesHypersurface; shows an example |
---|
| 812 | " |
---|
| 813 | { |
---|
| 814 | def R = basering; |
---|
| 815 | setring R; |
---|
| 816 | variety P = projectiveSpace(n); |
---|
| 817 | stack M = moduliSpace(P,1); |
---|
| 818 | def F = fixedPoints(M); |
---|
| 819 | int i; |
---|
[11d225] | 820 | number r = 0; |
---|
[6ba2a39] | 821 | for (i=1;i<=size(F);i++) |
---|
| 822 | { |
---|
| 823 | graph G = F[i][1]; |
---|
| 824 | number s = contributionBundle(M,G); |
---|
| 825 | number t = F[i][2]*normalBundle(M,G); |
---|
| 826 | r = r + s/t; |
---|
| 827 | kill s,t,G; |
---|
| 828 | } |
---|
| 829 | return (r); |
---|
| 830 | } |
---|
| 831 | example |
---|
| 832 | { |
---|
| 833 | "EXAMPLE:"; echo=2; |
---|
[11d225] | 834 | ring r = 0,x,dp; |
---|
[6ba2a39] | 835 | linesHypersurface(2); |
---|
| 836 | linesHypersurface(3); |
---|
| 837 | linesHypersurface(4); |
---|
| 838 | linesHypersurface(5); |
---|
| 839 | linesHypersurface(6); |
---|
| 840 | linesHypersurface(7); |
---|
| 841 | linesHypersurface(8); |
---|
| 842 | linesHypersurface(9); |
---|
| 843 | linesHypersurface(10); |
---|
| 844 | } |
---|
| 845 | |
---|
| 846 | proc rationalCurve(int d, list #) |
---|
| 847 | "USAGE: rationalCurve(d,#); d int, # list |
---|
| 848 | RETURN: number |
---|
| 849 | THEORY: This is the Gromov-Witten invariant corresponding the number of |
---|
| 850 | rational curves on a general Calabi-Yau threefold. |
---|
| 851 | KEYWORDS: Gromov-Witten invariants, rational curves on Calabi-Yau threefolds |
---|
| 852 | SEE ALSO: linesHypersurface, multipleCover |
---|
| 853 | EXAMPLE: example rationalCurve; shows an example |
---|
| 854 | " |
---|
| 855 | { |
---|
| 856 | def R = basering; |
---|
| 857 | setring R; |
---|
| 858 | int n,i,j; |
---|
| 859 | if (size(#) == 0) {n = 4; list l = 5;} |
---|
| 860 | else {n = size(#)+3; list l = #;} |
---|
| 861 | variety P = projectiveSpace(n); |
---|
| 862 | stack M = moduliSpace(P,d); |
---|
| 863 | def F = fixedPoints(M); |
---|
| 864 | number r = 0; |
---|
| 865 | for (i=1;i<=size(F);i++) |
---|
| 866 | { |
---|
| 867 | graph G = F[i][1]; |
---|
| 868 | number s = 1; |
---|
| 869 | for (j=1;j<=size(l);j++) |
---|
| 870 | { |
---|
| 871 | s = s*contributionBundle(M,G,list(l[j])); |
---|
| 872 | } |
---|
| 873 | number t = F[i][2]*normalBundle(M,G); |
---|
| 874 | r = r + s/t; |
---|
| 875 | kill s,t,G; |
---|
| 876 | } |
---|
| 877 | return (r); |
---|
| 878 | } |
---|
| 879 | example |
---|
| 880 | { |
---|
| 881 | "EXAMPLE:"; echo=2; |
---|
[11d225] | 882 | ring r = 0,x,dp; |
---|
[6ba2a39] | 883 | rationalCurve(1); |
---|
| 884 | /* |
---|
| 885 | rationalCurve(2); |
---|
| 886 | rationalCurve(3); |
---|
| 887 | rationalCurve(4); |
---|
| 888 | rationalCurve(1,list(4,2)); |
---|
| 889 | rationalCurve(1,list(3,3)); |
---|
| 890 | rationalCurve(1,list(3,2,2)); |
---|
| 891 | rationalCurve(1,list(2,2,2,2)); |
---|
| 892 | rationalCurve(2,list(4,2)); |
---|
| 893 | rationalCurve(2,list(3,3)); |
---|
| 894 | rationalCurve(2,list(3,2,2)); |
---|
| 895 | rationalCurve(2,list(2,2,2,2)); |
---|
| 896 | rationalCurve(3,list(4,2)); |
---|
| 897 | rationalCurve(3,list(3,3)); |
---|
| 898 | rationalCurve(3,list(3,2,2)); |
---|
| 899 | rationalCurve(3,list(2,2,2,2)); |
---|
| 900 | rationalCurve(4,list(4,2)); |
---|
| 901 | rationalCurve(4,list(3,3)); |
---|
| 902 | rationalCurve(4,list(3,2,2)); |
---|
| 903 | rationalCurve(4,list(2,2,2,2)); |
---|
| 904 | } |
---|
| 905 | |
---|
| 906 | //////////////////////////////////////////////////////////////////////////////// |
---|
| 907 | /////////// Procedures concerned with graphs /////////////////////////////////// |
---|
| 908 | //////////////////////////////////////////////////////////////////////////////// |
---|
| 909 | |
---|
| 910 | proc printGraph(graph G) |
---|
| 911 | "USAGE: printGraph(G); G graph |
---|
| 912 | ASSUME: G is a graph. |
---|
| 913 | THEORY: This is the print function used by Singular to print a graph. |
---|
| 914 | KEYWORDS: graph |
---|
| 915 | EXAMPLE: example printGraph; shows an example |
---|
| 916 | " |
---|
| 917 | { |
---|
| 918 | "A graph with", size(G.vertices), "vertices and", size(G.edges), "edges"; |
---|
| 919 | } |
---|
| 920 | example |
---|
| 921 | { |
---|
| 922 | "EXAMPLE:"; echo=2; |
---|
[11d225] | 923 | ring r = 0,x,dp; |
---|
[6ba2a39] | 924 | graph G = makeGraph(list(list(0,1,list(0,1,2)),list(1,1,list(1,0,2))), |
---|
| 925 | list(list(0,1,2))); |
---|
| 926 | G; |
---|
| 927 | } |
---|
| 928 | |
---|
| 929 | proc makeGraph(list v, list e) |
---|
| 930 | "USAGE: makeGraph(v,e); v list, e list |
---|
| 931 | ASSUME: v is a list of vertices, e is a list of edges. |
---|
| 932 | RETURN: graph with vertices v and edges e. |
---|
| 933 | THEORY: Creates a graph from a list of vertices and edges. |
---|
| 934 | KEYWORDS: graph |
---|
| 935 | EXAMPLE: example makeGraph; shows an example |
---|
| 936 | { |
---|
| 937 | graph G; |
---|
| 938 | G.vertices = v; |
---|
| 939 | G.edges = e; |
---|
| 940 | return(G); |
---|
| 941 | } |
---|
| 942 | example |
---|
| 943 | { |
---|
| 944 | "EXAMPLE:"; echo=2; |
---|
[11d225] | 945 | ring r = 0,x,dp; |
---|
[6ba2a39] | 946 | graph G = makeGraph(list(list(0,1,list(0,1,2)),list(1,1,list(1,0,2))), |
---|
| 947 | list(list(0,1,2))); |
---|
| 948 | G; |
---|
| 949 | } |
---|
| 950 | |
---|
| 951 | static proc graph1(int d, int i, int j) |
---|
| 952 | { |
---|
| 953 | graph G; |
---|
| 954 | list f1 = i,j,d; |
---|
| 955 | list f2 = j,i,d; |
---|
| 956 | list v1 = i,1,f1; |
---|
| 957 | list v2 = j,1,f2; |
---|
| 958 | G.vertices = v1,v2; |
---|
| 959 | G.edges = list(f1); |
---|
| 960 | return (G); |
---|
| 961 | } |
---|
| 962 | |
---|
| 963 | static proc graph2(list d, int i, int j, int k) |
---|
| 964 | { |
---|
| 965 | graph G; |
---|
| 966 | list f1 = i,j,d[1]; |
---|
| 967 | list f2 = j,i,d[1]; |
---|
| 968 | list f3 = j,k,d[2]; |
---|
| 969 | list f4 = k,j,d[2]; |
---|
| 970 | list v1 = i,1,f1; |
---|
| 971 | list v2 = j,2,f2,f3; |
---|
| 972 | list v3 = k,1,f4; |
---|
| 973 | G.vertices = v1,v2,v3; |
---|
| 974 | G.edges = f1,f3; |
---|
| 975 | return (G); |
---|
| 976 | } |
---|
| 977 | |
---|
| 978 | static proc graph31(list d, int i, int j, int k, int h) |
---|
| 979 | { |
---|
| 980 | graph G; |
---|
| 981 | list f1 = i,j,d[1]; |
---|
| 982 | list f2 = j,i,d[1]; |
---|
| 983 | list f3 = j,k,d[2]; |
---|
| 984 | list f4 = k,j,d[2]; |
---|
| 985 | list f5 = k,h,d[3]; |
---|
| 986 | list f6 = h,k,d[3]; |
---|
| 987 | list v1 = i,1,f1; |
---|
| 988 | list v2 = j,2,f2,f3; |
---|
| 989 | list v3 = k,2,f4,f5; |
---|
| 990 | list v4 = h,1,f6; |
---|
| 991 | G.vertices = v1,v2,v3,v4; |
---|
| 992 | G.edges = f1,f3,f5; |
---|
| 993 | return (G); |
---|
| 994 | } |
---|
| 995 | |
---|
| 996 | static proc graph32(list d, int i, int j, int k, int h) |
---|
| 997 | { |
---|
| 998 | graph G; |
---|
| 999 | list f1 = i,j,d[1]; |
---|
| 1000 | list f2 = j,i,d[1]; |
---|
| 1001 | list f3 = j,k,d[2]; |
---|
| 1002 | list f4 = j,h,d[3]; |
---|
| 1003 | list f5 = k,j,d[2]; |
---|
| 1004 | list f6 = h,j,d[3]; |
---|
| 1005 | list v1 = i,1,f1; |
---|
| 1006 | list v2 = j,3,f2,f3,f4; |
---|
| 1007 | list v3 = k,1,f5; |
---|
| 1008 | list v4 = h,1,f6; |
---|
| 1009 | G.vertices = v1,v2,v3,v4; |
---|
| 1010 | G.edges = f1,f3,f4; |
---|
| 1011 | return (G); |
---|
| 1012 | } |
---|
| 1013 | |
---|
| 1014 | static proc graph41(list d, int i, int j, int k, int h, int l) |
---|
| 1015 | { |
---|
| 1016 | graph G; |
---|
| 1017 | list f1 = i,j,d[1]; |
---|
| 1018 | list f2 = j,i,d[1]; |
---|
| 1019 | list f3 = j,k,d[2]; |
---|
| 1020 | list f4 = k,j,d[2]; |
---|
| 1021 | list f5 = k,h,d[3]; |
---|
| 1022 | list f6 = h,k,d[3]; |
---|
| 1023 | list f7 = h,l,d[4]; |
---|
| 1024 | list f8 = l,h,d[4]; |
---|
| 1025 | list v1 = i,1,f1; |
---|
| 1026 | list v2 = j,2,f2,f3; |
---|
| 1027 | list v3 = k,2,f4,f5; |
---|
| 1028 | list v4 = h,2,f6,f7; |
---|
| 1029 | list v5 = l,1,f8; |
---|
| 1030 | G.vertices = v1,v2,v3,v4,v5; |
---|
| 1031 | G.edges = f1,f3,f5,f7; |
---|
| 1032 | return (G); |
---|
| 1033 | } |
---|
| 1034 | |
---|
| 1035 | static proc graph42(list d, int i, int j, int k, int h, int l) |
---|
| 1036 | { |
---|
| 1037 | graph G; |
---|
| 1038 | list f1 = i,j,d[1]; |
---|
| 1039 | list f2 = j,i,d[1]; |
---|
| 1040 | list f3 = j,k,d[2]; |
---|
| 1041 | list f4 = k,j,d[2]; |
---|
| 1042 | list f5 = k,h,d[3]; |
---|
| 1043 | list f6 = k,l,d[4]; |
---|
| 1044 | list f7 = h,k,d[3]; |
---|
| 1045 | list f8 = l,k,d[4]; |
---|
| 1046 | list v1 = i,1,f1; |
---|
| 1047 | list v2 = j,2,f2,f3; |
---|
| 1048 | list v3 = k,3,f4,f5,f6; |
---|
| 1049 | list v4 = h,1,f7; |
---|
| 1050 | list v5 = l,1,f8; |
---|
| 1051 | G.vertices = v1,v2,v3,v4,v5; |
---|
| 1052 | G.edges = f1,f3,f5,f6; |
---|
| 1053 | return (G); |
---|
| 1054 | } |
---|
| 1055 | |
---|
| 1056 | static proc graph43(list d, int i, int j, int k, int h, int l) |
---|
| 1057 | { |
---|
| 1058 | graph G; |
---|
| 1059 | list f1 = i,j,d[1]; |
---|
| 1060 | list f2 = j,i,d[1]; |
---|
| 1061 | list f3 = j,k,d[2]; |
---|
| 1062 | list f4 = j,h,d[3]; |
---|
| 1063 | list f5 = j,l,d[4]; |
---|
| 1064 | list f6 = k,j,d[2]; |
---|
| 1065 | list f7 = h,j,d[3]; |
---|
| 1066 | list f8 = l,j,d[4]; |
---|
| 1067 | list v1 = i,1,f1; |
---|
| 1068 | list v2 = j,4,f2,f3,f4,f5; |
---|
| 1069 | list v3 = k,1,f6; |
---|
| 1070 | list v4 = h,1,f7; |
---|
| 1071 | list v5 = l,1,f8; |
---|
| 1072 | G.vertices = v1,v2,v3,v4,v5; |
---|
| 1073 | G.edges = f1,f3,f4,f5; |
---|
| 1074 | return (G); |
---|
| 1075 | } |
---|
| 1076 | |
---|
| 1077 | static proc graph51(list d, int i, int j, int k, int h, int m, int n) |
---|
| 1078 | { |
---|
| 1079 | graph G; |
---|
| 1080 | list f1 = i,j,d[1]; |
---|
| 1081 | list f2 = j,i,d[1]; |
---|
| 1082 | list f3 = j,k,d[2]; |
---|
| 1083 | list f4 = k,j,d[2]; |
---|
| 1084 | list f5 = k,h,d[3]; |
---|
| 1085 | list f6 = h,k,d[3]; |
---|
| 1086 | list f7 = h,m,d[4]; |
---|
| 1087 | list f8 = m,h,d[4]; |
---|
| 1088 | list f9 = m,n,d[5]; |
---|
| 1089 | list f10 = n,m,d[5]; |
---|
| 1090 | list v1 = i,1,f1; |
---|
| 1091 | list v2 = j,2,f2,f3; |
---|
| 1092 | list v3 = k,2,f4,f5; |
---|
| 1093 | list v4 = h,2,f6,f7; |
---|
| 1094 | list v5 = m,2,f8,f9; |
---|
| 1095 | list v6 = n,1,f10; |
---|
| 1096 | G.vertices = v1,v2,v3,v4,v5,v6; |
---|
| 1097 | G.edges = f1,f3,f5,f7,f9; |
---|
| 1098 | return (G); |
---|
| 1099 | } |
---|
| 1100 | |
---|
| 1101 | static proc graph52(list d, int i, int j, int k, int h, int m, int n) |
---|
| 1102 | { |
---|
| 1103 | graph G; |
---|
| 1104 | list f1 = i,j,d[1]; |
---|
| 1105 | list f2 = j,i,d[1]; |
---|
| 1106 | list f3 = j,k,d[2]; |
---|
| 1107 | list f4 = k,j,d[2]; |
---|
| 1108 | list f5 = k,h,d[3]; |
---|
| 1109 | list f6 = h,k,d[3]; |
---|
| 1110 | list f7 = h,m,d[4]; |
---|
| 1111 | list f8 = m,h,d[4]; |
---|
| 1112 | list f9 = h,n,d[5]; |
---|
| 1113 | list f10 = n,h,d[5]; |
---|
| 1114 | list v1 = i,1,f1; |
---|
| 1115 | list v2 = j,2,f2,f3; |
---|
| 1116 | list v3 = k,2,f4,f5; |
---|
| 1117 | list v4 = h,3,f6,f7,f9; |
---|
| 1118 | list v5 = m,1,f8; |
---|
| 1119 | list v6 = n,1,f10; |
---|
| 1120 | G.vertices = v1,v2,v3,v4,v5,v6; |
---|
| 1121 | G.edges = f1,f3,f5,f7,f9; |
---|
| 1122 | return (G); |
---|
| 1123 | } |
---|
| 1124 | |
---|
| 1125 | static proc graph53(list d, int i, int j, int k, int h, int m, int n) |
---|
| 1126 | { |
---|
| 1127 | graph G; |
---|
| 1128 | list f1 = i,j,d[1]; |
---|
| 1129 | list f2 = j,i,d[1]; |
---|
| 1130 | list f3 = j,k,d[2]; |
---|
| 1131 | list f4 = k,j,d[2]; |
---|
| 1132 | list f5 = k,h,d[3]; |
---|
| 1133 | list f6 = h,k,d[3]; |
---|
| 1134 | list f7 = k,m,d[4]; |
---|
| 1135 | list f8 = m,k,d[4]; |
---|
| 1136 | list f9 = k,n,d[5]; |
---|
| 1137 | list f10 = n,k,d[5]; |
---|
| 1138 | list v1 = i,1,f1; |
---|
| 1139 | list v2 = j,2,f2,f3; |
---|
| 1140 | list v3 = k,4,f4,f5,f7,f9; |
---|
| 1141 | list v4 = h,1,f6; |
---|
| 1142 | list v5 = m,1,f8; |
---|
| 1143 | list v6 = n,1,f10; |
---|
| 1144 | G.vertices = v1,v2,v3,v4,v5,v6; |
---|
| 1145 | G.edges = f1,f3,f5,f7,f9; |
---|
| 1146 | return (G); |
---|
| 1147 | } |
---|
| 1148 | |
---|
| 1149 | static proc graph54(list d, int i, int j, int k, int h, int m, int n) |
---|
| 1150 | { |
---|
| 1151 | graph G; |
---|
| 1152 | list f1 = i,j,d[1]; |
---|
| 1153 | list f2 = j,i,d[1]; |
---|
| 1154 | list f3 = j,k,d[2]; |
---|
| 1155 | list f4 = k,j,d[2]; |
---|
| 1156 | list f5 = j,h,d[3]; |
---|
| 1157 | list f6 = h,j,d[3]; |
---|
| 1158 | list f7 = h,m,d[4]; |
---|
| 1159 | list f8 = m,h,d[4]; |
---|
| 1160 | list f9 = h,n,d[5]; |
---|
| 1161 | list f10 = n,h,d[5]; |
---|
| 1162 | list v1 = i,1,f1; |
---|
| 1163 | list v2 = j,3,f2,f3,f5; |
---|
| 1164 | list v3 = k,1,f4; |
---|
| 1165 | list v4 = h,3,f6,f7,f9; |
---|
| 1166 | list v5 = m,1,f8; |
---|
| 1167 | list v6 = n,1,f10; |
---|
| 1168 | G.vertices = v1,v2,v3,v4,v5,v6; |
---|
| 1169 | G.edges = f1,f3,f5,f7,f9; |
---|
| 1170 | return (G); |
---|
| 1171 | } |
---|
| 1172 | |
---|
| 1173 | static proc graph55(list d, int i, int j, int k, int h, int m, int n) |
---|
| 1174 | { |
---|
| 1175 | graph G; |
---|
| 1176 | list f1 = i,j,d[1]; |
---|
| 1177 | list f2 = j,i,d[1]; |
---|
| 1178 | list f3 = j,k,d[2]; |
---|
| 1179 | list f4 = k,j,d[2]; |
---|
| 1180 | list f5 = k,h,d[3]; |
---|
| 1181 | list f6 = h,k,d[3]; |
---|
| 1182 | list f7 = k,m,d[4]; |
---|
| 1183 | list f8 = m,k,d[4]; |
---|
| 1184 | list f9 = h,n,d[5]; |
---|
| 1185 | list f10 = n,h,d[5]; |
---|
| 1186 | list v1 = i,1,f1; |
---|
| 1187 | list v2 = j,2,f2,f3; |
---|
| 1188 | list v3 = k,3,f4,f5,f7; |
---|
| 1189 | list v4 = h,2,f6,f9; |
---|
| 1190 | list v5 = m,1,f8; |
---|
| 1191 | list v6 = n,1,f10; |
---|
| 1192 | G.vertices = v1,v2,v3,v4,v5,v6; |
---|
| 1193 | G.edges = f1,f3,f5,f7,f9; |
---|
| 1194 | return (G); |
---|
| 1195 | } |
---|
| 1196 | |
---|
| 1197 | static proc graph56(list d, int i, int j, int k, int h, int m, int n) |
---|
| 1198 | { |
---|
| 1199 | graph G; |
---|
| 1200 | list f1 = i,j,d[1]; |
---|
| 1201 | list f2 = j,i,d[1]; |
---|
| 1202 | list f3 = j,k,d[2]; |
---|
| 1203 | list f4 = k,j,d[2]; |
---|
| 1204 | list f5 = j,h,d[3]; |
---|
| 1205 | list f6 = h,j,d[3]; |
---|
| 1206 | list f7 = j,m,d[4]; |
---|
| 1207 | list f8 = m,j,d[4]; |
---|
| 1208 | list f9 = j,n,d[5]; |
---|
| 1209 | list f10 = n,j,d[5]; |
---|
| 1210 | list v1 = i,1,f1; |
---|
| 1211 | list v2 = j,5,f2,f3,f5,f7,f9; |
---|
| 1212 | list v3 = k,1,f4; |
---|
| 1213 | list v4 = h,1,f6; |
---|
| 1214 | list v5 = m,1,f8; |
---|
| 1215 | list v6 = n,1,f10; |
---|
| 1216 | G.vertices = v1,v2,v3,v4,v5,v6; |
---|
| 1217 | G.edges = f1,f3,f5,f7,f9; |
---|
| 1218 | return (G); |
---|
| 1219 | } |
---|
| 1220 | |
---|
| 1221 | static proc graph61(list d, int i, int j, int k, int h, int m, int n, int p) |
---|
| 1222 | { |
---|
| 1223 | graph G; |
---|
| 1224 | list f1 = i,j,d[1]; |
---|
| 1225 | list f2 = j,i,d[1]; |
---|
| 1226 | list f3 = j,k,d[2]; |
---|
| 1227 | list f4 = k,j,d[2]; |
---|
| 1228 | list f5 = k,h,d[3]; |
---|
| 1229 | list f6 = h,k,d[3]; |
---|
| 1230 | list f7 = h,m,d[4]; |
---|
| 1231 | list f8 = m,h,d[4]; |
---|
| 1232 | list f9 = m,n,d[5]; |
---|
| 1233 | list f10 = n,m,d[5]; |
---|
| 1234 | list f11 = n,p,d[6]; |
---|
| 1235 | list f12 = p,n,d[6]; |
---|
| 1236 | list v1 = i,1,f1; |
---|
| 1237 | list v2 = j,2,f2,f3; |
---|
| 1238 | list v3 = k,2,f4,f5; |
---|
| 1239 | list v4 = h,2,f6,f7; |
---|
| 1240 | list v5 = m,2,f8,f9; |
---|
| 1241 | list v6 = n,2,f10,f11; |
---|
| 1242 | list v7 = p,1,f12; |
---|
| 1243 | G.vertices = v1,v2,v3,v4,v5,v6,v7; |
---|
| 1244 | G.edges = f1,f3,f5,f7,f9,f11; |
---|
| 1245 | return (G); |
---|
| 1246 | } |
---|
| 1247 | |
---|
| 1248 | static proc graph62(list d, int i, int j, int k, int h, int m, int n, int p) |
---|
| 1249 | { |
---|
| 1250 | graph G; |
---|
| 1251 | list f1 = i,j,d[1]; |
---|
| 1252 | list f2 = j,i,d[1]; |
---|
| 1253 | list f3 = j,k,d[2]; |
---|
| 1254 | list f4 = k,j,d[2]; |
---|
| 1255 | list f5 = k,h,d[3]; |
---|
| 1256 | list f6 = h,k,d[3]; |
---|
| 1257 | list f7 = h,m,d[4]; |
---|
| 1258 | list f8 = m,h,d[4]; |
---|
| 1259 | list f9 = m,n,d[5]; |
---|
| 1260 | list f10 = n,m,d[5]; |
---|
| 1261 | list f11 = m,p,d[6]; |
---|
| 1262 | list f12 = p,m,d[6]; |
---|
| 1263 | list v1 = i,1,f1; |
---|
| 1264 | list v2 = j,2,f2,f3; |
---|
| 1265 | list v3 = k,2,f4,f5; |
---|
| 1266 | list v4 = h,2,f6,f7; |
---|
| 1267 | list v5 = m,3,f8,f9,f11; |
---|
| 1268 | list v6 = n,1,f10; |
---|
| 1269 | list v7 = p,1,f12; |
---|
| 1270 | G.vertices = v1,v2,v3,v4,v5,v6,v7; |
---|
| 1271 | G.edges = f1,f3,f5,f7,f9,f11; |
---|
| 1272 | return (G); |
---|
| 1273 | } |
---|
| 1274 | |
---|
| 1275 | static proc graph63(list d, int i, int j, int k, int h, int m, int n, int p) |
---|
| 1276 | { |
---|
| 1277 | graph G; |
---|
| 1278 | list f1 = i,j,d[1]; |
---|
| 1279 | list f2 = j,i,d[1]; |
---|
| 1280 | list f3 = j,k,d[2]; |
---|
| 1281 | list f4 = k,j,d[2]; |
---|
| 1282 | list f5 = k,h,d[3]; |
---|
| 1283 | list f6 = h,k,d[3]; |
---|
| 1284 | list f7 = h,m,d[4]; |
---|
| 1285 | list f8 = m,h,d[4]; |
---|
| 1286 | list f9 = h,n,d[5]; |
---|
| 1287 | list f10 = n,h,d[5]; |
---|
| 1288 | list f11 = n,p,d[6]; |
---|
| 1289 | list f12 = p,n,d[6]; |
---|
| 1290 | list v1 = i,1,f1; |
---|
| 1291 | list v2 = j,2,f2,f3; |
---|
| 1292 | list v3 = k,2,f4,f5; |
---|
| 1293 | list v4 = h,3,f6,f7,f9; |
---|
| 1294 | list v5 = m,1,f8; |
---|
| 1295 | list v6 = n,2,f10,f11; |
---|
| 1296 | list v7 = p,1,f12; |
---|
| 1297 | G.vertices = v1,v2,v3,v4,v5,v6,v7; |
---|
| 1298 | G.edges = f1,f3,f5,f7,f9,f11; |
---|
| 1299 | return (G); |
---|
| 1300 | } |
---|
| 1301 | |
---|
| 1302 | static proc graph64(list d, int i, int j, int k, int h, int m, int n, int p) |
---|
| 1303 | { |
---|
| 1304 | graph G; |
---|
| 1305 | list f1 = i,j,d[1]; |
---|
| 1306 | list f2 = j,i,d[1]; |
---|
| 1307 | list f3 = j,k,d[2]; |
---|
| 1308 | list f4 = k,j,d[2]; |
---|
| 1309 | list f5 = k,h,d[3]; |
---|
| 1310 | list f6 = h,k,d[3]; |
---|
| 1311 | list f7 = h,m,d[4]; |
---|
| 1312 | list f8 = m,h,d[4]; |
---|
| 1313 | list f9 = h,n,d[5]; |
---|
| 1314 | list f10 = n,h,d[5]; |
---|
| 1315 | list f11 = h,p,d[6]; |
---|
| 1316 | list f12 = p,h,d[6]; |
---|
| 1317 | list v1 = i,1,f1; |
---|
| 1318 | list v2 = j,2,f2,f3; |
---|
| 1319 | list v3 = k,2,f4,f5; |
---|
| 1320 | list v4 = h,4,f6,f7,f9,f11; |
---|
| 1321 | list v5 = m,1,f8; |
---|
| 1322 | list v6 = n,1,f10; |
---|
| 1323 | list v7 = p,1,f12; |
---|
| 1324 | G.vertices = v1,v2,v3,v4,v5,v6,v7; |
---|
| 1325 | G.edges = f1,f3,f5,f7,f9,f11; |
---|
| 1326 | return (G); |
---|
| 1327 | } |
---|
| 1328 | |
---|
| 1329 | static proc graph65(list d, int i, int j, int k, int h, int m, int n, int p) |
---|
| 1330 | { |
---|
| 1331 | graph G; |
---|
| 1332 | list f1 = i,j,d[1]; |
---|
| 1333 | list f2 = j,i,d[1]; |
---|
| 1334 | list f3 = j,k,d[2]; |
---|
| 1335 | list f4 = k,j,d[2]; |
---|
| 1336 | list f5 = k,h,d[3]; |
---|
| 1337 | list f6 = h,k,d[3]; |
---|
| 1338 | list f7 = k,m,d[4]; |
---|
| 1339 | list f8 = m,k,d[4]; |
---|
| 1340 | list f9 = k,n,d[5]; |
---|
| 1341 | list f10 = n,k,d[5]; |
---|
| 1342 | list f11 = n,p,d[6]; |
---|
| 1343 | list f12 = p,n,d[6]; |
---|
| 1344 | list v1 = i,1,f1; |
---|
| 1345 | list v2 = j,2,f2,f3; |
---|
| 1346 | list v3 = k,4,f4,f5,f7,f9; |
---|
| 1347 | list v4 = h,1,f6; |
---|
| 1348 | list v5 = m,1,f8; |
---|
| 1349 | list v6 = n,2,f10,f11; |
---|
| 1350 | list v7 = p,1,f12; |
---|
| 1351 | G.vertices = v1,v2,v3,v4,v5,v6,v7; |
---|
| 1352 | G.edges = f1,f3,f5,f7,f9,f11; |
---|
| 1353 | return (G); |
---|
| 1354 | } |
---|
| 1355 | |
---|
| 1356 | static proc graph66(list d, int i, int j, int k, int h, int m, int n, int p) |
---|
| 1357 | { |
---|
| 1358 | graph G; |
---|
| 1359 | list f1 = i,j,d[1]; |
---|
| 1360 | list f2 = j,i,d[1]; |
---|
| 1361 | list f3 = j,k,d[2]; |
---|
| 1362 | list f4 = k,j,d[2]; |
---|
| 1363 | list f5 = k,h,d[3]; |
---|
| 1364 | list f6 = h,k,d[3]; |
---|
| 1365 | list f7 = k,m,d[4]; |
---|
| 1366 | list f8 = m,k,d[4]; |
---|
| 1367 | list f9 = h,n,d[5]; |
---|
| 1368 | list f10 = n,h,d[5]; |
---|
| 1369 | list f11 = m,p,d[6]; |
---|
| 1370 | list f12 = p,m,d[6]; |
---|
| 1371 | list v1 = i,1,f1; |
---|
| 1372 | list v2 = j,2,f2,f3; |
---|
| 1373 | list v3 = k,3,f4,f5,f7; |
---|
| 1374 | list v4 = h,2,f6,f9; |
---|
[11d225] | 1375 | list v5 = m,2,f8,f11; |
---|
[6ba2a39] | 1376 | list v6 = n,1,f10; |
---|
| 1377 | list v7 = p,1,f12; |
---|
| 1378 | G.vertices = v1,v2,v3,v4,v5,v6,v7; |
---|
| 1379 | G.edges = f1,f3,f5,f7,f9,f11; |
---|
| 1380 | return (G); |
---|
| 1381 | } |
---|
| 1382 | |
---|
| 1383 | static proc graph67(list d, int i, int j, int k, int h, int m, int n, int p) |
---|
| 1384 | { |
---|
| 1385 | graph G; |
---|
| 1386 | list f1 = i,j,d[1]; |
---|
| 1387 | list f2 = j,i,d[1]; |
---|
| 1388 | list f3 = j,k,d[2]; |
---|
| 1389 | list f4 = k,j,d[2]; |
---|
| 1390 | list f5 = j,h,d[3]; |
---|
| 1391 | list f6 = h,j,d[3]; |
---|
| 1392 | list f7 = h,m,d[4]; |
---|
| 1393 | list f8 = m,h,d[4]; |
---|
| 1394 | list f9 = m,n,d[5]; |
---|
| 1395 | list f10 = n,m,d[5]; |
---|
| 1396 | list f11 = m,p,d[6]; |
---|
| 1397 | list f12 = p,m,d[6]; |
---|
| 1398 | list v1 = i,1,f1; |
---|
| 1399 | list v2 = j,3,f2,f3,f5; |
---|
| 1400 | list v3 = k,1,f4; |
---|
| 1401 | list v4 = h,2,f6,f7; |
---|
| 1402 | list v5 = m,3,f8,f9,f11; |
---|
| 1403 | list v6 = n,1,f10; |
---|
| 1404 | list v7 = p,1,f12; |
---|
| 1405 | G.vertices = v1,v2,v3,v4,v5,v6,v7; |
---|
| 1406 | G.edges = f1,f3,f5,f7,f9,f11; |
---|
| 1407 | return (G); |
---|
| 1408 | } |
---|
| 1409 | |
---|
| 1410 | static proc graph68(list d, int i, int j, int k, int h, int m, int n, int p) |
---|
| 1411 | { |
---|
| 1412 | graph G; |
---|
| 1413 | list f1 = i,j,d[1]; |
---|
| 1414 | list f2 = j,i,d[1]; |
---|
| 1415 | list f3 = j,k,d[2]; |
---|
| 1416 | list f4 = k,j,d[2]; |
---|
| 1417 | list f5 = j,h,d[3]; |
---|
| 1418 | list f6 = h,j,d[3]; |
---|
| 1419 | list f7 = h,m,d[4]; |
---|
| 1420 | list f8 = m,h,d[4]; |
---|
| 1421 | list f9 = h,n,d[5]; |
---|
| 1422 | list f10 = n,h,d[5]; |
---|
| 1423 | list f11 = h,p,d[6]; |
---|
| 1424 | list f12 = p,h,d[6]; |
---|
| 1425 | list v1 = i,1,f1; |
---|
| 1426 | list v2 = j,3,f2,f3,f5; |
---|
| 1427 | list v3 = k,1,f4; |
---|
| 1428 | list v4 = h,4,f6,f7,f9,f11; |
---|
| 1429 | list v5 = m,1,f8; |
---|
| 1430 | list v6 = n,1,f10; |
---|
| 1431 | list v7 = p,1,f12; |
---|
| 1432 | G.vertices = v1,v2,v3,v4,v5,v6,v7; |
---|
| 1433 | G.edges = f1,f3,f5,f7,f9,f11; |
---|
| 1434 | return (G); |
---|
| 1435 | } |
---|
| 1436 | |
---|
| 1437 | static proc graph69(list d, int i, int j, int k, int h, int m, int n, int p) |
---|
| 1438 | { |
---|
| 1439 | graph G; |
---|
| 1440 | list f1 = i,j,d[1]; |
---|
| 1441 | list f2 = j,i,d[1]; |
---|
| 1442 | list f3 = j,k,d[2]; |
---|
| 1443 | list f4 = k,j,d[2]; |
---|
| 1444 | list f5 = j,h,d[3]; |
---|
| 1445 | list f6 = h,j,d[3]; |
---|
| 1446 | list f7 = h,m,d[4]; |
---|
| 1447 | list f8 = m,h,d[4]; |
---|
| 1448 | list f9 = h,n,d[5]; |
---|
| 1449 | list f10 = n,h,d[5]; |
---|
| 1450 | list f11 = n,p,d[6]; |
---|
| 1451 | list f12 = p,n,d[6]; |
---|
| 1452 | list v1 = i,1,f1; |
---|
| 1453 | list v2 = j,3,f2,f3,f5; |
---|
| 1454 | list v3 = k,1,f4; |
---|
| 1455 | list v4 = h,3,f6,f7,f9; |
---|
| 1456 | list v5 = m,1,f8; |
---|
| 1457 | list v6 = n,2,f10,f11; |
---|
| 1458 | list v7 = p,1,f12; |
---|
| 1459 | G.vertices = v1,v2,v3,v4,v5,v6,v7; |
---|
| 1460 | G.edges = f1,f3,f5,f7,f9,f11; |
---|
| 1461 | return (G); |
---|
| 1462 | } |
---|
| 1463 | |
---|
| 1464 | static proc graph610(list d, int i, int j, int k, int h, int m, int n, int p) |
---|
| 1465 | { |
---|
| 1466 | graph G; |
---|
| 1467 | list f1 = i,j,d[1]; |
---|
| 1468 | list f2 = j,i,d[1]; |
---|
| 1469 | list f3 = j,k,d[2]; |
---|
| 1470 | list f4 = k,j,d[2]; |
---|
| 1471 | list f5 = k,h,d[3]; |
---|
| 1472 | list f6 = h,k,d[3]; |
---|
| 1473 | list f7 = k,m,d[4]; |
---|
| 1474 | list f8 = m,k,d[4]; |
---|
| 1475 | list f9 = k,n,d[5]; |
---|
| 1476 | list f10 = n,k,d[5]; |
---|
| 1477 | list f11 = k,p,d[6]; |
---|
| 1478 | list f12 = p,k,d[6]; |
---|
| 1479 | list v1 = i,1,f1; |
---|
| 1480 | list v2 = j,2,f2,f3; |
---|
| 1481 | list v3 = k,5,f4,f5,f7,f9,f11; |
---|
| 1482 | list v4 = h,1,f6; |
---|
| 1483 | list v5 = m,1,f8; |
---|
| 1484 | list v6 = n,1,f10; |
---|
| 1485 | list v7 = p,1,f12; |
---|
| 1486 | G.vertices = v1,v2,v3,v4,v5,v6,v7; |
---|
| 1487 | G.edges = f1,f3,f5,f7,f9,f11; |
---|
| 1488 | return (G); |
---|
| 1489 | } |
---|
| 1490 | |
---|
| 1491 | static proc graph611(list d, int i, int j, int k, int h, int m, int n, int p) |
---|
| 1492 | { |
---|
| 1493 | graph G; |
---|
| 1494 | list f1 = i,j,d[1]; |
---|
| 1495 | list f2 = j,i,d[1]; |
---|
| 1496 | list f3 = j,k,d[2]; |
---|
| 1497 | list f4 = k,j,d[2]; |
---|
| 1498 | list f5 = j,h,d[3]; |
---|
| 1499 | list f6 = h,j,d[3]; |
---|
| 1500 | list f7 = j,m,d[4]; |
---|
| 1501 | list f8 = m,j,d[4]; |
---|
| 1502 | list f9 = j,n,d[5]; |
---|
| 1503 | list f10 = n,j,d[5]; |
---|
| 1504 | list f11 = j,p,d[6]; |
---|
| 1505 | list f12 = p,j,d[6]; |
---|
| 1506 | list v1 = i,1,f1; |
---|
| 1507 | list v2 = j,6,f2,f3,f5,f7,f9,f11; |
---|
| 1508 | list v3 = k,1,f4; |
---|
| 1509 | list v4 = h,1,f6; |
---|
| 1510 | list v5 = m,1,f8; |
---|
| 1511 | list v6 = n,1,f10; |
---|
| 1512 | list v7 = p,1,f12; |
---|
| 1513 | G.vertices = v1,v2,v3,v4,v5,v6,v7; |
---|
| 1514 | G.edges = f1,f3,f5,f7,f9,f11; |
---|
| 1515 | return (G); |
---|
| 1516 | } |
---|
| 1517 | |
---|
[31e974] | 1518 | proc part(poly f, int n) |
---|
| 1519 | "USAGE: part(f,n); f poly, n int |
---|
| 1520 | RETURN: poly |
---|
[6ba2a39] | 1521 | PURPOSE: computing the homogeneous component of a polynomial. |
---|
[31e974] | 1522 | EXAMPLE: example part; shows examples |
---|
| 1523 | " |
---|
[2d5ff5] | 1524 | { |
---|
| 1525 | int i; |
---|
| 1526 | poly p; |
---|
| 1527 | for (i=1;i<=size(f);i++) |
---|
| 1528 | { |
---|
[31e974] | 1529 | if (deg(f[i])==n) {p=p+f[i];} |
---|
[2d5ff5] | 1530 | } |
---|
| 1531 | return (p); |
---|
| 1532 | } |
---|
[31e974] | 1533 | example |
---|
| 1534 | { |
---|
| 1535 | "EXAMPLE:"; echo=2; |
---|
| 1536 | ring r = 0,(x,y,z),wp(1,2,3); |
---|
| 1537 | poly f = 1+x+x2+x3+x4+y+y2+y3+z+z2+xy+xz+yz+xyz; |
---|
| 1538 | part(f,0); |
---|
| 1539 | part(f,1); |
---|
| 1540 | part(f,2); |
---|
| 1541 | part(f,3); |
---|
| 1542 | part(f,4); |
---|
| 1543 | part(f,5); |
---|
| 1544 | part(f,6); |
---|
| 1545 | } |
---|
[2d5ff5] | 1546 | |
---|
[31e974] | 1547 | proc parts(poly f, int i, int j) |
---|
| 1548 | "USAGE: parts(f,i,j); f poly, i int, j int |
---|
| 1549 | RETURN: poly |
---|
[6ba2a39] | 1550 | THEORY: computing a polynomial which is the sum of the homogeneous |
---|
| 1551 | components of a polynomial. |
---|
[31e974] | 1552 | EXAMPLE: example parts; shows examples |
---|
| 1553 | " |
---|
[2d5ff5] | 1554 | { |
---|
| 1555 | int k; |
---|
| 1556 | poly p; |
---|
| 1557 | for (k=i;k<=j;k++) |
---|
| 1558 | { |
---|
| 1559 | p=p+part(f,k); |
---|
| 1560 | } |
---|
| 1561 | return (p); |
---|
| 1562 | } |
---|
[31e974] | 1563 | example |
---|
| 1564 | { |
---|
| 1565 | "EXAMPLE:"; echo=2; |
---|
| 1566 | ring r = 0,(x,y,z),wp(1,2,3); |
---|
| 1567 | poly f = 1+x+x2+x3+x4+y+y2+y3+z+z2+xy+xz+yz+xyz; |
---|
| 1568 | parts(f,2,4); |
---|
| 1569 | } |
---|
[6ba2a39] | 1570 | |
---|
[31e974] | 1571 | proc logg(poly f, int n) |
---|
| 1572 | "USAGE: logg(f,n); f poly, n int |
---|
| 1573 | RETURN: poly |
---|
[6ba2a39] | 1574 | THEORY: computing Chern characters from total Chern classes. |
---|
[31e974] | 1575 | EXAMPLE: example logg; shows examples |
---|
| 1576 | " |
---|
[2d5ff5] | 1577 | { |
---|
| 1578 | poly p; |
---|
| 1579 | int i,j,k,m; |
---|
| 1580 | if (n==0) {p=0;} |
---|
| 1581 | if (n==1) {p=part(f,1);} |
---|
| 1582 | else |
---|
| 1583 | { |
---|
| 1584 | list l=-part(f,1); |
---|
| 1585 | for (j=2;j<=n;j++) |
---|
| 1586 | { |
---|
| 1587 | poly q; |
---|
| 1588 | for (k=1;k<j;k++) |
---|
| 1589 | { |
---|
| 1590 | q=q+part(f,k)*l[j-k]; |
---|
| 1591 | } |
---|
| 1592 | q=-j*part(f,j)-q; |
---|
| 1593 | l=insert(l,q,size(l)); |
---|
| 1594 | kill q; |
---|
| 1595 | } |
---|
| 1596 | for (m=1;m<=n;m++) |
---|
| 1597 | { |
---|
| 1598 | p=p+1/factorial(m)*(-1)^m*l[m]; |
---|
| 1599 | } |
---|
| 1600 | } |
---|
| 1601 | return (p); |
---|
| 1602 | } |
---|
[31e974] | 1603 | example |
---|
| 1604 | { |
---|
| 1605 | "EXAMPLE:"; echo=2; |
---|
| 1606 | ring r = 0,(x,y),wp(1,2); |
---|
| 1607 | poly f = 1+x+y; |
---|
| 1608 | logg(f,4); |
---|
| 1609 | } |
---|
[2d5ff5] | 1610 | |
---|
[31e974] | 1611 | proc expp(poly f, int n) |
---|
| 1612 | "USAGE: expp(f,n); f poly, n int |
---|
| 1613 | RETURN: poly |
---|
[6ba2a39] | 1614 | PURPOSE: computing total Chern classes from Chern characters. |
---|
[31e974] | 1615 | EXAMPLE: example expp; shows examples |
---|
| 1616 | " |
---|
[2d5ff5] | 1617 | { |
---|
| 1618 | poly p; |
---|
| 1619 | int i,j,k; |
---|
| 1620 | if (deg(f)==0) {p=1;} |
---|
| 1621 | else |
---|
| 1622 | { |
---|
| 1623 | list l=1; |
---|
| 1624 | for (i=1;i<=n;i++) |
---|
| 1625 | { |
---|
| 1626 | poly q; |
---|
| 1627 | for (j=1;j<=i;j++) |
---|
| 1628 | { |
---|
| 1629 | q=q+factorial(j)*(-1)^(j-1)*l[i-j+1]*part(f,j)/i; |
---|
| 1630 | } |
---|
| 1631 | l=insert(l,q,size(l)); |
---|
| 1632 | kill q; |
---|
| 1633 | } |
---|
| 1634 | for (k=1;k<=size(l);k++) |
---|
| 1635 | { |
---|
| 1636 | p=p+l[k]; |
---|
| 1637 | } |
---|
| 1638 | } |
---|
| 1639 | return (p); |
---|
| 1640 | } |
---|
[31e974] | 1641 | example |
---|
| 1642 | { |
---|
| 1643 | "EXAMPLE:"; echo=2; |
---|
[11d225] | 1644 | ring r = 0,x,dp; |
---|
[31e974] | 1645 | poly f = 3+x; |
---|
| 1646 | expp(f,3); |
---|
| 1647 | } |
---|
[2d5ff5] | 1648 | |
---|
| 1649 | static proc adams(poly f, int n) |
---|
| 1650 | { |
---|
| 1651 | poly p; |
---|
| 1652 | int i; |
---|
| 1653 | for (i=0;i<=deg(f);i++) |
---|
| 1654 | { |
---|
| 1655 | p=p+n^i*part(f,i); |
---|
| 1656 | } |
---|
| 1657 | return (p); |
---|
| 1658 | } |
---|
| 1659 | |
---|
| 1660 | static proc wedges(int n, poly f, int d) |
---|
| 1661 | { |
---|
| 1662 | int i,j; |
---|
| 1663 | list l; |
---|
| 1664 | if (n==0) {l=1;} |
---|
| 1665 | if (n==1) {l=1,f;} |
---|
| 1666 | else |
---|
| 1667 | { |
---|
| 1668 | l=1,f; |
---|
| 1669 | for (i=2;i<=n;i++) |
---|
| 1670 | { |
---|
| 1671 | poly q; |
---|
| 1672 | for (j=1;j<=i;j++) |
---|
| 1673 | { |
---|
| 1674 | q=q+((-1)^(i-j))*parts(l[j]*adams(f,i-j+1),0,d)/i; |
---|
| 1675 | } |
---|
| 1676 | l=insert(l,q,size(l)); |
---|
| 1677 | kill q; |
---|
| 1678 | } |
---|
| 1679 | } |
---|
| 1680 | return (l); |
---|
| 1681 | } |
---|
| 1682 | |
---|
| 1683 | static proc schur(list p, poly f) |
---|
| 1684 | { |
---|
| 1685 | int i,j; |
---|
| 1686 | int n = size(p); |
---|
| 1687 | matrix M[n][n]; |
---|
| 1688 | for (i=1;i<=n;i++) |
---|
| 1689 | { |
---|
| 1690 | for (j=1;j<=n;j++) |
---|
| 1691 | { |
---|
| 1692 | M[i,j] = part(f,p[i]+j-i); |
---|
| 1693 | } |
---|
| 1694 | } |
---|
| 1695 | return (det(M)); |
---|
| 1696 | } |
---|
| 1697 | |
---|
[31e974] | 1698 | //////////////////////////////////////////////////////////////////////////////// |
---|
[6ba2a39] | 1699 | //////// Procedures concerned with abstract varieties ////////////////////////// |
---|
[2d5ff5] | 1700 | //////////////////////////////////////////////////////////////////////////////// |
---|
| 1701 | |
---|
[6ba2a39] | 1702 | proc printVariety(variety V) |
---|
| 1703 | "USAGE: printVariety(V); V variety |
---|
| 1704 | ASSUME: V is an abstract variety |
---|
| 1705 | THEORY: This is the print function used by Singular to print an abstract |
---|
| 1706 | variety. |
---|
| 1707 | KEYWORDS: abstract variety, projective space, Grassmannian |
---|
| 1708 | EXAMPLE: example printVariety; shows an example |
---|
| 1709 | " |
---|
[2d5ff5] | 1710 | { |
---|
[31e974] | 1711 | "A variety of dimension", V.dimension; |
---|
[2d5ff5] | 1712 | } |
---|
[6ba2a39] | 1713 | example |
---|
| 1714 | { |
---|
| 1715 | "EXAMPLE:"; echo=2; |
---|
[11d225] | 1716 | ring r = 0,(h,e),wp(1,1); |
---|
[6ba2a39] | 1717 | ideal rels = he,h2+e2; |
---|
| 1718 | variety V = makeVariety(2,rels); |
---|
| 1719 | V; |
---|
| 1720 | } |
---|
[31e974] | 1721 | |
---|
| 1722 | proc makeVariety(int d, ideal i) |
---|
[6ba2a39] | 1723 | "USAGE: makeVariety(d,i); d int, i ideal |
---|
| 1724 | ASSUME: d is a nonnegative integer, i is an ideal |
---|
| 1725 | RETURN: variety |
---|
| 1726 | THEORY: create an abstract variety which has dimension d, and its Chow ring |
---|
| 1727 | should be a quotient ring |
---|
| 1728 | KEYWORDS: abstract variety, projective space, Grassmannian |
---|
| 1729 | EXAMPLE: example makeVariety; shows an example |
---|
| 1730 | " |
---|
[2d5ff5] | 1731 | { |
---|
[31e974] | 1732 | def R = basering; |
---|
| 1733 | variety V; |
---|
| 1734 | V.dimension = d; |
---|
| 1735 | V.baseRing = R; |
---|
| 1736 | V.relations = i; |
---|
| 1737 | return(V); |
---|
[2d5ff5] | 1738 | } |
---|
[6ba2a39] | 1739 | example |
---|
[31e974] | 1740 | { |
---|
[6ba2a39] | 1741 | "EXAMPLE:"; echo=2; |
---|
[11d225] | 1742 | ring r = 0,(h,e),wp(1,1); |
---|
[6ba2a39] | 1743 | ideal rels = he,h2+e2; |
---|
| 1744 | variety V = makeVariety(2,rels); |
---|
| 1745 | V; |
---|
| 1746 | V.dimension; |
---|
| 1747 | V.relations; |
---|
[31e974] | 1748 | } |
---|
[2d5ff5] | 1749 | |
---|
[31e974] | 1750 | proc ChowRing(variety V) |
---|
[6ba2a39] | 1751 | "USAGE: ChowRing(V); V variety |
---|
| 1752 | ASSUME: V is an abstract variety |
---|
| 1753 | RETURN: qring |
---|
| 1754 | KEYWORDS: Chow ring, abstract variety, projective space, Grassmannian |
---|
| 1755 | EXAMPLE: example makeVariety; shows an example |
---|
| 1756 | " |
---|
[31e974] | 1757 | { |
---|
| 1758 | def R = V.baseRing; |
---|
| 1759 | setring R; |
---|
| 1760 | ideal rels = V.relations; |
---|
| 1761 | qring CR = std(rels); |
---|
| 1762 | return (CR); |
---|
| 1763 | } |
---|
[6ba2a39] | 1764 | example |
---|
[31e974] | 1765 | { |
---|
[6ba2a39] | 1766 | "EXAMPLE:"; echo=2; |
---|
[11d225] | 1767 | ring r = 0,(h,e),wp(1,1); |
---|
[6ba2a39] | 1768 | ideal rels = he,h2+e2; |
---|
| 1769 | int d = 2; |
---|
| 1770 | variety V = makeVariety(2,rels); |
---|
| 1771 | ChowRing(V); |
---|
[31e974] | 1772 | } |
---|
[2d5ff5] | 1773 | |
---|
| 1774 | //////////////////////////////////////////////////////////////////////////////// |
---|
| 1775 | |
---|
[31e974] | 1776 | proc Grassmannian(int k, int n, list #) |
---|
| 1777 | "USAGE: Grassmannian(k,n); k int, n int |
---|
| 1778 | RETURN: variety |
---|
[6ba2a39] | 1779 | THEORY: create a Grassmannian G(k,n) as an abstract variety. This abstract |
---|
| 1780 | variety has diemnsion k(n-k) and its Chow ring is the quotient ring |
---|
| 1781 | of a polynomial ring in n-k variables q(1),...,q(n-k), which are the |
---|
| 1782 | Chern classes of tautological quotient bundle on G(k,n), modulo some |
---|
| 1783 | ideal generated by n-k polynomials which come from the Giambelli |
---|
| 1784 | formula. The monomial ordering of this Chow ring is 'wp' with vector |
---|
| 1785 | (1..k,1..n-k). Moreover, we export the Chern characters of |
---|
| 1786 | tautological subbundle and quotient bundle on G(k,n) |
---|
| 1787 | (say 'subBundle' and 'quotientBundle'). |
---|
| 1788 | KEYWORDS: Grassmannian, abstract variety, Schubert calculus |
---|
| 1789 | SEE ALSO: projectiveSpace, projectiveBundle |
---|
[31e974] | 1790 | EXAMPLE: example Grassmannian; shows examples |
---|
[2d5ff5] | 1791 | " |
---|
| 1792 | { |
---|
[31e974] | 1793 | string q; |
---|
| 1794 | if (size(#)==0) {q = "q";} |
---|
[2d5ff5] | 1795 | else |
---|
| 1796 | { |
---|
[31e974] | 1797 | if (typeof(#[1]) == "string") {q = #[1];} |
---|
| 1798 | else {Error("invalid optional argument");} |
---|
| 1799 | } |
---|
| 1800 | variety G; |
---|
| 1801 | G.dimension = k*(n-k); |
---|
| 1802 | execute("ring r = 0,("+q+"(1..n-k)),wp(1..n-k);"); |
---|
| 1803 | setring r; |
---|
| 1804 | G.baseRing = r; |
---|
| 1805 | int i,j; |
---|
| 1806 | poly v = 1; |
---|
| 1807 | poly u = 1; |
---|
| 1808 | for (j=1;j<=n-k;j++) {v=v+q(j);} |
---|
| 1809 | list l; |
---|
| 1810 | for (i=1;i<=k;i++) |
---|
| 1811 | { |
---|
| 1812 | l=insert(l,1,size(l)); |
---|
| 1813 | u=u+(-1)^i*schur(l,v); |
---|
[2d5ff5] | 1814 | } |
---|
[31e974] | 1815 | l=insert(l,1,size(l)); |
---|
| 1816 | ideal rels = schur(l,v); |
---|
| 1817 | int h = k+2; |
---|
| 1818 | while (h<=n) |
---|
| 1819 | { |
---|
| 1820 | l=insert(l,1,size(l)); |
---|
| 1821 | rels = rels,schur(l,v); |
---|
| 1822 | h++; |
---|
| 1823 | } |
---|
| 1824 | G.relations = rels; |
---|
| 1825 | int d = k*(n-k); |
---|
| 1826 | poly subBundle = reduce(logg(u,d)+k,std(rels)); |
---|
| 1827 | poly quotientBundle = reduce(logg(v,d)+n-k,std(rels)); |
---|
| 1828 | export (subBundle,quotientBundle); |
---|
| 1829 | kill u,v,d,l,rels; |
---|
| 1830 | return (G); |
---|
[2d5ff5] | 1831 | } |
---|
| 1832 | example |
---|
| 1833 | { |
---|
| 1834 | "EXAMPLE:"; echo=2; |
---|
[6ba2a39] | 1835 | variety G24 = Grassmannian(2,4); |
---|
[31e974] | 1836 | G24; |
---|
| 1837 | def r = G24.baseRing; |
---|
[6ba2a39] | 1838 | setring r; |
---|
[31e974] | 1839 | subBundle; |
---|
| 1840 | quotientBundle; |
---|
| 1841 | G24.dimension; |
---|
| 1842 | G24.relations; |
---|
| 1843 | ChowRing(G24); |
---|
[2d5ff5] | 1844 | } |
---|
| 1845 | |
---|
[31e974] | 1846 | proc projectiveSpace(int n, list #) |
---|
| 1847 | "USAGE: projectiveSpace(n); n int |
---|
| 1848 | RETURN: variety |
---|
[6ba2a39] | 1849 | THEORY: create a projective space of dimension n as an abstract variety. Its |
---|
| 1850 | Chow ring is a quotient ring in one variable h modulo the ideal |
---|
| 1851 | generated by h^(n+1). |
---|
| 1852 | KEYWORDS: projective space, abstract variety |
---|
| 1853 | SEE ALSO: Grassmannian, projectiveBundle |
---|
[31e974] | 1854 | EXAMPLE: example projectiveSpace; shows examples |
---|
| 1855 | " |
---|
| 1856 | { |
---|
| 1857 | string h; |
---|
| 1858 | if (size(#)==0) {h = "h";} |
---|
| 1859 | else |
---|
| 1860 | { |
---|
| 1861 | if (typeof(#[1]) == "string") {h = #[1];} |
---|
| 1862 | else {Error("invalid optional argument");} |
---|
| 1863 | } |
---|
| 1864 | variety P; |
---|
| 1865 | P.dimension = n; |
---|
| 1866 | execute("ring r = 0, ("+h+"), wp(1);"); |
---|
| 1867 | setring r; |
---|
| 1868 | P.baseRing = r; |
---|
| 1869 | ideal rels = var(1)^(n+1); |
---|
| 1870 | P.relations = rels; |
---|
| 1871 | poly u = 1; |
---|
| 1872 | poly v = 1 + var(1); |
---|
| 1873 | list l; |
---|
| 1874 | int i; |
---|
| 1875 | for (i=1;i<=n;i++) |
---|
| 1876 | { |
---|
| 1877 | l=insert(l,1,size(l)); |
---|
| 1878 | u=u+(-1)^i*schur(l,v); |
---|
| 1879 | } |
---|
| 1880 | poly subBundle = reduce(logg(u,n)+n,std(rels)); |
---|
| 1881 | poly quotientBundle = reduce(logg(v,n)+1,std(rels)); |
---|
| 1882 | export(subBundle,quotientBundle); |
---|
| 1883 | kill rels,u,v,l; |
---|
| 1884 | return (P); |
---|
| 1885 | } |
---|
| 1886 | example |
---|
| 1887 | { |
---|
| 1888 | "EXAMPLE:"; echo=2; |
---|
[6ba2a39] | 1889 | variety P = projectiveSpace(3); |
---|
[31e974] | 1890 | P; |
---|
| 1891 | P.dimension; |
---|
| 1892 | def r = P.baseRing; |
---|
| 1893 | setring r; |
---|
| 1894 | P.relations; |
---|
| 1895 | ChowRing(P); |
---|
| 1896 | } |
---|
| 1897 | |
---|
| 1898 | proc projectiveBundle(sheaf S, list #) |
---|
| 1899 | "USAGE: projectiveBundle(S); S sheaf |
---|
[6ba2a39] | 1900 | INPUT: a sheaf on an abstract variety |
---|
[31e974] | 1901 | RETURN: variety |
---|
[6ba2a39] | 1902 | THEORY: create a projective bundle as an abstract variety. This is related |
---|
| 1903 | to the enumeration of conics. |
---|
| 1904 | KEYWORDS: projective bundle, abstract variety, sheaf, enumeration of conics |
---|
| 1905 | SEE ALSO: projectiveSpace, Grassmannian |
---|
[31e974] | 1906 | EXAMPLE: example projectiveBundle; shows examples |
---|
[2d5ff5] | 1907 | " |
---|
| 1908 | { |
---|
[31e974] | 1909 | string z; |
---|
| 1910 | if (size(#)==0) {z = "z";} |
---|
| 1911 | else |
---|
| 1912 | { |
---|
| 1913 | if (typeof(#[1]) == "string") {z = #[1];} |
---|
| 1914 | else {Error("invalid optional argument");} |
---|
| 1915 | } |
---|
| 1916 | variety A; |
---|
| 1917 | def B = S.currentVariety; |
---|
| 1918 | def R = B.baseRing; |
---|
| 1919 | setring R; |
---|
| 1920 | ideal rels = B.relations; |
---|
| 1921 | int r = rankSheaf(S); |
---|
| 1922 | A.dimension = r - 1 + B.dimension; |
---|
| 1923 | poly c = totalChernClass(S); |
---|
| 1924 | execute("ring P = 0, ("+z+"), wp(1);"); |
---|
| 1925 | def CR = P + R; |
---|
| 1926 | setring CR; |
---|
| 1927 | A.baseRing = CR; |
---|
| 1928 | poly c = imap(R,c); |
---|
| 1929 | ideal rels = imap(R,rels); |
---|
| 1930 | poly g = var(1)^r; |
---|
| 1931 | int i; |
---|
| 1932 | for (i=1;i<=r;i++) {g=g+var(1)^(r-i)*part(c,i);} |
---|
| 1933 | A.relations = rels,g; |
---|
| 1934 | poly u = 1 + var(1); |
---|
| 1935 | poly f = logg(u,A.dimension)+1; |
---|
| 1936 | poly QuotientBundle = reduce(f,std(A.relations)); |
---|
| 1937 | export (QuotientBundle); |
---|
| 1938 | kill f,rels; |
---|
| 1939 | return (A); |
---|
[2d5ff5] | 1940 | } |
---|
| 1941 | example |
---|
| 1942 | { |
---|
| 1943 | "EXAMPLE:"; echo=2; |
---|
[6ba2a39] | 1944 | variety G = Grassmannian(3,5); |
---|
| 1945 | def r = G.baseRing; |
---|
| 1946 | setring r; |
---|
| 1947 | sheaf S = makeSheaf(G,subBundle); |
---|
| 1948 | sheaf B = dualSheaf(S)^2; |
---|
| 1949 | variety PB = projectiveBundle(B); |
---|
[31e974] | 1950 | PB; |
---|
[6ba2a39] | 1951 | def R = PB.baseRing; |
---|
| 1952 | setring R; |
---|
[31e974] | 1953 | QuotientBundle; |
---|
| 1954 | ChowRing(PB); |
---|
| 1955 | } |
---|
| 1956 | |
---|
| 1957 | proc productVariety(variety U, variety V) |
---|
[6ba2a39] | 1958 | "USAGE: productVariety(U,V); U variety, V variety |
---|
| 1959 | INPUT: two abstract varieties |
---|
| 1960 | OUTPUT: a product variety as an abstract variety |
---|
| 1961 | RETURN: variety |
---|
| 1962 | KEYWORDS: product variety, abstract variety |
---|
| 1963 | SEE ALSO: projectiveSpace, Grassmannian, projectiveBundle |
---|
| 1964 | EXAMPLE: example productVariety; shows examples |
---|
| 1965 | " |
---|
[31e974] | 1966 | { |
---|
| 1967 | //def br = basering; |
---|
| 1968 | def ur = U.baseRing; setring ur; |
---|
| 1969 | ideal ii1 = U.relations; |
---|
| 1970 | def vr = V.baseRing; setring vr; |
---|
| 1971 | ideal ii2 = V.relations; |
---|
| 1972 | variety W; |
---|
| 1973 | W.dimension = U.dimension + V.dimension; |
---|
| 1974 | def temp = ringtensor(ur,vr); |
---|
| 1975 | setring temp; |
---|
| 1976 | W.baseRing = temp; |
---|
| 1977 | ideal i1 = imap(ur,ii1); |
---|
| 1978 | ideal i2 = imap(vr,ii2); |
---|
| 1979 | W.relations = i1 + i2; |
---|
[6ba2a39] | 1980 | setring ur; |
---|
| 1981 | kill ii1; |
---|
| 1982 | setring vr; |
---|
| 1983 | kill ii2; |
---|
[31e974] | 1984 | //setring br; |
---|
| 1985 | return (W); |
---|
[2d5ff5] | 1986 | } |
---|
[6ba2a39] | 1987 | example |
---|
| 1988 | { |
---|
| 1989 | "EXAMPLE:"; echo=2; |
---|
| 1990 | variety P = projectiveSpace(3); |
---|
| 1991 | variety G = Grassmannian(2,4); |
---|
| 1992 | variety W = productVariety(P,G); |
---|
| 1993 | W; |
---|
| 1994 | W.dimension == P.dimension + G.dimension; |
---|
| 1995 | def r = W.baseRing; |
---|
| 1996 | setring r; |
---|
| 1997 | W.relations; |
---|
| 1998 | } |
---|
[2d5ff5] | 1999 | |
---|
| 2000 | //////////////////////////////////////////////////////////////////////////////// |
---|
| 2001 | |
---|
[31e974] | 2002 | proc integral(variety V, poly f) |
---|
| 2003 | "USAGE: integral(V,f); V variety, f poly |
---|
[6ba2a39] | 2004 | INPUT: a abstract variety and a polynomial |
---|
[31e974] | 2005 | RETURN: int |
---|
[6ba2a39] | 2006 | PURPOSE: computing intersection numbers. |
---|
| 2007 | EXAMPLE: example integral; shows an example |
---|
[31e974] | 2008 | " |
---|
| 2009 | { |
---|
| 2010 | def R = V.baseRing; |
---|
| 2011 | setring R; |
---|
| 2012 | ideal rels = V.relations; |
---|
| 2013 | return (leadcoef(reduce(f,std(rels)))); |
---|
| 2014 | } |
---|
| 2015 | example |
---|
| 2016 | { |
---|
| 2017 | "EXAMPLE:"; echo=2; |
---|
[6ba2a39] | 2018 | variety G = Grassmannian(2,4); |
---|
| 2019 | def r = G.baseRing; |
---|
| 2020 | setring r; |
---|
| 2021 | integral(G,q(1)^4); |
---|
[31e974] | 2022 | } |
---|
| 2023 | |
---|
| 2024 | proc SchubertClass(list p) |
---|
| 2025 | "USAGE: SchubertClass(p); p list |
---|
[6ba2a39] | 2026 | INPUT: a list of integers which is a partition |
---|
[2d5ff5] | 2027 | RETURN: poly |
---|
[6ba2a39] | 2028 | PURPOSE: compute the Schubert classes on a Grassmannian. |
---|
| 2029 | EXAMPLE: example SchubertClass; shows an example |
---|
[2d5ff5] | 2030 | " |
---|
| 2031 | { |
---|
[31e974] | 2032 | def R = basering; |
---|
| 2033 | setring R; |
---|
| 2034 | poly f = 1; |
---|
| 2035 | if (size(p) == 0) {return (f);} |
---|
| 2036 | int i; |
---|
| 2037 | for (i=1;i<=nvars(R);i++) |
---|
| 2038 | { |
---|
| 2039 | f = f + var(i); |
---|
| 2040 | } |
---|
| 2041 | return (schur(p,f)); |
---|
[2d5ff5] | 2042 | } |
---|
| 2043 | example |
---|
| 2044 | { |
---|
| 2045 | "EXAMPLE:"; echo=2; |
---|
[6ba2a39] | 2046 | variety G = Grassmannian(2,4); |
---|
[31e974] | 2047 | def r = G.baseRing; |
---|
| 2048 | setring r; |
---|
| 2049 | list p = 1,1; |
---|
| 2050 | SchubertClass(p); |
---|
[2d5ff5] | 2051 | } |
---|
| 2052 | |
---|
| 2053 | //////////////////////////////////////////////////////////////////////////////// |
---|
| 2054 | |
---|
[31e974] | 2055 | proc dualPartition(int k, int n, list p) |
---|
[6ba2a39] | 2056 | "USAGE: dualPartition(k,n,p); k int, n int, p list |
---|
| 2057 | INPUT: two integers and a partition |
---|
| 2058 | RETURN: list |
---|
| 2059 | PURPOSE: compute the dual of a partition. |
---|
| 2060 | SEE ALSO: SchubertClass |
---|
| 2061 | EXAMPLE: example dualPartition; shows an example |
---|
| 2062 | " |
---|
[31e974] | 2063 | { |
---|
| 2064 | while (size(p) < k) |
---|
| 2065 | { |
---|
| 2066 | p = insert(p,0,size(p)); |
---|
| 2067 | } |
---|
| 2068 | int i; |
---|
| 2069 | list l; |
---|
| 2070 | for (i=1;i<=size(p);i++) |
---|
| 2071 | { |
---|
| 2072 | l[i] = n-k-p[size(p)-i+1]; |
---|
| 2073 | } |
---|
| 2074 | return (l); |
---|
| 2075 | } |
---|
[6ba2a39] | 2076 | example |
---|
| 2077 | { |
---|
| 2078 | "EXAMPLE:"; echo=2; |
---|
| 2079 | ring r = 0,(x),dp; |
---|
| 2080 | dualPartition(2,4,list(2,1)); |
---|
| 2081 | } |
---|
[31e974] | 2082 | |
---|
| 2083 | //////////////////////////////////////////////////////////////////////////////// |
---|
[11d225] | 2084 | ////////// Procedures concerned with abstract sheaves /////////////////////////////////// |
---|
[31e974] | 2085 | //////////////////////////////////////////////////////////////////////////////// |
---|
| 2086 | |
---|
[6ba2a39] | 2087 | proc printSheaf(sheaf S) |
---|
| 2088 | "USAGE: printSheaf(S); S sheaf |
---|
| 2089 | RETURN: string |
---|
| 2090 | INPUT: a sheaf |
---|
| 2091 | THEORY: This is the print function used by Singular to print a sheaf. |
---|
| 2092 | SEE ALSO: makeSheaf, rankSheaf |
---|
| 2093 | EXAMPLE: example printSheaf; shows an example |
---|
| 2094 | " |
---|
[31e974] | 2095 | { |
---|
[6ba2a39] | 2096 | "A sheaf of rank ", rankSheaf(S); |
---|
| 2097 | } |
---|
| 2098 | example |
---|
| 2099 | { |
---|
| 2100 | "EXAMPLE:"; echo=2; |
---|
| 2101 | variety X; |
---|
| 2102 | X.dimension = 4; |
---|
| 2103 | ring r = 0,(c(1..2),d(1..3)),wp(1..2,1..3); |
---|
| 2104 | setring r; |
---|
| 2105 | X.baseRing = r; |
---|
| 2106 | poly c = 1 + c(1) + c(2); |
---|
| 2107 | poly ch = 2 + logg(c,4); |
---|
| 2108 | sheaf S = makeSheaf(X,ch); |
---|
| 2109 | S; |
---|
[31e974] | 2110 | } |
---|
| 2111 | |
---|
| 2112 | proc makeSheaf(variety V, poly ch) |
---|
[6ba2a39] | 2113 | "USAGE: makeSheaf(V,ch); V variety, ch poly |
---|
| 2114 | RETURN: sheaf |
---|
| 2115 | THEORY: create a sheaf on an abstract variety, and its Chern character is |
---|
| 2116 | the polynomial ch. |
---|
| 2117 | SEE ALSO: printSheaf, rankSheaf |
---|
| 2118 | EXAMPLE: example makeSheaf; shows an example |
---|
| 2119 | " |
---|
[31e974] | 2120 | { |
---|
| 2121 | def R = basering; |
---|
| 2122 | sheaf S; |
---|
| 2123 | S.currentVariety = V; |
---|
| 2124 | S.ChernCharacter = ch; |
---|
| 2125 | return(S); |
---|
| 2126 | } |
---|
[6ba2a39] | 2127 | example |
---|
[31e974] | 2128 | { |
---|
[6ba2a39] | 2129 | "EXAMPLE:"; echo=2; |
---|
| 2130 | variety X; |
---|
| 2131 | X.dimension = 4; |
---|
| 2132 | ring r = 0,(c(1..2),d(1..3)),wp(1..2,1..3); |
---|
| 2133 | setring r; |
---|
| 2134 | X.baseRing = r; |
---|
| 2135 | poly c = 1 + c(1) + c(2); |
---|
| 2136 | poly ch = 2 + logg(c,4); |
---|
| 2137 | sheaf S = makeSheaf(X,ch); |
---|
| 2138 | S; |
---|
[31e974] | 2139 | } |
---|
| 2140 | |
---|
| 2141 | proc rankSheaf(sheaf S) |
---|
| 2142 | "USAGE: rankSheaf(S); S sheaf |
---|
| 2143 | RETURN: int |
---|
[6ba2a39] | 2144 | INPUT: S is a sheaf |
---|
| 2145 | OUTPUT: a positive integer which is the rank of a sheaf. |
---|
| 2146 | SEE ALSO: makeSheaf, printSheaf |
---|
| 2147 | EXAMPLE: example rankSheaf; shows an example |
---|
[2d5ff5] | 2148 | " |
---|
| 2149 | { |
---|
[6ba2a39] | 2150 | variety V = S.currentVariety; |
---|
[31e974] | 2151 | def R = V.baseRing; |
---|
| 2152 | setring R; |
---|
| 2153 | poly f = S.ChernCharacter; |
---|
| 2154 | return (int(part(f,0))); |
---|
[2d5ff5] | 2155 | } |
---|
| 2156 | example |
---|
| 2157 | { |
---|
| 2158 | "EXAMPLE:"; echo=2; |
---|
[6ba2a39] | 2159 | variety G = Grassmannian(2,4); |
---|
| 2160 | def R = G.baseRing; |
---|
[31e974] | 2161 | setring R; |
---|
[6ba2a39] | 2162 | sheaf S = makeSheaf(G,subBundle); |
---|
[31e974] | 2163 | rankSheaf(S); |
---|
[2d5ff5] | 2164 | } |
---|
| 2165 | |
---|
[31e974] | 2166 | proc totalChernClass(sheaf S) |
---|
[6ba2a39] | 2167 | "USAGE: totalChernClass(S); S sheaf |
---|
[31e974] | 2168 | RETURN: poly |
---|
[6ba2a39] | 2169 | INPUT: S is a sheaf |
---|
| 2170 | OUTPUT: a polynomial which is the total Chern class of a sheaf |
---|
| 2171 | SEE ALSO: totalSegreClass, topChernClass, ChernClass |
---|
| 2172 | EXAMPLE: example totalChernClass; shows an example |
---|
[31e974] | 2173 | " |
---|
| 2174 | { |
---|
[6ba2a39] | 2175 | variety V = S.currentVariety; |
---|
[31e974] | 2176 | int d = V.dimension; |
---|
| 2177 | def R = V.baseRing; |
---|
| 2178 | setring R; |
---|
| 2179 | poly ch = S.ChernCharacter; |
---|
| 2180 | poly f = expp(ch,d); |
---|
| 2181 | ideal rels = std(V.relations); |
---|
| 2182 | return (reduce(f,rels)); |
---|
| 2183 | } |
---|
[6ba2a39] | 2184 | example |
---|
| 2185 | { |
---|
| 2186 | "EXAMPLE:"; echo=2; |
---|
| 2187 | variety X; |
---|
| 2188 | X.dimension = 4; |
---|
| 2189 | ring r = 0,(c(1..2),d(1..3)),wp(1..2,1..3); |
---|
| 2190 | setring r; |
---|
| 2191 | X.baseRing = r; |
---|
| 2192 | poly c = 1 + c(1) + c(2); |
---|
| 2193 | poly ch = 2 + logg(c,4); |
---|
| 2194 | sheaf E = makeSheaf(X,ch); |
---|
| 2195 | sheaf S = E^3; |
---|
| 2196 | totalChernClass(S); |
---|
| 2197 | } |
---|
[31e974] | 2198 | |
---|
| 2199 | proc ChernClass(sheaf S, int i) |
---|
[6ba2a39] | 2200 | "USAGE: ChernClass(S,i); S sheaf, i int |
---|
| 2201 | INPUT: S is a sheaf, i is a nonnegative integer |
---|
| 2202 | RETURN: poly |
---|
| 2203 | THEORY: This is the i-th Chern class of a sheaf |
---|
| 2204 | SEE ALSO: topChernClass, totalChernClass |
---|
| 2205 | EXAMPLE: example ChernClass; shows an example |
---|
| 2206 | " |
---|
[31e974] | 2207 | { |
---|
| 2208 | return (part(totalChernClass(S),i)); |
---|
| 2209 | } |
---|
[6ba2a39] | 2210 | example |
---|
| 2211 | { |
---|
| 2212 | "EXAMPLE:"; echo=2; |
---|
| 2213 | variety X; |
---|
| 2214 | X.dimension = 4; |
---|
| 2215 | ring r = 0,(c(1..2),d(1..3)),wp(1..2,1..3); |
---|
| 2216 | setring r; |
---|
| 2217 | X.baseRing = r; |
---|
| 2218 | poly c = 1 + c(1) + c(2); |
---|
| 2219 | poly ch = 2 + logg(c,4); |
---|
| 2220 | sheaf E = makeSheaf(X,ch); |
---|
| 2221 | sheaf S = E^3; |
---|
| 2222 | ChernClass(S,1); |
---|
| 2223 | ChernClass(S,2); |
---|
| 2224 | ChernClass(S,3); |
---|
| 2225 | ChernClass(S,4); |
---|
| 2226 | } |
---|
[2d5ff5] | 2227 | |
---|
[31e974] | 2228 | proc topChernClass(sheaf S) |
---|
| 2229 | "USAGE: topChernClass(S); S sheaf |
---|
[2d5ff5] | 2230 | RETURN: poly |
---|
[6ba2a39] | 2231 | INPUT: S is a sheaf |
---|
| 2232 | THEORY: This is the top Chern class of a sheaf |
---|
| 2233 | SEE ALSO: ChernClass, totalChernClass |
---|
| 2234 | EXAMPLE: example topChernClass; shows an example |
---|
[2d5ff5] | 2235 | " |
---|
| 2236 | { |
---|
[31e974] | 2237 | return (ChernClass(S,rankSheaf(S))); |
---|
| 2238 | } |
---|
| 2239 | example |
---|
| 2240 | { |
---|
| 2241 | "EXAMPLE:"; echo=2; |
---|
[6ba2a39] | 2242 | variety G = Grassmannian(2,4); |
---|
| 2243 | def R = G.baseRing; |
---|
[31e974] | 2244 | setring R; |
---|
[6ba2a39] | 2245 | sheaf S = makeSheaf(G,quotientBundle); |
---|
| 2246 | sheaf B = S^3; |
---|
[31e974] | 2247 | topChernClass(B); |
---|
| 2248 | } |
---|
| 2249 | |
---|
| 2250 | proc totalSegreClass(sheaf S) |
---|
| 2251 | "USAGE: totalSegreClass(S); S sheaf |
---|
| 2252 | RETURN: poly |
---|
[6ba2a39] | 2253 | INPUT: S is a sheaf |
---|
| 2254 | THEORY: This is the total Segre class of a sheaf. |
---|
| 2255 | SEE AlSO: totalChernClass |
---|
| 2256 | EXAMPLE: example totalSegreClass; shows an example |
---|
[31e974] | 2257 | " |
---|
| 2258 | { |
---|
| 2259 | //def D = dualSheaf(S); |
---|
[6ba2a39] | 2260 | variety V = S.currentVariety; |
---|
[31e974] | 2261 | def R = V.baseRing; |
---|
| 2262 | setring R; |
---|
| 2263 | poly f = totalChernClass(S); |
---|
| 2264 | poly g; |
---|
| 2265 | int d = V.dimension; |
---|
| 2266 | ideal rels = std(V.relations); |
---|
| 2267 | if (f == 1) {return (1);} |
---|
[2d5ff5] | 2268 | else |
---|
| 2269 | { |
---|
| 2270 | poly t,h; |
---|
| 2271 | int i,j; |
---|
[31e974] | 2272 | for (i=0;i<=d;i++) {t = t + (1-f)^i;} |
---|
[2d5ff5] | 2273 | for (j=0;j<=d;j++) {h = h + part(t,j);} |
---|
| 2274 | return (reduce(h,rels)); |
---|
| 2275 | } |
---|
| 2276 | } |
---|
| 2277 | example |
---|
| 2278 | { |
---|
| 2279 | "EXAMPLE:"; echo=2; |
---|
[6ba2a39] | 2280 | variety G = Grassmannian(2,4); |
---|
| 2281 | def R = G.baseRing; |
---|
[31e974] | 2282 | setring R; |
---|
[6ba2a39] | 2283 | sheaf S = makeSheaf(G,subBundle); |
---|
[31e974] | 2284 | totalSegreClass(S); |
---|
| 2285 | } |
---|
| 2286 | |
---|
| 2287 | proc dualSheaf(sheaf S) |
---|
| 2288 | "USAGE: dualSheaf(S); S sheaf |
---|
| 2289 | RETURN: sheaf |
---|
[6ba2a39] | 2290 | THEORY: This is the dual of a sheaf |
---|
| 2291 | SEE ALSO: addSheaf, symmetricPowerSheaf, tensorSheaf, quotSheaf |
---|
| 2292 | EXAMPLE: example dualSheaf; shows examples |
---|
[31e974] | 2293 | " |
---|
| 2294 | { |
---|
[6ba2a39] | 2295 | variety V = S.currentVariety; |
---|
[31e974] | 2296 | int d = V.dimension; |
---|
| 2297 | def R = V.baseRing; |
---|
| 2298 | setring R; |
---|
| 2299 | poly ch = S.ChernCharacter; |
---|
| 2300 | poly f = adams(ch,-1); |
---|
| 2301 | sheaf D; |
---|
| 2302 | D.currentVariety = V; |
---|
| 2303 | D.ChernCharacter = f; |
---|
| 2304 | return (D); |
---|
| 2305 | } |
---|
| 2306 | example |
---|
| 2307 | { |
---|
| 2308 | "EXAMPLE:"; echo=2; |
---|
[6ba2a39] | 2309 | variety G = Grassmannian(2,4); |
---|
| 2310 | def R = G.baseRing; |
---|
[31e974] | 2311 | setring R; |
---|
[6ba2a39] | 2312 | sheaf S = makeSheaf(G,subBundle); |
---|
| 2313 | sheaf D = dualSheaf(S); |
---|
| 2314 | D; |
---|
[31e974] | 2315 | } |
---|
| 2316 | |
---|
| 2317 | proc tensorSheaf(sheaf A, sheaf B) |
---|
| 2318 | "USAGE: tensorSheaf(A,B); A sheaf, B sheaf |
---|
| 2319 | RETURN: sheaf |
---|
[6ba2a39] | 2320 | THEORY: This is the tensor product of two sheaves |
---|
| 2321 | SEE ALSO: addSheaf, symmetricPowerSheaf, quotSheaf, dualSheaf |
---|
| 2322 | EXAMPLE: example tensorSheaf; shows examples |
---|
[31e974] | 2323 | " |
---|
| 2324 | { |
---|
| 2325 | sheaf S; |
---|
[6ba2a39] | 2326 | variety V1 = A.currentVariety; |
---|
| 2327 | variety V2 = B.currentVariety; |
---|
[31e974] | 2328 | def R1 = V1.baseRing; |
---|
| 2329 | setring R1; |
---|
| 2330 | poly c1 = A.ChernCharacter; |
---|
| 2331 | def R2 = V2.baseRing; |
---|
| 2332 | setring R2; |
---|
| 2333 | poly c2 = B.ChernCharacter; |
---|
| 2334 | if (nvars(R1) < nvars(R2)) |
---|
| 2335 | { |
---|
| 2336 | S.currentVariety = V2; |
---|
| 2337 | poly c = imap(R1,c1); |
---|
| 2338 | poly f = parts(c*c2,0,V2.dimension); |
---|
| 2339 | S.ChernCharacter = f; |
---|
| 2340 | return (S); |
---|
| 2341 | } |
---|
| 2342 | else |
---|
| 2343 | { |
---|
| 2344 | setring R1; |
---|
| 2345 | S.currentVariety = V1; |
---|
| 2346 | poly c = imap(R2,c2); |
---|
| 2347 | poly f = parts(c1*c,0,V1.dimension); |
---|
| 2348 | S.ChernCharacter = f; |
---|
| 2349 | return (S); |
---|
| 2350 | } |
---|
| 2351 | } |
---|
| 2352 | example |
---|
| 2353 | { |
---|
| 2354 | "EXAMPLE:"; echo=2; |
---|
[6ba2a39] | 2355 | variety G = Grassmannian(3,4); |
---|
| 2356 | def R = G.baseRing; |
---|
[31e974] | 2357 | setring R; |
---|
[6ba2a39] | 2358 | sheaf S = makeSheaf(G,subBundle); |
---|
| 2359 | sheaf Q = makeSheaf(G,quotientBundle); |
---|
| 2360 | sheaf T = S*Q; |
---|
| 2361 | T; |
---|
[31e974] | 2362 | } |
---|
| 2363 | |
---|
| 2364 | proc symmetricPowerSheaf(sheaf S, int n) |
---|
| 2365 | "USAGE: symmetricPowerSheaf(S,n); S sheaf, n int |
---|
| 2366 | RETURN: sheaf |
---|
[6ba2a39] | 2367 | THEORY: This is the n-th symmetric power of a sheaf |
---|
| 2368 | SEE ALSO: quotSheaf, addSheaf, tensorSheaf, dualSheaf |
---|
| 2369 | EXAMPLE: example symmetricPowerSheaf; shows examples |
---|
[31e974] | 2370 | " |
---|
| 2371 | { |
---|
[6ba2a39] | 2372 | variety V = S.currentVariety; |
---|
[31e974] | 2373 | def R = V.baseRing; |
---|
| 2374 | setring R; |
---|
| 2375 | int r = rankSheaf(S); |
---|
| 2376 | int d = V.dimension; |
---|
| 2377 | int i,j,m; |
---|
| 2378 | poly f = S.ChernCharacter; |
---|
| 2379 | poly result; |
---|
| 2380 | list s,w; |
---|
| 2381 | if (n==0) {result=1;} |
---|
| 2382 | if (n==1) {result=f;} |
---|
| 2383 | else |
---|
| 2384 | { |
---|
| 2385 | s = 1,f; |
---|
| 2386 | w = wedges(n,f,d); |
---|
| 2387 | for (i=2;i<=n;i++) |
---|
| 2388 | { |
---|
| 2389 | if (i<=r) {m=i;} |
---|
| 2390 | else {m=r;} |
---|
| 2391 | poly q; |
---|
| 2392 | for (j=1;j<=m;j++) |
---|
| 2393 | { |
---|
| 2394 | q = q + ((-1)^(j+1))*parts(w[j+1]*s[i-j+1],0,d); |
---|
| 2395 | } |
---|
| 2396 | s = insert(s,q,size(s)); |
---|
| 2397 | kill q; |
---|
| 2398 | } |
---|
| 2399 | result = s[n+1]; |
---|
| 2400 | } |
---|
| 2401 | sheaf A; |
---|
| 2402 | A.currentVariety = V; |
---|
| 2403 | A.ChernCharacter = result; |
---|
| 2404 | return (A); |
---|
| 2405 | } |
---|
| 2406 | example |
---|
| 2407 | { |
---|
| 2408 | "EXAMPLE:"; echo=2; |
---|
[6ba2a39] | 2409 | variety G = Grassmannian(2,4); |
---|
| 2410 | def R = G.baseRing; |
---|
[31e974] | 2411 | setring R; |
---|
[6ba2a39] | 2412 | sheaf S = makeSheaf(G,quotientBundle); |
---|
| 2413 | sheaf B = symmetricPowerSheaf(S,3); |
---|
[31e974] | 2414 | B; |
---|
[6ba2a39] | 2415 | sheaf A = S^3; |
---|
| 2416 | A; |
---|
| 2417 | A.ChernCharacter == B.ChernCharacter; |
---|
[31e974] | 2418 | } |
---|
| 2419 | |
---|
[6ba2a39] | 2420 | proc quotSheaf(sheaf A, sheaf B) |
---|
| 2421 | "USAGE: quotSheaf(A,B); A sheaf, B sheaf |
---|
| 2422 | RETURN: sheaf |
---|
| 2423 | THEORY: This is the quotient of two sheaves |
---|
| 2424 | SEE ALSO: addSheaf, symmetricPowerSheaf, tensorSheaf, dualSheaf |
---|
| 2425 | EXAMPLE: example quotSheaf; shows an example |
---|
| 2426 | " |
---|
[31e974] | 2427 | { |
---|
| 2428 | sheaf S; |
---|
[6ba2a39] | 2429 | variety V1 = A.currentVariety; |
---|
| 2430 | variety V2 = B.currentVariety; |
---|
[31e974] | 2431 | def R1 = V1.baseRing; |
---|
| 2432 | setring R1; |
---|
| 2433 | poly c1 = A.ChernCharacter; |
---|
| 2434 | def R2 = V2.baseRing; |
---|
| 2435 | setring R2; |
---|
| 2436 | poly c2 = B.ChernCharacter; |
---|
| 2437 | if (nvars(R1) < nvars(R2)) |
---|
| 2438 | { |
---|
| 2439 | S.currentVariety = V2; |
---|
| 2440 | poly c = imap(R1,c1); |
---|
| 2441 | S.ChernCharacter = c - c2; |
---|
| 2442 | return (S); |
---|
| 2443 | } |
---|
| 2444 | else |
---|
| 2445 | { |
---|
| 2446 | setring R1; |
---|
| 2447 | S.currentVariety = V1; |
---|
| 2448 | poly c = imap(R2,c2); |
---|
| 2449 | S.ChernCharacter = c1 - c; |
---|
| 2450 | return (S); |
---|
| 2451 | } |
---|
| 2452 | } |
---|
[6ba2a39] | 2453 | example |
---|
| 2454 | { |
---|
| 2455 | "EXAMPLE:"; echo=2; |
---|
| 2456 | variety G = Grassmannian(3,5); |
---|
| 2457 | def r = G.baseRing; |
---|
| 2458 | setring r; |
---|
| 2459 | sheaf S = makeSheaf(G,subBundle); |
---|
| 2460 | sheaf B = dualSheaf(S)^2; |
---|
| 2461 | sheaf B3 = dualSheaf(S)^3; |
---|
| 2462 | sheaf B5 = dualSheaf(S)^5; |
---|
| 2463 | variety PB = projectiveBundle(B); |
---|
| 2464 | def R = PB.baseRing; |
---|
| 2465 | setring R; |
---|
| 2466 | sheaf Q = makeSheaf(PB,QuotientBundle); |
---|
| 2467 | sheaf V = dualSheaf(Q)*B3; |
---|
| 2468 | sheaf A = B5 - V; |
---|
| 2469 | A; |
---|
| 2470 | } |
---|
[31e974] | 2471 | |
---|
[6ba2a39] | 2472 | proc addSheaf(sheaf A, sheaf B) |
---|
| 2473 | "USAGE: addSheaf(A,B); A sheaf, B sheaf |
---|
| 2474 | RETURN: sheaf |
---|
| 2475 | THEORY: This is the direct sum of two sheaves. |
---|
| 2476 | SEE ALSO: quotSheaf, symmetricPowerSheaf, tensorSheaf, dualSheaf |
---|
| 2477 | EXAMPLE: example addSheaf; shows an example |
---|
| 2478 | " |
---|
[31e974] | 2479 | { |
---|
| 2480 | sheaf S; |
---|
[6ba2a39] | 2481 | variety V1 = A.currentVariety; |
---|
| 2482 | variety V2 = B.currentVariety; |
---|
[31e974] | 2483 | def R1 = V1.baseRing; |
---|
| 2484 | setring R1; |
---|
| 2485 | poly c1 = A.ChernCharacter; |
---|
| 2486 | def R2 = V2.baseRing; |
---|
| 2487 | setring R2; |
---|
| 2488 | poly c2 = B.ChernCharacter; |
---|
| 2489 | if (nvars(R1) < nvars(R2)) |
---|
| 2490 | { |
---|
| 2491 | S.currentVariety = V2; |
---|
| 2492 | poly c = imap(R1,c1); |
---|
| 2493 | S.ChernCharacter = c + c2; |
---|
| 2494 | return (S); |
---|
| 2495 | } |
---|
| 2496 | else |
---|
| 2497 | { |
---|
| 2498 | setring R1; |
---|
| 2499 | S.currentVariety = V1; |
---|
| 2500 | poly c = imap(R2,c2); |
---|
| 2501 | S.ChernCharacter = c1 + c; |
---|
| 2502 | return (S); |
---|
| 2503 | } |
---|
[2d5ff5] | 2504 | } |
---|
| 2505 | example |
---|
| 2506 | { |
---|
| 2507 | "EXAMPLE:"; echo=2; |
---|
[6ba2a39] | 2508 | variety G = Grassmannian(3,5); |
---|
| 2509 | def r = G.baseRing; |
---|
| 2510 | setring r; |
---|
| 2511 | sheaf S = makeSheaf(G,subBundle); |
---|
| 2512 | sheaf Q = makeSheaf(G,quotientBundle); |
---|
| 2513 | sheaf D = S + Q; |
---|
| 2514 | D; |
---|
| 2515 | D.ChernCharacter == rankSheaf(D); |
---|
| 2516 | totalChernClass(D) == 1; |
---|
[2d5ff5] | 2517 | } |
---|