Changeset edf8b1a in git
- Timestamp:
- Jan 4, 2021, 5:55:43 PM (3 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- a7e3f7590f057fa806e1c687326dd5faea7c529d
- Parents:
- b2f037ce9ae0395fef8be8ef08c3eb73d09dc8c9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/tateProdCplxNegGrad.lib
rb2f037 redf8b1a 1 ///////////////////////////////////////////////////////////////////////////// 2 version ="version tateProdCplxNegGrad.lib 4.2.0.1 Dec_2020 "; // $Id$1 /////////////////////////////////////////////////////////////////////////////// 2 // version ="version tateProdCplxNegGrad.lib 4.2.0.1 Dec_2020 "; //$id$ 3 3 info = " 4 4 LIBRARY: tateProdCplxNegGrad.lib for computing sheaf cohomology on product of projective spaces … … 13 13 [2] Eisenbud, Erman, Schreyer: Tate Resolutions on Products of Projective Spaces: Cohomology and Direct Image Complexes (2019) 14 14 PROCEDURES: 15 productOfProjectiveSpaces(intvec c) creates rings S,E corresponding to the product15 productOfProjectiveSpaces(intvec c) creates rings S,E corresponding to the product 16 16 truncate(module M, intvec c) truncates module M at c 17 truncateCoker(module M, intvec c) truncates the cokernel at c18 symExt(matrix m) 19 sufficientlyPositiveMultidegree(module M) computes a sufficiently positive multidegree for M20 tateResolution(module M, intvec low, intvec high) computes subquotient complex of Tate resolution T(F)21 cohomologyMatrix(module M, intvec low, intvec high) computes cohomologymatrix of corresponding sheaf17 truncateCoker(module M, intvec c) truncates the cokernel at c 18 symExt(matrix m) computes first differential of R(M) 19 sufficientlyPositiveMultidegree(module M) computes a sufficiently positive multidegree for M 20 tateResolution(module M, intvec low, intvec high) computes subquotient complex of Tate resolution T(F) 21 cohomologyMatrix(module M, intvec low, intvec high) computes cohomologymatrix of corresponding sheaf 22 22 cohomologyMatrixFromResolution(multigradedcomplex T, intvec low, intvec high) computes dimensions of sheaf cohomology groups contained in T 23 eulerPolynomialTable(module M, intvec low, intvec high) computes table of Euler polynomials24 cohomologyHashTable(module M, intvec low, intvec high) computes cohomology hash table23 eulerPolynomialTable(module M, intvec low, intvec high) computes table of Euler polynomials 24 cohomologyHashTable(module M, intvec low, intvec high) computes cohomology hash table 25 25 twist(module M,intvec c) twists module M by c 26 beilinsonWindow(multigradedcomplex T) computes Beilinson window of T26 beilinsonWindow(multigradedcomplex T) computes Beilinson window of T 27 27 regionComplex(multigradedcomplex T, intvec d, intvec I, intvec J, intvec K) computes region complex 28 strand(multigradedcomplex T, intvec c, intvec J) computes strand29 firstQuadrantComplex(multigradedcomplex T, intvec c) computes first quadrant complex30 lastQuadrantComplex(multigradedcomplex T, intvec c) computes last quadrant complex31 shift(multigradedcomplex A, int i)shifts the multigraded complex by i28 strand(multigradedcomplex T, intvec c, intvec J) computes strand 29 firstQuadrantComplex(multigradedcomplex T, intvec c) computes first quadrant complex 30 lastQuadrantComplex(multigradedcomplex T, intvec c) computes last quadrant complex 31 proc shift(multigradedcomplex A, int i) shifts the multigraded complex by i 32 32 "; 33 33 34 34 35 ///////////////////////////////////////////////////////////////////////////// 36 include necessary libraries35 /////////////////////////////////////////////////////////////////////////////// 36 //include necessary libraries 37 37 LIB "multigrading.lib"; 38 38 LIB "matrix.lib"; … … 40 40 LIB "methods.lib"; 41 41 42 Idee: in multigradedcomplex noch zusaetzlich ring E speichern42 // Idee: in multigradedcomplex noch zusaetzlich ring E speichern 43 43 static proc mod_init() 44 44 { … … 49 49 } 50 50 51 ///////////////////////////////////////////////////////////////////////////// 51 /////////////////////////////////////////////////////////////////////////////// 52 52 proc printMultigradedComplex(multigradedcomplex C) 53 53 "USAGE: printMultigradedComplex(C); C multigradedcomplex … … 159 159 160 160 161 ///////////////////////////////////////////////////////////////////////////// 161 /////////////////////////////////////////////////////////////////////////////// 162 162 proc createMultigradedComplex(list reso) 163 163 "USAGE: createMultigradeComplex(reso); reso list … … 171 171 Reso.differentials = delete(reso,1); 172 172 173 create the free modules corresponding to the differentials173 // create the free modules corresponding to the differentials 174 174 list mods; 175 175 module M; … … 181 181 } 182 182 183 last special case183 // last special case 184 184 M = freemodule(ncols(Reso.differentials[size(Reso.differentials)])); 185 185 M = setModuleGrading(M,multiDeg(Reso.differentials[size(Reso.differentials)])); … … 190 190 191 191 192 ///////////////////////////////////////////////////////////////////////////// 192 /////////////////////////////////////////////////////////////////////////////// 193 193 proc productOfProjectiveSpaces(intvec c) 194 194 "USAGE: productOfProjectiveSpaces(c); c intvec … … 228 228 ring E = Exterior(); 229 229 230 set multigrading230 // set multigrading 231 231 intmat grading[size(c)][sum(c)+ size(c)]; 232 232 k = 1; … … 262 262 263 263 264 ///////////////////////////////////////////////////////////////////////////// 264 /////////////////////////////////////////////////////////////////////////////// 265 265 proc truncate(module M, intvec c) 266 266 "USAGE: truncate(M,c); M module, c intvec … … 278 278 279 279 intmat MGrading = getModuleGrading(M); 280 determine the free module in which M lives280 // determine the free module in which M lives 281 281 int n = nrows(M); 282 282 283 compute the module with which we have to intersect the module M in order to obtain generators of the truncation283 // compute the module with which we have to intersect the module M in order to obtain generators of the truncation 284 284 ideal F; 285 285 int i,j; … … 299 299 } 300 300 301 now compute the intersection of M and T301 // now compute the intersection of M and T 302 302 module intersection = intersect(M,T); 303 303 intersection = setModuleGrading(intersection,MGrading); … … 321 321 322 322 323 ///////////////////////////////////////////////////////////////////////////// 323 /////////////////////////////////////////////////////////////////////////////// 324 324 proc truncateCoker(module M, intvec c) 325 325 "USAGE: truncateCoker(M,c); M module, c intvec … … 342 342 {"EXAMPLE:"; 343 343 echo = 2; 344 example 1344 // example 1 345 345 intvec c1 = 1,1,1; 346 346 def(S1,E1) = productOfProjectiveSpaces(c1); … … 351 351 truncateCoker(M1,c1); 352 352 353 example 2353 // example 2 354 354 intvec c2 = 1,1; 355 355 def (S2,E2) = productOfProjectiveSpaces(c2); … … 362 362 363 363 364 ///////////////////////////////////////////////////////////////////////////// 364 /////////////////////////////////////////////////////////////////////////////// 365 365 proc symExt(matrix m) 366 366 "USAGE: symExt(m); m matrix … … 394 394 395 395 396 ///////////////////////////////////////////////////////////////////////////// 396 /////////////////////////////////////////////////////////////////////////////// 397 397 proc sufficientlyPositiveMultidegree(module M) 398 398 "USAGE: sufficientlyPositiveMultidegree(M); M module … … 433 433 {"EXAMPLE:"; 434 434 echo = 2; 435 example 1435 // example 1 436 436 intvec c1 = 1,2; 437 437 def (S1,E1) = productOfProjectiveSpaces(c1); … … 442 442 sufficientlyPositiveMultidegree(M1); 443 443 444 example 2444 // example 2 445 445 intvec c2 = 1,1; 446 446 def (S2,E2) = productOfProjectiveSpaces(c2); … … 451 451 sufficientlyPositiveMultidegree(M2); 452 452 453 example 3453 // example 3 454 454 intvec c3 = 1,1,1; 455 455 def (S3,E3) = productOfProjectiveSpaces(c3); … … 462 462 463 463 464 ///////////////////////////////////////////////////////////////////////////// 464 /////////////////////////////////////////////////////////////////////////////// 465 465 proc tateResolution(module M, intvec low, intvec high) 466 466 "USAGE: tateResolution(M,low,high); M module, L list, low intvec, high intvec … … 492 492 } 493 493 494 now truncate M at hi494 // now truncate M at hi 495 495 module N = truncateCoker(M,hi); 496 496 … … 509 509 multigradedcomplex tate = createMultigradedComplex(reso); 510 510 511 for output as in M2, comment the delete commands out and shift by sum(hi)- size(regs) + 2 instead511 // for output as in M2, comment the delete commands out and shift by sum(hi)- size(regs) + 2 instead 512 512 tate = deleteFirstEntry(tate); 513 513 tate = deleteFirstEntry(tate); … … 520 520 {"EXAMPLE:"; 521 521 echo = 2; 522 example 1522 // example 1 523 523 intvec c1 = 1,1,1; 524 524 intvec low1 = 0,0,0; … … 535 535 tate1.differentials; 536 536 537 example 2537 // example 2 538 538 intvec c2 = 1,2; 539 539 def (S2,E2) = productOfProjectiveSpaces(c2); … … 549 549 tate2; 550 550 551 example 3551 // example 3 552 552 intvec c3 = 1,1; 553 553 def (S3,E3) = productOfProjectiveSpaces(c3); … … 565 565 566 566 567 ///////////////////////////////////////////////////////////////////////////// 567 /////////////////////////////////////////////////////////////////////////////// 568 568 proc cohomologyMatrix(module M, intvec low, intvec high) 569 569 "USAGE: cohomologyMatrix(M,L,low,high); M module, L list, low intvec, high intvec … … 592 592 setring(E); 593 593 list reso = tate.differentials; 594 int n = nvars(E)-2; i.e. if P = P^{n_1} x P^{n_2}, then n = n_1+n_2594 int n = nvars(E)-2; // i.e. if P = P^{n_1} x P^{n_2}, then n = n_1+n_2 595 595 596 596 int i,j,k,d,numhk; 597 ring Z = 0,h,dp; in this ring we compute the cohomologymatrix597 ring Z = 0,h,dp; // in this ring we compute the cohomologymatrix 598 598 setring(Z); 599 599 matrix cohomologymat[high[2]-low[2]+1][high[1]-low[1]+1]; 600 600 601 for (i = low[1]; i <= high[1]; i++) iterate over rows601 for (i = low[1]; i <= high[1]; i++) //iterate over rows 602 602 { 603 603 for (j = low[2]; j <= high[2]; j++) … … 623 623 {"EXAMPLE:"; 624 624 echo = 2; 625 example 1625 // example 1 626 626 intvec c1 = 1,1; 627 627 def (S1,E1) = productOfProjectiveSpaces(c1); … … 636 636 print(cohomologymat); 637 637 638 example 2638 // example 2 639 639 intvec c2 = 1,2; 640 640 def (S2,E2) = productOfProjectiveSpaces(c2); … … 649 649 print(cohomologymat); 650 650 651 example 3651 // example 3 652 652 setring(S2); 653 653 module M3 = x(0)(0),x(1)(0)^3 + x(1)(1)^3 +x(1)(2)^3; … … 660 660 661 661 662 ///////////////////////////////////////////////////////////////////////////// 662 /////////////////////////////////////////////////////////////////////////////// 663 663 proc cohomologyMatrixFromResolution(multigradedcomplex T, intvec low, intvec high) 664 664 "USAGE: cohomologyMatrixFromResolution(T,low,high); T multigradedcomplex, low intvec, high intvec … … 694 694 695 695 ring E = basering; 696 int n = nvars(E)-2; i.e. if P = P^{n_1} x P^{n_2}, then n = n_1+n_2697 now compute the cohomology table from the tate resolution696 int n = nvars(E)-2; // i.e. if P = P^{n_1} x P^{n_2}, then n = n_1+n_2 697 // now compute the cohomology table from the tate resolution 698 698 int i,j,k,d,numhk; 699 ring Z = 0,h,dp; in this ring we compute the cohomologymatrix699 ring Z = 0,h,dp; // in this ring we compute the cohomologymatrix 700 700 setring(Z); 701 701 matrix cohomologymat[high[2]-low[2]+1][high[1]-low[1]+1]; 702 702 703 for (i = low[1]; i <= high[1]; i++) iterate over rows703 for (i = low[1]; i <= high[1]; i++) //iterate over rows 704 704 { 705 705 for (j = low[2]; j <= high[2]; j++) 706 706 { 707 compute the entry (i,j) of the cohomologymatrix707 // compute the entry (i,j) of the cohomologymatrix 708 708 for (k=0; k<= n; k++) 709 709 { 710 compute coefficient of h^k in entry (i,j)711 find these information in the term d = -i-j-k710 // compute coefficient of h^k in entry (i,j) 711 // find these information in the term d = -i-j-k 712 712 d = -i-j-k; 713 as we don't shift the resolution by some homological degree, the dth term corresponds714 to the (d+1+T.shift)th entry in T713 // as we don't shift the resolution by some homological degree, the dth term corresponds 714 // to the (d+1+T.shift)th entry in T 715 715 setring(E); 716 716 numhk = 0; … … 754 754 755 755 756 //////////////////////////////////////////////////////////////////////// 756 ////////////////////////////////////////////////////////////////////////// 757 757 proc eulerPolynomialTable(module M, intvec low, intvec high) 758 758 "USAGE: eulerPolynomialTable(M,low,high); M module, L list, low intvec, high intvec … … 779 779 780 780 int i,j,k,d,numhk; 781 ring Z = 0,h,dp; in this ring we compute the eulerpolynomialtable781 ring Z = 0,h,dp; // in this ring we compute the eulerpolynomialtable 782 782 setring(Z); 783 783 HashTable eulerpolynomialtable; … … 795 795 } 796 796 entry = entry +low; 797 now compute euler polynomial797 // now compute euler polynomial 798 798 setring(Z); 799 799 eulerpoly = 0; … … 818 818 {"EXAMPLE:"; 819 819 echo = 2; 820 example 1820 // example 1 821 821 intvec c1 = 1,1; 822 822 def (S1,E1) = productOfProjectiveSpaces(c1); … … 837 837 print(cohomologymat); 838 838 839 example 2839 // example 2 840 840 intvec c2 = 1,1,1; 841 841 def (S2,E2) = productOfProjectiveSpaces(c2); … … 852 852 853 853 854 //////////////////////////////////////////////////////////////////////// 854 ////////////////////////////////////////////////////////////////////////// 855 855 proc cohomologyHashTable(module M, intvec low, intvec high) 856 856 "USAGE: cohomologyHashTable(M,L,low,high); M module, low intvec, high intvec … … 873 873 } 874 874 875 int n = nvars(basering)-size(low); ie if P = P^{n_1} x \cdtos x P^{n_t}, then n = n_1 + \cdots + n_t875 int n = nvars(basering)-size(low); // ie if P = P^{n_1} x \cdtos x P^{n_t}, then n = n_1 + \cdots + n_t 876 876 def (E,tate) = tateResolution(M,low, high); 877 877 setring(E); … … 893 893 for (k=0; k<= n; k++) 894 894 { 895 compute vorfaktor of h^k in entry (i,j)896 find these information in the term d = -i-j-k895 // compute vorfaktor of h^k in entry (i,j) 896 // find these information in the term d = -i-j-k 897 897 d = -sum(entry)-k; 898 as we don't shift the resolution by some homological degree, the dth term corresponds899 to the (d+tate.shift)th entry in reso898 // as we don't shift the resolution by some homological degree, the dth term corresponds 899 // to the (d+tate.shift)th entry in reso 900 900 setring(E); 901 901 numhk = 0; … … 932 932 933 933 934 //////////////////////////////////////////////////////////////////////// 934 ////////////////////////////////////////////////////////////////////////// 935 935 proc twist(module M,intvec c) 936 936 "USAGE: twist(M,c); M module, c intvec … … 966 966 967 967 968 ///////////////////////////////////////////////////////////////////////////// 968 /////////////////////////////////////////////////////////////////////////////// 969 969 proc beilinsonWindow(multigradedcomplex T) 970 970 "USAGE: beilinsonWindow(T); T multigradedcomplex … … 983 983 intvec n = getDimensionVector(getVariableWeights(basering)); 984 984 985 go through all modules in the complex985 // go through all modules in the complex 986 986 for (i = size(T.modules); i >= 1; i--) 987 987 { … … 989 989 if (size(c)>1) 990 990 { 991 need to determine the module grading991 // need to determine the module grading 992 992 T.modules[i] = setModuleGrading(freemodule(size(c)-1),deleteColumnsIntmat(getModuleGrading(T.modules[i]),c)); 993 993 994 994 if(i > 2 && i <= size(T.differentials)) 995 995 { 996 delete rows and columns in the corresponding maps997 delete rows in T.differentials[i] and adjust the module grading996 //delete rows and columns in the corresponding maps 997 // delete rows in T.differentials[i] and adjust the module grading 998 998 A = matrix(T.differentials[i]); 999 999 A = deleteRows(A,c); 1000 1000 T.differentials[i] = setModuleGrading(module(A),deleteColumnsIntmat(getModuleGrading(T.differentials[i]),c)); 1001 delete columns in T.differentials[i-1] if i > 21002 delete columns in T.differentials[i-1]1001 //delete columns in T.differentials[i-1] if i > 2 1002 //delete columns in T.differentials[i-1] 1003 1003 A = matrix(T.differentials[i-1]); 1004 1004 A = deleteColumns(A,c); … … 1009 1009 if(i == 1) 1010 1010 { 1011 only have to delete rows1011 //only have to delete rows 1012 1012 A = matrix(T.differentials[i]); 1013 1013 A = deleteRows(A,c); … … 1016 1016 else 1017 1017 { 1018 only have to delete columns1018 // only have to delete columns 1019 1019 A = matrix(T.differentials[i-1]); 1020 1020 A = deleteColumns(A,c); … … 1067 1067 1068 1068 1069 ///////////////////////////////////////////////////////////////////////////// 1069 /////////////////////////////////////////////////////////////////////////////// 1070 1070 proc regionComplex(multigradedcomplex T, intvec d, intvec I, intvec J, intvec K) 1071 1071 "USAGE: regionComplex(T,d,I,J,K); T multigradedcomplex, d intvec, I intvec, J intvec, K intvec … … 1086 1086 intmat grad; 1087 1087 1088 go through all modules in the complex T1088 // go through all modules in the complex T 1089 1089 for (i = size(T.modules); i>= 1; i--) 1090 1090 { 1091 1091 c = goodColumns(getModuleGrading(T.modules[i]),d,I,J,K); 1092 analogous procedure to beilinsonWindow1092 // analogous procedure to beilinsonWindow 1093 1093 if (size(c)>1) 1094 1094 { 1095 need to determine the module grading1095 // need to determine the module grading 1096 1096 T.modules[i] = setModuleGrading(freemodule(size(c)-1),deleteColumnsIntmat(getModuleGrading(T.modules[i]),c)); 1097 1097 1098 1098 if(i > 2 && i <= size(T.differentials)) 1099 1099 { 1100 delete rows and columns in the corresponding maps1101 delete rows in T.differentials[i] and adjust the module grading1100 //delete rows and columns in the corresponding maps 1101 // delete rows in T.differentials[i] and adjust the module grading 1102 1102 A = matrix(T.differentials[i]); 1103 1103 A = deleteRows(A,c); 1104 1104 T.differentials[i] = setModuleGrading(module(A),deleteColumnsIntmat(getModuleGrading(T.differentials[i]),c)); 1105 delete columns in T.differentials[i-1] if i > 21106 delete columns in T.differentials[i-1]1105 //delete columns in T.differentials[i-1] if i > 2 1106 //delete columns in T.differentials[i-1] 1107 1107 A = matrix(T.differentials[i-1]); 1108 1108 A = deleteColumns(A,c); … … 1113 1113 if(i == 1) 1114 1114 { 1115 only have to delete rows1115 //only have to delete rows 1116 1116 A = matrix(T.differentials[i]); 1117 1117 A = deleteRows(A,c); … … 1120 1120 else 1121 1121 { 1122 only have to delete columns1122 // only have to delete columns 1123 1123 A = matrix(T.differentials[i-1]); 1124 1124 A = deleteColumns(A,c); … … 1132 1132 } 1133 1133 } 1134 delete not necessary zeros in T1134 // delete not necessary zeros in T 1135 1135 T = deleteZerosMultigradedComplex(T); 1136 1136 return(T); … … 1173 1173 1174 1174 1175 ///////////////////////////////////////////////////////////////////////////// 1175 /////////////////////////////////////////////////////////////////////////////// 1176 1176 proc strand(multigradedcomplex T, intvec c, intvec J) 1177 1177 "USAGE: strand(T,c,J) … … 1181 1181 " 1182 1182 { 1183 if first entry of I is not 0, then add 0 for better compatibility1183 // if first entry of I is not 0, then add 0 for better compatibility 1184 1184 if (J[1] != 0) 1185 1185 { … … 1221 1221 1222 1222 1223 ////////////////////////////////////////////////////////////////////////// 1223 //////////////////////////////////////////////////////////////////////////// 1224 1224 proc firstQuadrantComplex(multigradedcomplex T, intvec c) 1225 1225 "USAGE: firstQuadrantComplex(T,c); T multigradedcomplex, c intvec … … 1234 1234 1235 1235 1236 ///////////////////////////////////////////////////////////////////////////// 1236 /////////////////////////////////////////////////////////////////////////////// 1237 1237 proc lastQuadrantComplex(multigradedcomplex T, intvec c) 1238 1238 "USAGE: lastQuadrantComplex(T,c); T multigradedcomplex, c intvec … … 1247 1247 1248 1248 1249 ///////////////////////////////////////////////////////////////////////////// 1249 /////////////////////////////////////////////////////////////////////////////// 1250 1250 proc sortedBases(int i) 1251 1251 "USAGE: computes a list sortedB where in each entry k we have sortedB[k] = all monomials of degree k*e_i … … 1279 1279 1280 1280 1281 ///////////////////////////////////////////////////////////////////////////// 1281 /////////////////////////////////////////////////////////////////////////////// 1282 1282 proc diffAntiCommutative(ideal I, ideal J) 1283 1283 "USAGE: differentiate the second input by the first … … 1288 1288 { 1289 1289 matrix D = diff(I,J); 1290 now have to correct the signs since Singular does not do it right...?1290 //now have to correct the signs since Singular does not do it right...? 1291 1291 int i,j; 1292 1292 for (i = 1; i<= nrows(D); i++) … … 1318 1318 1319 1319 1320 ///////////////////////////////////////////////////////////////////////////// 1320 /////////////////////////////////////////////////////////////////////////////// 1321 1321 proc koszulmap(int i, list sortedB) 1322 1322 "USAGE: computes the ith koszul map … … 1357 1357 1358 1358 1359 ///////////////////////////////////////////////////////////////////////////// 1359 /////////////////////////////////////////////////////////////////////////////// 1360 1360 proc simpleBeilinsonBundle(int a, int w, list L) 1361 1361 "USAGE: computes a basic beilinson bundle (i.e. the pullback of a single projective space factor), … … 1377 1377 if ( w<1 || w>t) 1378 1378 { 1379 return(B); return the zero module1380 } 1381 1382 initialize unit vector with one in position w1379 return(B); // return the zero module 1380 } 1381 1382 // initialize unit vector with one in position w 1383 1383 intvec d = (1..t) - (1..t); 1384 1384 d[w] = 1; … … 1388 1388 if ( a < 0 || a > nw ) 1389 1389 { 1390 return(B); return the zero bundle1390 return(B); // return the zero bundle 1391 1391 } 1392 1392 … … 1417 1417 setring(S); 1418 1418 matrix K = fetch(E,K); 1419 have to add multigrading1419 // have to add multigrading 1420 1420 B.iscoker = 1; 1421 1421 M = module(K); 1422 1422 intmat gradeM[t][nrows(M)]; 1423 1423 M = setModuleGrading(M,gradeM); 1424 B.m = twist(M,-d); STIMMT DAS SO WIRKLICH?1424 B.m = twist(M,-d); //STIMMT DAS SO WIRKLICH? 1425 1425 } 1426 1426 } … … 1441 1441 1442 1442 1443 ///////////////////////////////////////////////////////////////////////////// 1443 /////////////////////////////////////////////////////////////////////////////// 1444 1444 proc beilinsonBundle(intvec a, list L) 1445 1445 "USAGE: computes a beilinson bundle (i.e. the pullback of a single projective space factor), … … 1485 1485 1486 1486 1487 ///////////////////////////////////////////////////////////////////////////// 1487 /////////////////////////////////////////////////////////////////////////////// 1488 1488 proc printBundle(bundle B) 1489 1489 "USAGE: prints a bundle … … 1504 1504 1505 1505 1506 ///////////////////////////////////////////////////////////////////////////// 1506 /////////////////////////////////////////////////////////////////////////////// 1507 1507 proc tensorBundle(bundle B1, bundle B2) 1508 1508 "USAGE: computes the tensor product of the bundles … … 1513 1513 bundle B; 1514 1514 1515 first have to consider the two special cases1515 // first have to consider the two special cases 1516 1516 if (B1.iscoker == 0 || B2.iscoker == 0) 1517 1517 { … … 1520 1520 if (B1.m == 0) 1521 1521 { 1522 return 01522 // return 0 1523 1523 B = B1; 1524 1524 } 1525 1525 else 1526 1526 { 1527 then B1.m is just the free module of rank 11527 // then B1.m is just the free module of rank 1 1528 1528 B = B2; 1529 1529 } … … 1533 1533 if (B2.m == 0) 1534 1534 { 1535 return 01535 // return 0 1536 1536 B = B2; 1537 1537 } 1538 1538 else 1539 1539 { 1540 then B2.m is just the free module of rank 11540 // then B2.m is just the free module of rank 1 1541 1541 B = B1; 1542 1542 } … … 1559 1559 bundle B2 = simpleBeilinsonBundle(1,2,E); 1560 1560 1561 bundle B3 = simpleBeilinsonBundle(1,0,E); zero bundle1561 bundle B3 = simpleBeilinsonBundle(1,0,E); // zero bundle 1562 1562 bundle B4 = simpleBeilinsonBundle(0,1,E); 1563 1563 … … 1573 1573 1574 1574 1575 ///////////////////////////////////////////////////////////////////////////// 1575 /////////////////////////////////////////////////////////////////////////////// 1576 1576 proc directSumBundle(bundle B1, bundle B2) 1577 1577 "USAGE: computes the direct sum of the bundles B1 and B2 … … 1582 1582 bundle B; 1583 1583 module M; 1584 first have to consider the special cases1584 // first have to consider the special cases 1585 1585 if (B1.iscoker == 0 || B2.iscoker == 0) 1586 1586 { … … 1589 1589 if(B1.m == 0 || B2.m == 0) 1590 1590 { 1591 return B21591 // return B2 1592 1592 B = B2; 1593 1593 } 1594 1594 else 1595 1595 { 1596 then B1.m is just the free module of rank 11596 // then B1.m is just the free module of rank 1 1597 1597 if(B2.iscoker == 0) 1598 1598 { 1599 both bundles are the bundles corresponding to S^11599 // both bundles are the bundles corresponding to S^1 1600 1600 M = freemodule(2); 1601 1601 intmat grading[2][2]; … … 1605 1605 else 1606 1606 { 1607 have to add zero row to B2.m1607 // have to add zero row to B2.m 1608 1608 matrix z[ncols(B2.m)][1]; 1609 1609 M = module(transpose(concat(z,transpose(B2.m)))); … … 1619 1619 if (B2.m == 0) 1620 1620 { 1621 return B11621 // return B1 1622 1622 B = B1; 1623 1623 } 1624 1624 else 1625 1625 { 1626 then B2.m is just the free module of rank 11627 have to add zero row to B1.m1626 // then B2.m is just the free module of rank 1 1627 // have to add zero row to B1.m 1628 1628 matrix z[ncols(B1.m)][1]; 1629 1629 M = module(transpose(concat(transpose(B1.m),z))); … … 1638 1638 { 1639 1639 intmat grading = concatIntmat(getModuleGrading(B1.m), getModuleGrading(B2.m)); 1640 need to construct the new matrix1640 // need to construct the new matrix 1641 1641 matrix M1[nrows(B1.m)][ncols(B2.m)]; 1642 1642 matrix M2[nrows(B2.m)][ncols(B1.m)]; … … 1660 1660 bundle B1 = simpleBeilinsonBundle(1,1,E); 1661 1661 bundle B2 = simpleBeilinsonBundle(1,2,E); 1662 bundle B3 = simpleBeilinsonBundle(1,0,E); zero bundle1662 bundle B3 = simpleBeilinsonBundle(1,0,E); // zero bundle 1663 1663 bundle B4 = simpleBeilinsonBundle(0,1,E); 1664 1664 … … 1674 1674 1675 1675 1676 ///////////////////////////////////////////////////////////////////////////// 1676 /////////////////////////////////////////////////////////////////////////////// 1677 1677 proc concatIntmat(intmat A, intmat B) 1678 1678 { … … 1683 1683 ERROR("A and B do not have the same number of rows"); 1684 1684 } 1685 return the concatenated matrix [A; B]1685 // return the concatenated matrix [A; B] 1686 1686 int i,j; 1687 1687 intmat AB[nrows(A)][ncols(A)+ncols(B)]; … … 1705 1705 1706 1706 1707 ///////////////////////////////////////////////////////////////////////////// 1707 /////////////////////////////////////////////////////////////////////////////// 1708 1708 proc shift(multigradedcomplex A, int i) 1709 1709 "USAGE: computes A[i], the shifted multigraded complex … … 1727 1727 1728 1728 1729 ///////////////////////////////////////////////////////////////////////////// 1730 1731 static procedures1732 1733 ///////////////////////////////////////////////////////////////////////////// 1734 1735 1736 ///////////////////////////////////////////////////////////////////////////// 1737 static proc jacobM(matrix M) kopiert aus sheafcoh.lib1738 { 1739 computes the jacobian matrix of the input matrix1729 /////////////////////////////////////////////////////////////////////////////// 1730 // 1731 // static procedures 1732 // 1733 /////////////////////////////////////////////////////////////////////////////// 1734 1735 1736 /////////////////////////////////////////////////////////////////////////////// 1737 static proc jacobM(matrix M) //kopiert aus sheafcoh.lib 1738 { 1739 // computes the jacobian matrix of the input matrix 1740 1740 int n=nvars(basering); 1741 1741 matrix B=transpose(diff(M,var(1))); … … 1749 1749 1750 1750 1751 //////////////////////////////////////////////////////////////////////// 1751 ////////////////////////////////////////////////////////////////////////// 1752 1752 static proc countMultiDegree(intvec c, intmat multiDegrees) 1753 1753 "USAGE: counts how often a multidegree occurs in the matrix multiDegrees … … 1756 1756 " 1757 1757 { 1758 iterate through the columns of matrix multiDegrees and count how often c arises as a colum1758 // iterate through the columns of matrix multiDegrees and count how often c arises as a colum 1759 1759 int numc; 1760 1760 int i; … … 1770 1770 1771 1771 1772 ///////////////////////////////////////////////////////////////////////////// 1772 /////////////////////////////////////////////////////////////////////////////// 1773 1773 static proc subtractIntMat(intmat A, int d) 1774 1774 { 1775 uses subtract to subtract d from all the columns1775 //uses subtract to subtract d from all the columns 1776 1776 matrix result; 1777 1777 intvec c; … … 1789 1789 1790 1790 1791 ///////////////////////////////////////////////////////////////////////////// 1791 /////////////////////////////////////////////////////////////////////////////// 1792 1792 static proc subtract(intvec c, int d) 1793 1793 { 1794 if size(c) != 2 then error1795 assume d >01796 subtract in total d from the intvec c (go through all possibilities)1797 there are in total d+1 possibilities1794 //if size(c) != 2 then error 1795 // assume d >0 1796 //subtract in total d from the intvec c (go through all possibilities) 1797 // there are in total d+1 possibilities 1798 1798 intmat result[2][d+1]; 1799 1799 int i = d; … … 1810 1810 1811 1811 1812 ///////////////////////////////////////////////////////////////////////////// 1812 /////////////////////////////////////////////////////////////////////////////// 1813 1813 static proc matrixWithSpecificEntries(int a, int b, intvec c) 1814 1814 { 1815 ith row has entries c[i]1815 // ith row has entries c[i] 1816 1816 int i,j; 1817 1817 intmat A[a][b]; … … 1827 1827 1828 1828 1829 ///////////////////////////////////////////////////////////////////////////// 1829 /////////////////////////////////////////////////////////////////////////////// 1830 1830 static proc deleteZerosReso(list L) 1831 1831 "USAGE: deletes all the zero entries in the list which represents a complex … … 1841 1841 if (size(L) <= 1) 1842 1842 { 1843 nothing more to do, list is just zero and ist just an empty complex1843 // nothing more to do, list is just zero and ist just an empty complex 1844 1844 flag = 0; 1845 1845 } … … 1847 1847 else 1848 1848 { 1849 check whether entry is the zero module (size(L[i]) == 0)1850 or if the entry is the zero matrix (L[i] == 0)1849 // check whether entry is the zero module (size(L[i]) == 0) 1850 // or if the entry is the zero matrix (L[i] == 0) 1851 1851 if (L[i] == 0 || size(L[i]) == 0) 1852 1852 { 1853 delete list entry1853 // delete list entry 1854 1854 L = delete(L,2); 1855 1855 L[1] = L[1]-1; … … 1874 1874 1875 1875 1876 ///////////////////////////////////////////////////////////////////////////// 1876 /////////////////////////////////////////////////////////////////////////////// 1877 1877 static proc deleteColumnsIntmat(intmat A, intvec c) 1878 1878 "USAGE: delete the columns of A not corresponding to the indices in c[2],..., c[size(c)] … … 1892 1892 1893 1893 1894 ///////////////////////////////////////////////////////////////////////////// 1894 /////////////////////////////////////////////////////////////////////////////// 1895 1895 static proc deleteRows(matrix A, intvec c) 1896 1896 "USAGE: delete the rows of A not corresponding to the indices in c[2],..., c[size(c)] … … 1907 1907 1908 1908 1909 ///////////////////////////////////////////////////////////////////////////// 1909 /////////////////////////////////////////////////////////////////////////////// 1910 1910 static proc deleteColumns(matrix A, intvec c) 1911 1911 "USAGE: delete the columns of A not in c[2],..., c[size(c)] … … 1928 1928 1929 1929 1930 ///////////////////////////////////////////////////////////////////////////// 1930 /////////////////////////////////////////////////////////////////////////////// 1931 1931 static proc goodColumns(intmat A, intvec c, intvec I, intvec J, intvec K) 1932 1932 "USAGE: compute columns of A which have entries in the desired range … … 1939 1939 " 1940 1940 { 1941 need to filter which columns satisfy a_i < c_i for i in I1942 a_i = c_i for i in J, a_i >= c_i for i in K1941 // need to filter which columns satisfy a_i < c_i for i in I 1942 // a_i = c_i for i in J, a_i >= c_i for i in K 1943 1943 intvec d; 1944 1944 for (int i = 1; i <= ncols(A); i++) … … 1953 1953 1954 1954 1955 ///////////////////////////////////////////////////////////////////////////// 1955 /////////////////////////////////////////////////////////////////////////////// 1956 1956 static proc isGood(intvec a, intvec c, intvec I, intvec J, intvec K) 1957 1957 { 1958 return 1 if the vector a satisfies a_i < c_i for i in I1959 a_i = c_i for i in J, a_i >= c_i for i in K1958 // return 1 if the vector a satisfies a_i < c_i for i in I 1959 // a_i = c_i for i in J, a_i >= c_i for i in K 1960 1960 int i; 1961 1961 … … 1987 1987 1988 1988 1989 ///////////////////////////////////////////////////////////////////////////// 1989 /////////////////////////////////////////////////////////////////////////////// 1990 1990 static proc isDisjoint(intvec I, intvec J, intvec K) 1991 1991 "USAGE: test whether the entries of I,J,K are disjoint (not consider 0) … … 2017 2017 2018 2018 2019 ///////////////////////////////////////////////////////////////////////////// 2019 /////////////////////////////////////////////////////////////////////////////// 2020 2020 static proc getColumnIntmat(intmat A, int i) 2021 2021 "USAGE: returns intvec corresponding to ith column if the matrix … … 2033 2033 2034 2034 2035 ///////////////////////////////////////////////////////////////////////////// 2035 /////////////////////////////////////////////////////////////////////////////// 2036 2036 static proc getTargetGrading(matrix A, intmat sourceGrading) 2037 2037 "USAGE: computes the shifts in the target of A when we regard A as a homogeneous map … … 2044 2044 " 2045 2045 { 2046 consider the map F1 = \oplus S(-d_j) \to F0 = \oplus S(-c_i)2046 // consider the map F1 = \oplus S(-d_j) \to F0 = \oplus S(-c_i) 2047 2047 int cols = ncols(A); 2048 2048 int rows = nrows(A); 2049 2049 intmat targetGrading[nrows(sourceGrading)][rows]; 2050 2050 2051 TODO : Check if sourceGrading has the right size2051 // TODO : Check if sourceGrading has the right size 2052 2052 2053 2053 int i,j; … … 2061 2061 if (A[i,nonzeroentry]!= 0) 2062 2062 { 2063 apply formula and compute c_i2063 // apply formula and compute c_i 2064 2064 2065 2065 for (j = 1; j<= nrows(sourceGrading); j++) … … 2068 2068 } 2069 2069 2070 do the following to stop the while loop2070 // do the following to stop the while loop 2071 2071 break; 2072 2072 } … … 2094 2094 2095 2095 2096 ///////////////////////////////////////////////////////////////////////////// 2096 /////////////////////////////////////////////////////////////////////////////// 2097 2097 static proc getSourceGrading(matrix A, intmat targetGrading) 2098 2098 "USAGE: computes the shifts in the target of A when we regard A as a homogeneous map … … 2103 2103 " 2104 2104 { 2105 TODO: Eine der beiden Funktionen ist eigentlich unnoetig, kann man auch auf die andere zurueckfuehren2106 2107 consider the map F1 = \oplus S(-d_j) \to F0 = \oplus S(-c_i)2105 // TODO: Eine der beiden Funktionen ist eigentlich unnoetig, kann man auch auf die andere zurueckfuehren 2106 2107 // consider the map F1 = \oplus S(-d_j) \to F0 = \oplus S(-c_i) 2108 2108 int cols = ncols(A); 2109 2109 int rows = nrows(A); 2110 2110 intmat sourceGrading[2][cols]; 2111 2111 2112 TODO : Check if targetGrading has the right size2112 // TODO : Check if targetGrading has the right size 2113 2113 2114 2114 int i; … … 2122 2122 if (A[nonzeroentry,i]!= 0) 2123 2123 { 2124 apply formula and compute c_i2124 // apply formula and compute c_i 2125 2125 sourceGrading[1,i] = targetGrading[1,nonzeroentry] + multiDeg(poly(A[nonzeroentry,i]))[1]; 2126 2126 sourceGrading[2,i] = targetGrading[2,nonzeroentry] + multiDeg(poly(A[nonzeroentry,i]))[2]; 2127 2127 2128 in this case stop the while loop2128 // in this case stop the while loop 2129 2129 break; 2130 2130 } … … 2151 2151 2152 2152 2153 ///////////////////////////////////////////////////////////////////////////// 2153 /////////////////////////////////////////////////////////////////////////////// 2154 2154 static proc isLEQ(intvec c, intvec d) 2155 2155 "USAGE: checks whether the intvec c is lower or equal to the intvec d (componentwise) … … 2186 2186 2187 2187 2188 ///////////////////////////////////////////////////////////////////////////// 2188 /////////////////////////////////////////////////////////////////////////////// 2189 2189 static proc isSmaller(intvec c, intvec d) 2190 2190 "USAGE: isSmaller(c,d); c intvec, d intvec … … 2222 2222 2223 2223 2224 ///////////////////////////////////////////////////////////////////////////// 2224 /////////////////////////////////////////////////////////////////////////////// 2225 2225 static proc vectorsLEQ(intvec c) 2226 2226 "USAGE: compute all vectors >= 0 and <= c … … 2248 2248 2249 2249 return(A); 2250 lowerbounds = concat(lowerbounds, matrix(getModuleGrading(T[i])));2250 //lowerbounds = concat(lowerbounds, matrix(getModuleGrading(T[i]))); 2251 2251 } 2252 2252 example … … 2260 2260 2261 2261 2262 ///////////////////////////////////////////////////////////////////////////// 2262 /////////////////////////////////////////////////////////////////////////////// 2263 2263 static proc inBeilinsonWindow(intmat D, intvec n) 2264 2264 "USAGE: compute the indices of all multidegrees in D in the range 0 \leq a \leq n … … 2303 2303 2304 2304 2305 ///////////////////////////////////////////////////////////////////////////// 2305 /////////////////////////////////////////////////////////////////////////////// 2306 2306 static proc deleteZerosMultigradedComplex(multigradedcomplex T) 2307 2307 "USAGE: delete superflous zeros in a multigraded complex … … 2368 2368 2369 2369 2370 ///////////////////////////////////////////////////////////////////////////// 2370 /////////////////////////////////////////////////////////////////////////////// 2371 2371 static proc getDimensionVector(intmat variableWeights) 2372 2372 "USAGE: compute the indices of all multidegrees in D in the range 0 \leq a \leq n … … 2389 2389 2390 2390 2391 ///////////////////////////////////////////////////////////////////////////// 2391 /////////////////////////////////////////////////////////////////////////////// 2392 2392 static proc gradingAndVectorCompatible(module M, intvec c) 2393 2393 { … … 2403 2403 2404 2404 2405 ///////////////////////////////////////////////////////////////////////////// 2405 /////////////////////////////////////////////////////////////////////////////// 2406 2406 static proc deleteFirstEntry(multigradedcomplex tate) 2407 2407 {
Note: See TracChangeset
for help on using the changeset viewer.