1 | /////////////////////////////////////////////////////////////////////////////// |
---|
2 | version="$Id: gkdim.lib,v 1.9 2005-05-09 10:38:58 levandov Exp $"; |
---|
3 | category="Noncommutative"; |
---|
4 | info=" |
---|
5 | LIBRARY: GKdim.lib Procedures for calculating the Gelfand-Kirillov dimension |
---|
6 | AUTHORS: Lobillo, F.J., jlobillo@ugr.es |
---|
7 | @* Rabelo, C., crabelo@ugr.es |
---|
8 | |
---|
9 | SUPPORT: 'Metodos algebraicos y efectivos en grupos cuanticos', BFM2001-3141, MCYT, Jose Gomez-Torrecillas (Main researcher). |
---|
10 | |
---|
11 | PROCEDURES: |
---|
12 | GKdim(M); Gelfand-Kirillov dimension computation of the factor-module, whose presentation is given by the matrix M. |
---|
13 | "; |
---|
14 | |
---|
15 | /////////////////////////////////////////////////////////////////////////////////// |
---|
16 | static proc idGKdim(ideal I) |
---|
17 | "USAGE: GKdim(I), I is a left ideal |
---|
18 | RETURN: int, the Gelfand-Kirillov dimension of the R/I |
---|
19 | NOTE: 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 | int i; |
---|
27 | for (i=1; i<=size(I); i++) |
---|
28 | { |
---|
29 | I[i]=leadmonom(I[i]); |
---|
30 | } |
---|
31 | |
---|
32 | def oldring=basering; |
---|
33 | string newringstring="ring newring=("+charstr(basering)+"),("+varstr(basering)+"),("+ordstr(basering)+");"; |
---|
34 | execute (newringstring); |
---|
35 | setring newring; |
---|
36 | ideal J = imap(oldring,I); |
---|
37 | ideal sJ = std(J); |
---|
38 | int d = dim(sJ); |
---|
39 | setring oldring; |
---|
40 | // if (d==-1) {d++;} // The GK-dimension of a finite dimensional module is zero |
---|
41 | // levandov: but for consistency, GKdim(std(1)) == -1, |
---|
42 | // mimicking the behaviour of dim() procedure. |
---|
43 | return (d); |
---|
44 | } |
---|
45 | |
---|
46 | /////////////////////////////////////////////////////////////////////////////// |
---|
47 | proc GKdim(list L) |
---|
48 | "USAGE: GKdim(L); L is a left ideal/module/matrix |
---|
49 | RETURN: int |
---|
50 | PURPOSE: compute the Gelfand-Kirillov dimension of the factor-module, whose presentation is given by L |
---|
51 | NOTE: if the factor-module is zero, -1 is returned |
---|
52 | EXAMPLE: example GKdim; shows examples |
---|
53 | " |
---|
54 | { |
---|
55 | def M = L[1]; |
---|
56 | if (typeof(M)=="ideal") |
---|
57 | { |
---|
58 | int d=idGKdim(M); |
---|
59 | } |
---|
60 | else |
---|
61 | { |
---|
62 | if (typeof(M)=="matrix") |
---|
63 | { |
---|
64 | module N = module(M); |
---|
65 | kill M; |
---|
66 | module M = N; |
---|
67 | } |
---|
68 | if (typeof(M)=="module") |
---|
69 | { |
---|
70 | if (attrib(M,"isSB")<>1) |
---|
71 | { |
---|
72 | M=std(M); |
---|
73 | } |
---|
74 | int d = -1; |
---|
75 | int n = ncols(M); // Num of vectors defining M |
---|
76 | int m = nrows(M); // The rank of the free module where M is imbedded |
---|
77 | int i,j; |
---|
78 | for (j=1; j<=n; j++) |
---|
79 | { |
---|
80 | M[j] = leadmonom(M[j]); // Only consider the leader monomial of each vector |
---|
81 | } |
---|
82 | intmat v[1][m]; // v will be the dimension of each stable subset |
---|
83 | ideal I; |
---|
84 | for (i=1; i<=m; i++) |
---|
85 | { |
---|
86 | I=0; |
---|
87 | for (j=1; j<=n; j++) |
---|
88 | { // Extract each row like an ideal .LV: ???? |
---|
89 | I=I, M[i,j]; |
---|
90 | } |
---|
91 | v[1,i] = idGKdim(I); |
---|
92 | if (v[1,i]>d) { d = v[1,i]; } |
---|
93 | } |
---|
94 | } |
---|
95 | else |
---|
96 | { |
---|
97 | string d="Error: The input must be an ideal, a module or a matrix."; |
---|
98 | } |
---|
99 | } |
---|
100 | return (d); |
---|
101 | } |
---|
102 | example |
---|
103 | { |
---|
104 | "EXAMPLE:";echo=2; |
---|
105 | ring r = 0,(x,y,z),Dp; |
---|
106 | matrix C[3][3]=0,1,1,0,0,-1,0,0,0; |
---|
107 | matrix D[3][3]=0,0,0,0,0,x; |
---|
108 | ncalgebra(C,D); |
---|
109 | r; |
---|
110 | ideal I=x; |
---|
111 | GKdim(I); |
---|
112 | ideal J=x2,y; |
---|
113 | GKdim(J); |
---|
114 | module M=[x2,y,1],[x,y2,0]; |
---|
115 | GKdim(M); |
---|
116 | ideal A = x,y,z; |
---|
117 | GKdim(A); |
---|
118 | ideal B = 1; |
---|
119 | GKdim(B); |
---|
120 | } |
---|
121 | /////////////////////////////////////////////////////////////////////////////// |
---|
122 | proc gkdim(list L) |
---|
123 | { |
---|
124 | return(GKdim(L)); |
---|
125 | } |
---|
126 | /////////////////////////////////////////////////////////////////////////////// |
---|