- Timestamp:
- May 13, 2015, 5:44:20 PM (9 years ago)
- Branches:
- (u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
- Children:
- f255f00715b2e38983ecf37e5ec5aaea460c09d8
- Parents:
- 49b7480ebc6b89c61ea6555f8f339873abbac069
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2015-05-13 17:44:20+02:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2015-05-27 21:55:26+02:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/gradedModules.lib
r49b748 r45df9b3 23 23 grobj(M,w[,d]) construct a graded object (map) given by matrix M 24 24 grtest(A) check whether A is a valid graded object 25 grisequal(A,B) check whether A is exactly eqal to B? TODO: isomorphic!26 25 grdeg(M) compute graded degrees of columns of the map M 27 26 grview(M) view the graded structure of map M … … 57 56 matrixpres(a) matrix presentation of direct sum of Omega^{a[i]}(i) 58 57 "; 58 59 // grisequal(A,B) check whether A is exactly eqal to B? TODO: isomorphic! 59 60 60 61 LIB "matrix.lib"; // ? … … 73 74 "direct sum_i=1^size R(-v[i]), for source and targets of graded objects" 74 75 { 76 int n = size(v); 77 if (n == 0) { return ("0"); } 78 ASSUME(0, n > 0 ); 79 75 80 if (R == "") 76 81 { … … 80 85 ASSUME(0, defined(R) && (R != "") ); 81 86 82 int n = size(v);83 84 if (n == 0) { return ("0"); }85 86 ASSUME(0, n > 0 );87 88 87 v = -v; // NOTE: due to Mathematical meanings of Singular data 89 88 … … 178 177 string R = nameof(basering); 179 178 180 if( typeof( N ) == "list" ) 181 { 182 msg = msg + " resolution"; // TODO: what about chain maps? 179 if( typeof( N ) == "list" ) // TODO: find a better DS for graded resolutions / chain map !? 180 { 181 int n = size(N); ASSUME(0, n > 0); 182 183 string msg1 = ""; 183 184 if( size(R) >= 2 ) 184 185 { 185 msg = msg + "(let R:="+R+")"; 186 R = "R"; 186 msg1 = msg1 + "(let R:="+R+")"; 187 R = "R"; // !!! 188 } 189 msg1 = msg1 + ": " ; 190 191 192 193 list arr; arr[n] = list(); 194 int exact = (1==1); 195 196 int i = 1; 197 198 ASSUME(1, grtest(N[i])); 199 200 string dst = grsumstr(R, grrange(N[i])); 201 string src = grsumstr(R, grdeg(N[i])); 202 203 arr[i] = list(dst, src); 204 205 i = i + 1; 206 207 while( i <= n ) 208 { 209 ASSUME(1, grtest(N[i])); 210 211 dst = grsumstr(R, grrange(N[i])); 212 213 if( exact && (src != dst) ) 214 { 215 // "src: [" + src+ "] != [" + dst + "] :(!!"; 216 exact = (1==0); 217 } 218 219 src = grsumstr(R, grdeg(N[i])); 220 221 arr[i] = list(dst, src); 222 223 i = i + 1; 224 }; 225 226 string o = ""; 227 228 if( exact ) 229 { // complex? 230 msg = msg + " resolution" + msg1; 231 232 o = "d"; 233 234 for( i = 1; i <= n; i++ ) 235 { 236 msg = msg + newline + arr[i][1] + " <-- "+o+"_" + string(i) + " --"; 237 }; 238 239 msg = msg + newline + arr[n][2]; 240 msg = msg + ", given by maps: "; 241 } else 242 { 243 // print(arr); 244 245 msg = msg + "-object collection"; 246 o = "o"; 247 248 // for( i = 1; i <= n; i++ ) 249 // { 250 // msg = msg + newline + arr[i][1] + " <-- "+o+"_" + string(i) + " -- " + arr[i][2]; 251 // }; 252 msg = msg + ", given by the following maps (named here as "+o+"_[1 .. "+string(n)+"]): "; 187 253 } 188 254 189 190 int i = 1; int n = size(N);191 string dst;192 193 msg = msg + ": " + newline + grsumstr(R, grrange(N[i])) + " <-- d_" + string(i) + " -- " ;194 for( ; i < n; i++ )195 {196 dst = grsumstr(R, grdeg(N[i])) + " <-- d_" + string(i+1) + " --";197 msg = msg + newline + dst;198 };199 200 msg = msg + newline + grsumstr(R, grdeg(N[i])) + ", given by maps: ";201 255 202 256 print(msg); … … 204 258 for( i = 1; i <= size(N); i++ ) 205 259 { 206 "d_" + string(i) + " :"; grview(N[i]); 260 print( o+"_" + string(i) + " :" ); 261 grview( N[i] ); 207 262 }; 208 263 … … 393 448 } 394 449 395 /*396 if( flag ) // output details in case of non-identical permutation?397 {398 // grades & ordering permutation : gr[pivot] should be sorted:399 "s: ", s;400 "gr: ", gr;401 "pivot: ", pivot;402 }403 */404 450 ASSUME(1, issorted(intvec(gr[pivot]), 1)); 405 451 … … 407 453 } 408 454 409 // Q@Wolfram: what should be done with zero gens!?410 455 proc grdeg(M) 411 456 "USAGE: grdeg(M), graded object M 412 457 RETURN: intvec of degrees 413 PURPOSE: graded degrees of columns (generators) of M 458 PURPOSE: graded degrees of columns (generators) of M, describing the source of M 414 459 ASSUME: M must be a graded object (matrix/module/ideal/mapping) 415 460 NOTE: if M has zero cols it shoud have attrib(M,'degHomog') set. … … 423 468 def t = attrib(M, "degHomog"); // graded degrees 424 469 425 if( ncols(M) == 0 ) { return (t); } // for now470 if( size(t) == 0 ){ return (t); } // ZERO! 426 471 427 ASSUME( 0, ncols(M) == size(t) );472 ASSUME(2, ncols(M) == size(t) ); 428 473 return (t); 429 474 } 430 475 476 if( ncols(M) == 0 ) { return (0:0); } // FIXME: Why??? 477 431 478 ASSUME(0, ncols(M) > 0); 432 433 479 ASSUME(0, ncols(M) == size(M) ); 434 480 … … 747 793 ///////////////////////////////////////////////////////// 748 794 749 // Q@Woflram?750 795 proc grzero() 751 796 "USAGE: grzero() … … 755 800 " 756 801 { 757 return ( grobj( module([0]), intvec(0), intvec(0)) );802 return ( grobj(freemodule(0), intvec(0:0), intvec(0:0)) ); 758 803 } 759 804 example … … 762 807 ring r=32003,(x,y,z),dp; 763 808 764 def M = grpower( grshift( grzero(), 10), 5 ); 765 766 print(M); 767 768 grview(M); 809 810 grview( grobj(freemodule(0), intvec(0:0), intvec(0:0)) ); 811 grview( grobj(freemodule(0), intvec(0:0)) ); 812 813 grview( grzero() ); 814 815 // def M = grpower( grshift( grzero(), 3), 2 ); grview(M); 816 } 817 818 proc grtwists(intvec v) 819 "USAGE: grtwists(v), intvec v 820 RETURN: graded object representing S(v[1]) + ... + S(v[size(v)]) 821 PURPOSE: compute presentation of S(v[1]) + ... + S(v[size(v)]) 822 EXAMPLE: example grtwists; shows an example 823 " 824 { 825 matrix m[size(v)][0]; 826 return( grobj(m, -v) ); // will set the rank as well 827 } 828 example 829 { "EXAMPLE:"; echo = 2; 830 831 ring r=32003,(x,y,z),dp; 832 833 grview( grtwists ( intvec(-4, 1, 6 )) ); 834 835 grview( grtwists ( intvec(0:0) ) ); 836 } 837 838 proc grtwist(int a, int d) 839 "USAGE: grtwist(a,d), int a, d 840 RETURN: graded object representing S(d)^a 841 PURPOSE: compute presentation of S(d)^a 842 EXAMPLE: example grtwist; shows an example 843 " 844 { 845 ASSUME(0, a > 0); 846 def Z = grtwists( intvec(d:a) ); // will set the rank as well 847 // ASSUME(2, grisequal(Z, grpower( grshift(grzero(), d), a ) )); // optional check 848 return(Z); 849 } 850 example 851 { "EXAMPLE:"; echo = 2; 852 853 ring r=32003,(x,y,z),dp; 854 855 // grview(grpower( grshift(grzero(), 10), 5 ) ); 856 857 grview( grtwist (5, 10) ); 769 858 } 770 859 … … 827 916 intvec b = grrange(B); 828 917 intvec c = a,b; 829 int r = nrows(A); 830 831 module T = align(module(B), r); // T; print(T); nrows(T); // BUG!!!! 832 module S = module(A), T; 918 919 if( (ncols(B)>0) && (size(B)>0) ) 920 { 921 int r = nrows(A); 922 module T = align(module(B), r); // T; print(T); nrows(T); // BUG!!!! 923 module S = module(A), T; 924 } 925 else { def S = A; } 833 926 834 927 intvec da = grdeg(A); … … 836 929 intvec dc = da, db; 837 930 838 return(grobj(S, c, dc)); 931 932 def SS = grobj(S, c, dc); 933 934 ASSUME(0, size( grrange(SS) ) == (size(a) + size(b)) ); 935 ASSUME(0, size( grdeg(SS) ) == (size(da) + size(db)) ); 936 ASSUME(0, ncols( SS ) == size( grdeg(SS) ) ); 937 ASSUME(0, nrows( SS ) == size( grrange(SS) ) ); 938 939 return(SS); 839 940 } 840 941 example … … 883 984 { 884 985 ASSUME(1, grtest(M) ); 986 987 885 988 886 989 intvec a = grrange(M); 990 intvec t = grdeg(M); 991 992 if( size(a) == 0 && size(t) == 0 ) 993 { 994 "!! Warning: shifting '0 <- 0' leaves it as it unchanged!"; 995 return (M); 996 } 997 887 998 a = a - intvec(d:size(a)); 888 889 intvec t = attrib(M, "degHomog");890 999 t = t - intvec(d:size(t)); 891 1000 … … 904 1013 905 1014 grview(S); 1015 1016 grview( grshift( grzero(), 100 ) ); // does nothing... 906 1017 } 907 1018 … … 934 1045 example 935 1046 { "EXAMPLE:"; echo = 2; 936 TODO 937 } 938 939 proc grtwist(int a, int d) 940 "USAGE: grtwist(a,d), int a, d 941 RETURN: graded object representing S(d)^a 942 PURPOSE: compute presentation of S(d)^a 943 EXAMPLE: example grtwist; shows an example 944 " 945 { 946 ASSUME(0, a > 0); 947 948 module Z; Z[a] = [0]; 949 intvec w = -intvec(d:a); 950 Z = grobj(Z, w, w); // will set the rank as well 951 ASSUME(2, grisequal(Z, grpower( grshift(grzero(), d), a ) )); // optional check 952 return(Z); 953 } 954 example 955 { "EXAMPLE:"; echo = 2; 956 957 ring r=32003,(x,y,z),dp; 958 959 grview(grpower( grshift(grzero(), 10), 5 ) ); 960 961 grview( grtwist (5, 10) ); 1047 // TODO 962 1048 } 963 1049 … … 969 1055 " 970 1056 { 971 if( ncols(A) == 0 ) 972 { 973 ASSUME(0, size(w) == nrows(A) ); 974 attrib(A, "isHomog", w); 975 attrib(A, "degHomog", intvec(0)); // FIXME: just for now: no intvec of 0-size :( 976 ASSUME(0, grtest(A) ); 977 return (A); 978 } 1057 ASSUME(0, size(w) >= nrows(A) ); 979 1058 980 1059 module M = module(A); 981 ASSUME(0, size(w) >= nrows(M) );982 1060 983 1061 attrib( M, "rank", size(w) ); 984 1062 attrib( M, "isHomog", w ); 985 1063 1064 intvec @ww = 0:0; 1065 986 1066 if( size(#) > 0 ) 987 1067 { 988 1068 ASSUME(0, typeof(#[1]) == "intvec" ); 989 ASSUME(0, size(#[1]) == ncols(M) ); 990 attrib(M, "degHomog", #[1]); 1069 1070 @ww = intvec( #[1] ); 1071 1072 if( size(@ww) != ncols(M) ) 1073 { 1074 if( (size(M) == 0) && (ncols(M) <= 1) && (size(w) == 0) && (size(@ww) > 0) ) 1075 { 1076 matrix m[size(w)][size(@ww)]; M = module(m); attrib( M, "isHomog", w ); 1077 } 1078 } 1079 1080 ASSUME(0, size(@ww) == ncols(M) ); 991 1081 } 992 1082 else 993 1083 { 994 ASSUME(0, /* no zero cols please! */ size(M) == ncols(M) ); 995 attrib(M, "degHomog", grdeg(M)); 996 } 1084 if( size(M) == ncols(M) ) /* no zero cols? */ 1085 { 1086 @ww = grdeg(M); // let us compute them all :) 1087 } else 1088 { 1089 if( (ncols(M) == 1) && (size(M) == 0) ) 1090 { 1091 M = freemodule(0); 1092 } 1093 1094 attrib( M, "rank", size(w) ); 1095 attrib( M, "isHomog", w ); 1096 1097 // ASSUME(0, /* PROBLEM WITH ZERO COLUMNS / THEIR DEGREES! */ (ncols(M) == 0) ); 1098 } 1099 } 1100 1101 // type(@ww); type(M); 1102 1103 ASSUME(0, size(@ww) == ncols(M) ); // ?! 1104 1105 attrib(M, "degHomog", @ww); 997 1106 998 1107 ASSUME(0, grtest(M) ); … … 1020 1129 1021 1130 // Zero object: 1022 matrix z[3][0]; 1023 def zz = grobj( z, intvec(1,2,3) ); // intvec() ?? 1024 grview(zz); 1131 matrix z[3][0]; grview( grobj( z, intvec(1,2,3) ) ); 1132 grview( grobj( freemodule(0), intvec(1,2,3) ) ); 1133 1134 matrix z1[0][3]; grview( grobj( z1, 0:0, intvec(1,2,3) ) ); 1135 grview( grobj( freemodule(0), 0:0, intvec(1,2,3) ) ); 1136 1137 matrix z0[0][0]; grview( grobj( z0, 0:0 ) ); 1138 grview( grobj( freemodule(0), 0:0 ) ); 1139 1140 1025 1141 1026 1142 } … … 1067 1183 { 1068 1184 intvec T = attrib(N, "degHomog"); // graded degrees 1185 1186 if( (ncols(N) == 1) && (size(T) == 0) && (size(N) == 0) ) 1187 { 1188 // if(b) { "Input seems to be a valid graded ZERO-arrow!"; }; 1189 return (1); 1190 } 1069 1191 1070 1192 if ( ncols(N) != size(T) ) … … 1120 1242 // the following calls will fail due to tests in grtest: 1121 1243 1244 grobj( module([x+y, x, 0, 0], [0, x+y, y, 0]), intvec(0,0,0,0) ); // enough row weights 1122 1245 // grobj( module([x+y, x, 0, 0], [0, x+y, y, 0]), intvec(0,0) ); // not enough row weights 1123 1246 // grobj( module([x,0], [0,0,0], [0, y]), intvec(1,2,3) ); // zero column needs (otherwise optional) total degrees 1124 // grobj( module([x,0], [0,0,0], [0, y]), intvec(1,2,3), intvec(1, 1, 1) ); // incompatible total degrees (on non-zero columns) 1247 grobj( module([x,0], [0,0,0], [0, y]), intvec(1,2,3), intvec(2, 10, 3) ); // compatible total degrees (on non-zero columns) 1248 // grobj( module([x,0], [0,0,0], [0, y]), intvec(1,2,3), intvec(2-1, 10, 3+1) ); // incompatible total degrees (on both non-zero columns) 1125 1249 1126 1250 } … … 1143 1267 return (B); 1144 1268 } 1145 1146 1269 1147 1270 module T; T[d] = 0; … … 1151 1274 example 1152 1275 { "EXAMPLE:"; echo = 2; 1276 1153 1277 ring r; 1154 matrix m[1][0]; 1155 align(m, 3); 1278 matrix m[2][0]; 1279 type( align(m, 3) ); 1280 1281 matrix m[0][2]; 1282 type( align(m, 3) ); 1156 1283 } 1157 1284 … … 1180 1307 } 1181 1308 1182 1183 proc grtwists(intvec v)1184 "USAGE: grtwists(v), intvec v1185 RETURN: graded object representing S(v[1]) + ... + S(v[size(v)])1186 PURPOSE: compute presentation of S(v[1]) + ... + S(v[size(v)])1187 EXAMPLE: example grtwists; shows an example1188 "1189 {1190 int l = size(v);1191 module Z; Z[l] = [0];1192 Z = grobj(Z, -v, -v); // will set the rank as well1193 return(Z);1194 }1195 example1196 { "EXAMPLE:"; echo = 2;1197 1198 ring r=32003,(x,y,z),dp;1199 1200 grview( grtwists ( intvec(-4, 1, 6 )) );1201 }1202 1203 1204 1309 proc grsyz(A) 1205 1310 "USAGE: grsyz(M), graded object M … … 1210 1315 { 1211 1316 ASSUME(1, grtest(A)); 1212 intvec v = grdeg(A); 1213 1214 // grrange(A); 1215 1216 module M = syz(A); 1217 // print(M); 1218 1219 if( size(M) > 0 ) { return( grobj( M, v ) ); } 1220 1221 // zero syzygy? 1222 return( grtwists(-v) ); // ??? 1317 return( grobj( syz(A), grdeg(A) ) ); 1318 1319 // if( size(syz(A)) == 0 ) : zero syzygy? // return( grtwists( -grdeg(A) ) ); 1223 1320 } 1224 1321 example … … 1227 1324 ring r=32003,(x,y,z),dp; 1228 1325 1229 module A = gr obj( module([x+y, x, 0, 3], [0, x+y, y, 2], [y, y, z, 1]), intvec(0,0,0,1) );1326 module A = grgroebner( grobj( module([x+y, x, 0, 3], [0, x+y, y, 2], [y, y, z, 1]), intvec(0,0,0,1) ) ); 1230 1327 grview(A); 1231 1328 1232 module B = grgroebner(A); 1233 grview(B); 1234 1235 module C = grsyz(B); 1236 grview(C); 1329 grview(grsyz(A)); 1330 1331 module X = grgroebner( grobj( module([x]), intvec(2) ) ); 1332 grview(X); 1333 1334 // syzygy module should be zero! 1335 grview(grsyz(X)); 1336 1337 1237 1338 } 1238 1339 … … 1248 1349 ASSUME(1, grtest(B)); 1249 1350 1250 // TODO: ASSUME(0, grdeg() == grrange());!!! 1351 intvec a = grdeg(A); 1352 intvec b = grrange(B); 1353 1354 ASSUME(0, (size(a) == size(b)) && (a == b)); // == for intvec :( 1251 1355 1252 1356 return ( grobj( A*B, grrange(A), grdeg(B) ) ); … … 1276 1380 1277 1381 1382 // TODO: think about a proper data structure for a graded resolution!? 1278 1383 proc grres(def A, int l, list #) 1279 1384 "USAGE: grres(M, l[, b]), graded object M, int l, int b … … 1291 1396 if(b) { list r = res(A, l, #[1]); } else { list r = res(A, l); } 1292 1397 1293 // r; v;1294 1295 1398 l = size(r); 1296 1399 1297 int i; module m;1400 int i; 1298 1401 1299 1402 for ( i = 1; i <= l; i++ ) 1300 1403 { 1301 if( size(r[i]) == 0 ){ r[i] = grtwists(-v); i++; break; } 1404 if( size(r[i]) == 0 ) 1405 { 1406 r[i] = grobj(freemodule(0), v); // grtwists(-v); 1407 i++; 1408 break; 1409 } 1302 1410 1303 1411 r[i] = grobj(r[i], v); v = grdeg(r[i]); 1304 1412 } 1413 1305 1414 i = i-1; 1306 1415 … … 1326 1435 1327 1436 proc grtranspose(def M) 1328 " 1329 USAGE: grtranspose(M), graded object M 1437 "USAGE: grtranspose(M), graded object M 1330 1438 RETURN: graded object 1331 1439 PURPOSE: graded transpose of M … … 1351 1459 1352 1460 1353 module A = grobj( module([x+y, x, 0, 3], [0, x+y, y, 2], [y, y, z, 1]), intvec(0,0,0,1) ); A = grgroebner(A); grview(A); 1354 1355 "graded transpose: "; module B = grtranspose(A); grview( B ); print(B); 1356 1357 "... syzygy: "; module C = grsyz(B); grview(C); 1358 1359 "... transposed: "; module D = grtranspose(C); grview( D ); print (D); 1360 1361 "... and back to presentation: "; module E = grsyz( D ); grview(E); print(E); 1362 1363 module F = grgens( E ); grview(F); print(F); 1364 1365 module G = grpres( F ); grview(G); print(G); 1461 // Corner cases: 0 <- 0! 1462 module Z = grzero(); grview(Z); 1463 grview( grtranspose( Z ) ); 1464 1465 1466 // Corner cases: * <- 0 1467 matrix M1[3][0]; 1468 1469 module Z1 = grobj( M1, intvec(-1, 0, 1) ); grview(Z1); 1470 grview( grtranspose( Z1 ) ); 1471 1472 1473 // Corner cases: 0 <- * 1474 matrix M2[0][3]; 1475 1476 module Z2 = grobj( M2, 0:0, intvec(-1, 0, 1) ); grview(Z2); 1477 grview( grtranspose( Z2 ) ); 1478 1366 1479 } 1367 1480 1368 1481 1369 1482 proc grgens(def M) 1370 " 1371 USAGE: grgens(M), graded object M (map) 1483 "USAGE: grgens(M), graded object M (map) 1372 1484 RETURN: graded object 1373 1485 PURPOSE: try compute graded generators of coker(M) and return them as columns … … 1404 1516 1405 1517 grview( B ); print(B); // Ups :( != A 1518 1519 grview( grgens( grzero() ) ); 1406 1520 1407 1521 } … … 1409 1523 1410 1524 proc grpres(def M) 1411 " 1412 USAGE: grpres(M), graded object M (submodule gens) 1525 "USAGE: grpres(M), graded object M (submodule gens) 1413 1526 RETURN: graded module (via coker) 1414 1527 PURPOSE: compute graded presentation matrix of submodule generated by columns of M … … 1418 1531 ASSUME(1, grtest(M) ); 1419 1532 1420 moduleN = grsyz(M);1533 def N = grsyz(M); 1421 1534 1422 1535 // ASSUME(3, grisequal( M, grgens( N ) ) ); … … 1429 1542 ring r=32003,(x,y,z),dp; 1430 1543 1431 module M = grtwists( intvec(-2, 0, 4, 4) ); grview(M); 1432 1433 module N = grgens(M); grview( N ); print(N); 1434 1435 module L = grpres( N ); grview( L ); print(L); 1436 1437 1438 module A = grobj( module([x+y, x, 0, 3], [0, x+y, y, 2], [y, y, z, 1]), intvec(0,0,0,1) ); 1439 1440 A = grgroebner(A); grview(A); 1441 1442 module B = grgens(A); grview( B ); print(B); 1443 1444 module C = grpres( B ); grview( C ); print(C); 1544 def A = grgroebner( grobj( module([x+y, x, 0, 3], [0, x+y, y, 2], [y, y, z, 1]), intvec(0,0,0,1) ) ); 1545 grview(A); 1546 1547 "graded transpose: "; def B = grtranspose(A); grview( B ); print(B); 1548 1549 "... syzygy: "; def C = grsyz(B); grview(C); 1550 1551 "... transposed: "; def D = grtranspose(C); grview( D ); print (D); 1552 1553 "... and back to presentation: "; def E = grsyz( D ); grview(E); print(E); 1554 1555 def F = grgens( E ); grview(F); print(F); 1556 def G = grpres( F ); grview(G); print(G); 1557 1558 1559 def M = grtwists( intvec(-2, 0, 4, 4) ); grview(M); 1560 1561 def N = grgens(M); grview( N ); print(N); 1562 1563 def L = grpres( N ); grview( L ); print(L); 1445 1564 } 1446 1565 … … 1504 1623 } 1505 1624 1506 // 1507 1508 1625 // TODO: remove the following? 1509 1626 proc KeneshlouMatrixPresentation(intvec a) 1510 "USAGE: intvec a.1627 "USAGE: KeneshlouMatrixPresentation(intvec a), intvec a. 1511 1628 RETURN: graded object 1512 1629 PURPOSE: matrix presentation for direct sum of omega^a[i](i) in form of a graded object … … 1675 1792 1676 1793 proc grrange(M) 1794 "USAGE: grrange(M), graded object M 1795 RETURN: intvec 1796 PURPOSE: get weights of module units, thus describing the target of M 1797 EXAMPLE: example grrange; shows an example 1798 " 1677 1799 { 1678 1800 // ASSUME(1, grtest(M)); // Leads to recursive call due to grtest... 1679 1801 return( attrib(M, "isHomog") ); 1680 1802 } 1803 example 1804 { "EXAMPLE:"; echo = 2; 1805 1806 ring r=32003,(x,y,z),dp; 1807 1808 module Z = grobj(freemodule(0),intvec(0:0),intvec(0:0)); 1809 1810 grrange(Z); 1811 grdeg(Z); 1812 1813 grview(Z); 1814 1815 module P=grobj(module([xy,0,xz]),intvec(0,1,0)); 1816 1817 grrange(P); 1818 grdeg(P); 1819 1820 grview(P); 1821 } 1681 1822 1682 1823 proc grlift0(M, N, alpha1) 1683 "PURPOSE: generic random alpha0 : coker(M) -> coker(N) from random alpha1 1824 "USAGE: grlift0(M, N, alpha1) TODO! 1825 PURPOSE: generic random alpha0 : coker(M) -> coker(N) from random alpha1 1684 1826 NOTE: this proc can work only if some assumptions are fulfilled (due 1685 1827 to Wolfram)! e.g. at the end of a resolution for the source module... … … 1733 1875 1734 1876 proc grlifting(M,N) 1735 "USAGE: graded objects M and N1877 "USAGE: grlifting(M,N), graded objects M and N 1736 1878 RETURN: map of chain complexes (as a list) 1737 1879 PURPOSE: construct a map of chain complexes between free resolutions of Img(M) and Img(N). … … 1823 1965 1824 1966 proc mappingcone(M,N) 1825 "USAGE: M,N graded objects1967 "USAGE: mappingcone(M,N), M,N graded objects 1826 1968 RETURN: chain complex (as a list) 1827 1969 PURPOSE: construct a free resolution of the cokernel of a random map between Img(M), and Img(N). … … 1885 2027 // correct 1886 2028 proc grrndmap(def S, def D, list #) 1887 "USAGE: (S,D), graded objects S and D2029 "USAGE: grrndmap(S,D), graded objects S and D 1888 2030 RETURN: graded object 1889 2031 PURPOSE: construct a random 0-deg graded homomorphism src(S) -> src(D) … … 1919 2061 1920 2062 proc grrndmap2(def D, def S, list #) 1921 "USAGE: (D,S), graded objects S and D2063 "USAGE: grrndmap2(D,S), graded objects S and D 1922 2064 RETURN: graded object 1923 2065 PURPOSE: construct a random 0-deg graded homomorphism between target of D and S. … … 1955 2097 // 1956 2098 proc grlifting2(A,B) 1957 "USAGE: (A,B), graded objects A and B (matrices defining maps)2099 "USAGE: grlifting2(A,B), graded objects A and B (matrices defining maps) 1958 2100 RETURN: map of chain complexes (as a list) 1959 2101 PURPOSE: construct a map of chain complexes between free resolution of … … 2028 2170 // G0<-----F0+G1<------F1+G2<-------F2+G3<----- 2029 2171 proc mappingcone2(A,B) 2030 "USAGE: (A,B), graded objects A and B (matrices defining maps)2172 "USAGE: mappingcone2(A,B), graded objects A and B (matrices defining maps) 2031 2173 RETURN: chain complex (as a list) 2032 2174 PURPOSE: construct the free resolution of a cokernel of a random map between M=coker(A), and N=coker(B) … … 2198 2340 //G0<-----F0+G1<------F1+G2<-------F2+G3<----- 2199 2341 proc mappingcone3(A,B) 2200 "USAGE: (A,B), graded objects A and B (matrices defining maps)2342 "USAGE: mappingcone3(A,B), graded objects A and B (matrices defining maps) 2201 2343 RETURN: chain complex (as a list) 2202 2344 PURPOSE: construct a free resolution of the cokernel of a random map between M=coker(A), and N=coker(B) … … 2290 2432 // TODO: Please decide between KeneshlouMatrixPresentation and matrixpres, and replace one with the other! 2291 2433 proc matrixpres(intvec a) 2292 "USAGE: intvec a2434 "USAGE: matrixpres(a), intvec a 2293 2435 RETURN: graded object 2294 2436 PURPOSE: matrix presentation for direct sum of omega^a[i](i) in form of a graded object
Note: See TracChangeset
for help on using the changeset viewer.