source: git/Singular/LIB/gkdim.lib @ 341696

spielwiese
Last change on this file since 341696 was 341696, checked in by Hans Schönemann <hannes@…>, 14 years ago
Adding Id property to all files git-svn-id: file:///usr/local/Singular/svn/trunk@12231 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 3.1 KB
Line 
1///////////////////////////////////////////////////////////////////////////////
2version="$Id$";
3category="Noncommutative";
4info="
5LIBRARY: gkdim.lib     Procedures for calculating the Gelfand-Kirillov dimension
6AUTHORS: Lobillo, F.J.,     jlobillo@ugr.es
7@*         Rabelo, C.,        crabelo@ugr.es
8
9SUPPORT: 'Metodos algebraicos y efectivos en grupos cuanticos', BFM2001-3141, MCYT, Jose Gomez-Torrecillas (Main researcher).
10
11PROCEDURES:
12  GKdim(M);        Gelfand-Kirillov dimension computation of the factor-module, whose presentation is given by the matrix M.
13";
14
15///////////////////////////////////////////////////////////////////////////////////
16static proc idGKdim(ideal I)
17"USAGE:   idGKdim(I), I is a left ideal
18RETURN:  int, the Gelfand-Kirillov dimension of the R/I
19NOTE: uses the dim procedure, if the factor-module is zero, -1 is returned
20"
21{
22  if (attrib(I,"isSB")<>1)
23  {
24    I=std(I);
25  }
26
27  int d    = dim(I);
28  //  if (d==-1) {d++;} // The GK-dimension of a finite dimensional module is zero
29  // levandov: but for consistency, GKdim(std(1)) == -1,
30  //           mimicking the behaviour of dim() procedure.
31  return (d);
32}
33
34///////////////////////////////////////////////////////////////////////////////
35proc GKdim(list L)
36"USAGE:   GKdim(L);   L is a left ideal/module/matrix
37RETURN:  int
38PURPOSE: compute the Gelfand-Kirillov dimension of the factor-module, whose presentation is given by L, e.g. R^r/L
39NOTE:  if the factor-module is zero, -1 is returned
40EXAMPLE: example GKdim; shows examples
41"
42{
43  def M = L[1];
44  int d = -1;
45  if (typeof(M)=="ideal")
46  {
47    d=idGKdim(M);
48  }
49  else
50  {
51    if (typeof(M)=="matrix")
52    {
53      module N = module(M);
54      kill M;
55      module M = N;
56    }
57    if (typeof(M)=="module")
58    {
59      if (attrib(M,"isSB")<>1)
60      {
61        M=std(M);
62      }
63      int n = ncols(M); // Num of vectors defining M
64      int m = nrows(M); // The rank of the free module where M is imbedded
65      int i,j;
66      for (j=1; j<=n; j++)
67      {
68        M[j] = leadmonom(M[j]); // Only consider the leader monomial of each vector
69      }
70      intmat v[1][m]; // v will be the dimension of each stable subset
71      ideal I;
72      for (i=1; i<=m; i++)
73      {
74        I=0;
75        for (j=1; j<=n; j++)
76        { // Extract each row like an ideal .LV: ????
77          I=I, M[i,j];
78        }
79        v[1,i] = idGKdim(I);
80        if (v[1,i]>d) { d = v[1,i]; }
81      }
82    }
83    else
84    {
85      ERROR("The input must be an ideal, a module or a matrix.");
86    }
87  }
88  return (d);
89}
90example
91{
92  "EXAMPLE:";echo=2;
93  ring R = 0,(x,y,z),Dp;
94  matrix C[3][3]=0,1,1,0,0,-1,0,0,0;
95  matrix D[3][3]=0,0,0,0,0,x;
96  def r = nc_algebra(C,D); setring r;
97  r;
98  ideal I=x;
99  GKdim(I);
100  ideal J=x2,y;
101  GKdim(J);
102  module M=[x2,y,1],[x,y2,0];
103  GKdim(M);
104  ideal A = x,y,z;
105  GKdim(A);
106  ideal B = 1;
107  GKdim(B);
108  GKdim(ideal(0)) == nvars(basering);  // should be true, i.e., evaluated to 1
109}
110///////////////////////////////////////////////////////////////////////////////
111proc gkdim(list L)
112{
113  return(GKdim(L));
114}
115///////////////////////////////////////////////////////////////////////////////
Note: See TracBrowser for help on using the repository browser.