source: git/Tst/BuchDL/Ex_App.tst @ c2400ce

spielwiese
Last change on this file since c2400ce was 9558c5f, checked in by Hans Schönemann <hannes@…>, 19 years ago
*hannes/lossen: very long examples from DL-Book git-svn-id: file:///usr/local/Singular/svn/trunk@8762 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 4.3 KB
Line 
1LIB "tst.lib";
2tst_init();
3
4//======================= Example A.2 ===========================
5//=============== Example 4.13 (continued) ======================
6ring S = 32003, x(0..4), dp;
7module MI=maxideal(1);
8attrib(MI,"isHomog",intvec(-1)); 
9resolution kos = nres(MI,0);
10matrix alpha0 = random(32002,10,3);
11module pres = module(alpha0)+kos[3];
12attrib(pres,"isHomog",intvec(1,1,1,1,1,1,1,1,1,1));
13resolution fcokernel = mres(pres,0);
14module dir = transpose(pres);
15intvec w = -1,-1,-1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2;
16attrib(dir,"isHomog",w);
17resolution fdir = mres(dir,2);
18if (not(defined(flatten))){ LIB "matrix.lib"; }
19ideal I = groebner(flatten(fdir[2]));
20resolution FI = mres(I,0);
21
22LIB "sheafcoh.lib";
23module F = FI[2];
24def 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
36kill S,B,w;
37//=============== Example 4.14 (continued) ======================
38if (not(defined(dsum))){ LIB "matrix.lib"; }
39ring S = 32003, x(0..4), dp;
40resolution kos = nres(maxideal(1),0);
41matrix kos5 = kos[5];
42matrix tphi = transpose(dsum(kos5,kos5));
43matrix kos3 = kos[3];
44matrix psi = dsum(kos3,kos3);
45matrix beta1 = random(32002,20,2);
46matrix tbeta1tilde = transpose(psi*beta1);
47matrix tbeta0 = lift(tphi,tbeta1tilde);
48if (not(defined(Ext_R))){ LIB "homolog.lib"; }
49def E = Ext_R(1,kos[4]);
50//->   // dimension of Ext^1:  -1
51matrix kos4 = kos[4];
52matrix tkos4pluskos4 = transpose(dsum(kos4,kos4));
53matrix tgammamin1 = random(32002,20,1);
54matrix tgamma0 = tkos4pluskos4*tgammamin1;
55matrix talpha0 = concat(tbeta0,tgamma0);
56matrix zero[20][1];
57matrix tpsi = transpose(psi);
58matrix tpresg = concat(tpsi,zero);
59matrix pres = module(transpose(talpha0))
60                + module(transpose(tpresg));
61module dir = transpose(pres);
62dir = prune(dir);
63homog(dir); 
64//->   1
65intvec deg_dir = attrib(dir,"isHomog");
66attrib(dir,"isHomog",deg_dir-2);        // set degrees
67resolution fdir = mres(prune(dir),2);
68ideal I = groebner(flatten(fdir[2]));
69resolution FI = mres(I,0);
70
71if (not(defined(sheafCoh))){ LIB "sheafcoh.lib"; }
72module F = FI[2];
73def 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
85kill S,B,deg_dir;
86//======================= Example A.5 ===========================
87//=============== Example 4.13 (continued) ======================
88ring S = 32003, x(0..4), dp;
89module MI=maxideal(1);
90attrib(MI,"isHomog",intvec(-1)); 
91resolution kos = nres(MI,0);
92matrix alpha0 = random(32002,10,3);
93module pres = module(alpha0)+kos[3];
94attrib(pres,"isHomog",intvec(1,1,1,1,1,1,1,1,1,1));
95resolution fcokernel = mres(pres,0);
96module dir = transpose(pres);
97intvec w = -1,-1,-1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2;
98attrib(dir,"isHomog",w);
99resolution fdir = mres(dir,2);
100if (not(defined(flatten))){ LIB "matrix.lib"; }
101ideal I = groebner(flatten(fdir[2]));
102resolution FI = mres(I,0);
103
104if (not(defined(sheafCohBGG))){ LIB "sheafcoh.lib"; }
105module F = FI[2];
106def 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
117tst_status(1);$
Note: See TracBrowser for help on using the repository browser.