1 | LIB "tst.lib"; |
---|
2 | tst_init(); |
---|
3 | |
---|
4 | //======================= Example A.2 =========================== |
---|
5 | //=============== Example 4.13 (continued) ====================== |
---|
6 | ring S = 32003, x(0..4), dp; |
---|
7 | module MI=maxideal(1); |
---|
8 | attrib(MI,"isHomog",intvec(-1)); |
---|
9 | resolution kos = nres(MI,0); |
---|
10 | matrix alpha0 = random(32002,10,3); |
---|
11 | module pres = module(alpha0)+kos[3]; |
---|
12 | attrib(pres,"isHomog",intvec(1,1,1,1,1,1,1,1,1,1)); |
---|
13 | resolution fcokernel = mres(pres,0); |
---|
14 | module dir = transpose(pres); |
---|
15 | intvec w = -1,-1,-1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2; |
---|
16 | attrib(dir,"isHomog",w); |
---|
17 | resolution fdir = mres(dir,2); |
---|
18 | if (not(defined(flatten))){ LIB "matrix.lib"; } |
---|
19 | ideal I = groebner(flatten(fdir[2])); |
---|
20 | resolution FI = mres(I,0); |
---|
21 | |
---|
22 | LIB "sheafcoh.lib"; |
---|
23 | module F = FI[2]; |
---|
24 | def B = sheafCoh(F,-2,6); |
---|
25 | //-> -2 -1 0 1 2 3 4 5 6 |
---|
26 | //-> ------------------------------------------------- |
---|
27 | //-> 4: - - - - - - - - - |
---|
28 | //-> 3: 3 - - - - - - - - |
---|
29 | //-> 2: - - - - - - - - - |
---|
30 | //-> 1: - - - 1 - - - - - |
---|
31 | //-> 0: - - - - - 7 25 60 119 |
---|
32 | //-> ------------------------------------------------- |
---|
33 | //-> chi: -3 0 0 -1 0 7 25 60 119 |
---|
34 | |
---|
35 | |
---|
36 | kill S,B,w; |
---|
37 | //=============== Example 4.14 (continued) ====================== |
---|
38 | if (not(defined(dsum))){ LIB "matrix.lib"; } |
---|
39 | ring S = 32003, x(0..4), dp; |
---|
40 | resolution kos = nres(maxideal(1),0); |
---|
41 | matrix kos5 = kos[5]; |
---|
42 | matrix tphi = transpose(dsum(kos5,kos5)); |
---|
43 | matrix kos3 = kos[3]; |
---|
44 | matrix psi = dsum(kos3,kos3); |
---|
45 | matrix beta1 = random(32002,20,2); |
---|
46 | matrix tbeta1tilde = transpose(psi*beta1); |
---|
47 | matrix tbeta0 = lift(tphi,tbeta1tilde); |
---|
48 | if (not(defined(Ext_R))){ LIB "homolog.lib"; } |
---|
49 | def E = Ext_R(1,kos[4]); |
---|
50 | //-> // dimension of Ext^1: -1 |
---|
51 | matrix kos4 = kos[4]; |
---|
52 | matrix tkos4pluskos4 = transpose(dsum(kos4,kos4)); |
---|
53 | matrix tgammamin1 = random(32002,20,1); |
---|
54 | matrix tgamma0 = tkos4pluskos4*tgammamin1; |
---|
55 | matrix talpha0 = concat(tbeta0,tgamma0); |
---|
56 | matrix zero[20][1]; |
---|
57 | matrix tpsi = transpose(psi); |
---|
58 | matrix tpresg = concat(tpsi,zero); |
---|
59 | matrix pres = module(transpose(talpha0)) |
---|
60 | + module(transpose(tpresg)); |
---|
61 | module dir = transpose(pres); |
---|
62 | dir = prune(dir); |
---|
63 | homog(dir); |
---|
64 | //-> 1 |
---|
65 | intvec deg_dir = attrib(dir,"isHomog"); |
---|
66 | attrib(dir,"isHomog",deg_dir-2); // set degrees |
---|
67 | resolution fdir = mres(prune(dir),2); |
---|
68 | ideal I = groebner(flatten(fdir[2])); |
---|
69 | resolution FI = mres(I,0); |
---|
70 | |
---|
71 | if (not(defined(sheafCoh))){ LIB "sheafcoh.lib"; } |
---|
72 | module F = FI[2]; |
---|
73 | def B = sheafCoh(F,0,8); |
---|
74 | //-> 0 1 2 3 4 5 6 7 8 |
---|
75 | //-> ------------------------------------------------- |
---|
76 | //-> 4: - - - - - - - - - |
---|
77 | //-> 3: - - - - - - - - - |
---|
78 | //-> 2: - 2 - - - - - - - |
---|
79 | //-> 1: - - - 2 - - - - - |
---|
80 | //-> 0: - - - - 1 15 47 105 198 |
---|
81 | //-> ------------------------------------------------- |
---|
82 | //-> chi: 0 2 0 -2 1 15 47 105 198 |
---|
83 | |
---|
84 | |
---|
85 | kill S,B,deg_dir; |
---|
86 | //======================= Example A.5 =========================== |
---|
87 | //=============== Example 4.13 (continued) ====================== |
---|
88 | ring S = 32003, x(0..4), dp; |
---|
89 | module MI=maxideal(1); |
---|
90 | attrib(MI,"isHomog",intvec(-1)); |
---|
91 | resolution kos = nres(MI,0); |
---|
92 | matrix alpha0 = random(32002,10,3); |
---|
93 | module pres = module(alpha0)+kos[3]; |
---|
94 | attrib(pres,"isHomog",intvec(1,1,1,1,1,1,1,1,1,1)); |
---|
95 | resolution fcokernel = mres(pres,0); |
---|
96 | module dir = transpose(pres); |
---|
97 | intvec w = -1,-1,-1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2; |
---|
98 | attrib(dir,"isHomog",w); |
---|
99 | resolution fdir = mres(dir,2); |
---|
100 | if (not(defined(flatten))){ LIB "matrix.lib"; } |
---|
101 | ideal I = groebner(flatten(fdir[2])); |
---|
102 | resolution FI = mres(I,0); |
---|
103 | |
---|
104 | if (not(defined(sheafCohBGG))){ LIB "sheafcoh.lib"; } |
---|
105 | module F = FI[2]; |
---|
106 | def B = sheafCohBGG(F,-2,6); |
---|
107 | //-> -2 -1 0 1 2 3 4 5 6 |
---|
108 | //-> ------------------------------------------------- |
---|
109 | //-> 4: - - - - - * * * * |
---|
110 | //-> 3: * - - - - - * * * |
---|
111 | //-> 2: * * - - - - - * * |
---|
112 | //-> 1: * * * 1 - - - - * |
---|
113 | //-> 0: * * * * - 7 25 60 119 |
---|
114 | //-> ------------------------------------------------- |
---|
115 | //-> chi: * * * * 0 * * * * |
---|
116 | |
---|
117 | tst_status(1);$ |
---|