source: git/Tst/BuchDL/sol_3_4.lib @ 64daec

spielwiese
Last change on this file since 64daec 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: 1.5 KB
Line 
1version = "1.0";
2info = "solution to Exercise 3.4";
3//
4LIB "matrix.lib";
5//
6proc ker_Mod (matrix alp, module phi,psi)
7"USAGE:   ker_Mod(alp,phi,psi);   alp matrix, phi,psi modules
8RETURN:  module
9NOTE:    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.
12EXAMPLE: example ker_Mod; shows an example
13"
14{
15  module A = modulo(alp,psi);
16  module B = modulo(A,phi);
17  return(B);
18}
19example
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
28proc Ext_Mod (int i, module phi,psi)
29"USAGE:   Ext_Mod(i,phi,psi);    i int, phi,psi modules
30RETURN:  module
31NOTE:    The generators for the output module are the columns of a
32         presentation matrix for Ext^i(coker(phi),coker(psi)).
33EXAMPLE: 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}
50example
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}
Note: See TracBrowser for help on using the repository browser.