1 | version = "1.0"; |
---|
2 | info = "solution to Exercise 3.4"; |
---|
3 | // |
---|
4 | LIB "matrix.lib"; |
---|
5 | // |
---|
6 | proc ker_Mod (matrix alp, module phi,psi) |
---|
7 | "USAGE: ker_Mod(alp,phi,psi); alp matrix, phi,psi modules |
---|
8 | RETURN: module |
---|
9 | NOTE: The generators for the output module are the columns of a |
---|
10 | presentation matrix for the kernel of the homomorphism |
---|
11 | coker(phi)->coker(psi) induced by alp. |
---|
12 | EXAMPLE: example ker_Mod; shows an example |
---|
13 | " |
---|
14 | { |
---|
15 | module A = modulo(alp,psi); |
---|
16 | module B = modulo(A,phi); |
---|
17 | return(B); |
---|
18 | } |
---|
19 | example |
---|
20 | { "EXAMPLE:"; echo = 2; |
---|
21 | ring R = 0, (x,y,z), dp; |
---|
22 | module phi = [y3,-xy2]; |
---|
23 | module psi = [0,y,0],[0,0,z]; |
---|
24 | module alp = [x+xy,z,0],[y+y2,xyz,z]; |
---|
25 | print(ker_Mod(alp,phi,psi)); |
---|
26 | } |
---|
27 | |
---|
28 | proc Ext_Mod (int i, module phi,psi) |
---|
29 | "USAGE: Ext_Mod(i,phi,psi); i int, phi,psi modules |
---|
30 | RETURN: module |
---|
31 | NOTE: The generators for the output module are the columns of a |
---|
32 | presentation matrix for Ext^i(coker(phi),coker(psi)). |
---|
33 | EXAMPLE: example Ext_Mod; shows an example |
---|
34 | " |
---|
35 | { |
---|
36 | if (i<0) {return([1]);} |
---|
37 | def ResPhi = mres(phi,i+1); |
---|
38 | module M1,M2; |
---|
39 | M2 = ResPhi[i+1]; |
---|
40 | if (i==0) {M1 = 0;} else {M1 = ResPhi[i];} |
---|
41 | int row = nrows(psi); |
---|
42 | module a1 = transpose( tensor( diag(1,row), M1 ) ); |
---|
43 | module a2 = transpose( tensor( diag(1,row), M2 ) ); |
---|
44 | module b1 = tensor( psi, diag(1,ncols(M1)) ); |
---|
45 | module b2 = tensor( psi, diag(1,ncols(M2)) ); |
---|
46 | module A = modulo(a2,b2); |
---|
47 | module B = modulo(A,a1+b1); |
---|
48 | return(B); |
---|
49 | } |
---|
50 | example |
---|
51 | { "EXAMPLE:"; echo = 2; |
---|
52 | ring R = 0, (x,y,z), dp; |
---|
53 | module phi,psi = [x2-y3],[x2-y5]; |
---|
54 | print(Ext_Mod(0,phi,psi)); |
---|
55 | print(Ext_Mod(1,phi,psi)); |
---|
56 | } |
---|