source: git/Singular/LIB/gkdim.lib @ 0dd77c2

spielwiese
Last change on this file since 0dd77c2 was fffc51, checked in by Hans Schönemann <hannes@…>, 14 years ago
*hannes: use dim for GKdim git-svn-id: file:///usr/local/Singular/svn/trunk@12235 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 2.5 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      d=dim(M);
64    }
65    else
66    {
67      ERROR("The input must be an ideal, a module or a matrix.");
68    }
69  }
70  return (d);
71}
72example
73{
74  "EXAMPLE:";echo=2;
75  ring R = 0,(x,y,z),Dp;
76  matrix C[3][3]=0,1,1,0,0,-1,0,0,0;
77  matrix D[3][3]=0,0,0,0,0,x;
78  def r = nc_algebra(C,D); setring r;
79  r;
80  ideal I=x;
81  GKdim(I);
82  ideal J=x2,y;
83  GKdim(J);
84  module M=[x2,y,1],[x,y2,0];
85  GKdim(M);
86  ideal A = x,y,z;
87  GKdim(A);
88  ideal B = 1;
89  GKdim(B);
90  GKdim(ideal(0)) == nvars(basering);  // should be true, i.e., evaluated to 1
91}
92///////////////////////////////////////////////////////////////////////////////
93proc gkdim(list L)
94{
95  return(GKdim(L));
96}
97///////////////////////////////////////////////////////////////////////////////
Note: See TracBrowser for help on using the repository browser.