source: git/Singular/LIB/ncdecomp.lib @ 91c978

spielwiese
Last change on this file since 91c978 was 91c978, checked in by Viktor Levandovskyy <levandov@…>, 19 years ago
*levandov: makeup things for the documentation together with minor fixes in code and English git-svn-id: file:///usr/local/Singular/svn/trunk@7758 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 8.8 KB
Line 
1///////////////////////////////////////////////////////////////////////////////
2version="$Id: ncdecomp.lib,v 1.6 2005-02-23 18:10:46 levandov Exp $";
3category="Noncommutative";
4info="
5LIBRARY:  ncdecomp.lib      Central character decomposition of a module
6AUTHORS:  Viktor Levandovskyy,     levandov@mathematik.uni-kl.de.
7
8OVERVIEW:
9This library presents algorithms for the  central character
10decomposition of a module (in other words, a
11decomposition into generalized weight modules with respect to the center).
12Based on ideas of O. Khomenko and V. Levandovskyy.
13
14PROCEDURES:
15CentralQuot(I,G);       central quotient I:G,
16CentralSaturation(M,T); central saturation ((M:T):...):T) ( = M:T^{\infty}),
17CenCharDec(I,C);        central character decomposition of I w.r.t. C
18IntersectWithSub(M,Z);  intersection of M with the subalgebra, generated
19by pairwise commutative elements.
20";
21
22  LIB "ncalg.lib";
23  LIB "primdec.lib";
24///////////////////////////////////////////////////////////////////////////////
25static proc CharKernel(list L, int i)
26{
27// compute \cup L[j], j!=i
28  int sL = size(L);
29  if ( (i<=0) || (i>sL))  { return(0); }
30  int j;
31  list Li;
32  if (i ==1 )
33  {
34    Li = L[2..sL];
35  }
36  if (i ==sL )
37  {
38    Li = L[1..sL-1];
39  }
40  if ( (i>1) && (i < sL))
41  {
42    Li = L[1..i-1];
43    for (j=i+1; j<=sL; j++)
44    {
45      Li[j-1] = L[j];
46    }
47  }
48//  print("intersecting kernels...");
49  module Cres = intersect(Li[1..size(Li)]);
50  return(Cres);
51}
52///////////////////////////////////////////////////////////////////////////////
53static proc CentralQuotPoly(module M, poly g)
54{
55// here an elimination of components should be used !
56  int N=nrows(M); // M = A^N /I_M
57  module @M;
58  int i,j;
59  for(i=1; i<=N; i++)
60  {
61   @M=@M,g*gen(i);
62  }
63  @M = simplify(@M,2);
64  @M = @M,M;
65  module S = syz(@M);
66  matrix s = S;
67  module T;
68  vector t;
69  for(i=1; i<=ncols(s); i++)
70  {
71    t = 0*gen(N);
72    for(j=1; j<=N; j++)
73    {
74      t = t + s[j,i]*gen(j);
75    }
76    T[i] = t;
77  }
78  T = simplify(T,2);
79  return(T);
80}
81///////////////////////////////////////////////////////////////////////////////
82static proc MyIsEqual(module A, module B)
83{
84// both A and B are submodules of free module
85  option(redSB);
86  option(redTail);
87  if (attrib(A,"isSB")!=1)
88  {
89    A = std(A);
90  }
91  if (attrib(B,"isSB")!=1)
92  {
93    B = std(B);
94  }
95  int ANSWER = 1;
96  if ( ( ncols(A) == ncols(B) ) && ( nrows(A) == nrows(B) ) )
97  {
98    module @AB = A-B;
99    @AB = simplify(@AB,2);
100    if (@AB[1]!=0) { ANSWER = 0; }
101  }
102  else { ANSWER = 0; }
103  return(ANSWER);
104}
105///////////////////////////////////////////////////////////////////////////////
106proc CentralQuot(module I, ideal G)
107"USAGE:  CentralQuot(M, T), for a module M and an ideal T,
108RETURN:  module of the central quotient I:G,
109NOTE:    the output module is not necessarily a Groebner basis,
110SEE ALSO: CentralSaturation, CenCharDec
111EXAMPLE: example CentralQuot; shows examples
112"{
113  int i;
114  list @L;
115  for(i=1; i<=size(G); i++)
116  {
117    @L[i] = CentralQuotPoly(I,G[i]);
118  }
119  module @I = intersect(@L[1..size(G)]);
120  if (nrows(@I)==1)
121  {
122    @I = ideal(@I);
123  }
124  return(@I);
125}
126example
127{ "EXAMPLE:"; echo = 2;
128   option(returnSB);
129   def a = sl2();
130   setring a;
131   ideal I = e3,f3,h3-4*h;
132   I = std(I);
133   poly C=4*e*f+h^2-2*h;
134   ideal G = (C-8)*(C-24);
135   ideal R = CentralQuot(I,G);
136   R;
137}
138///////////////////////////////////////////////////////////////////////////////
139proc CentralSaturation(module M, ideal T)
140"USAGE:  CentralSaturation(M, T), for a module M and an ideal T,
141RETURN:  module of the central saturation of M by T (also denoted by M:T^{\infty}),
142NOTE:    the output module is not necessarily a Groebner basis,
143SEE ALSO: CentralQuot, CenCharDec
144EXAMPLE: example CentralSaturation; shows examples
145"{
146  option(redSB);
147  option(redTail);
148  option(returnSB);
149  module Q=0;
150  module S=M;
151  while ( !MyIsEqual(Q,S) )
152  {
153    Q = CentralQuot(S, T);
154    S = CentralQuot(Q, T);
155  }
156  if (nrows(Q)==1)
157  {
158    Q = ideal(Q);
159  }
160//  Q = std(Q);
161  return(Q);
162}
163example
164{ "EXAMPLE:"; echo = 2;
165   option(returnSB);
166   def a = sl2();
167   setring a;
168   ideal I = e3,f3,h3-4*h;
169   I = std(I);
170   poly C=4*e*f+h^2-2*h;
171   ideal G = C*(C-8);
172   ideal R = CentralSaturation(I,G);
173   R=std(R);
174   vdim(R);
175   R;
176}
177///////////////////////////////////////////////////////////////////////////////
178proc CenCharDec(module I, list Center)
179"USAGE:  CenCharDec(I, C);  I a module, C a list of generators of the center;
180RETURN:  a list L, where each entry consists of three records:
181@*           L[*][1] is the central character in terms of central elements,
182@*           L[*][2] is the Groebner basis of the corresponding weight module,
183@*           L[*][3] is the K-dimension of the weight module;
184NOTE:     some modules have no finite decomposition (in such case one
185          gets warning message)
186SEE ALSO: CentralQuot, CentralSaturation
187EXAMPLE: example CenCharDec; shows examples
188"
189{
190// M = A/I
191//1. Find the Zariski closure of Supp_Z M
192// J = Ann_M 1 == I
193// J \cap Z:
194  option(redSB);
195  option(redTail);
196  option(returnSB);
197  def @A = basering;
198  setring @A;
199  int sZ=size(Center);
200  int i,j;
201  poly t=1;
202  for(i=1; i<=nvars(@A); i++)
203  {
204    t=t*var(i);
205  }
206  ring @Z=0,(@z(1..sZ)),dp;
207//  @Z;
208  def @ZplusA = @A+@Z;
209  setring @ZplusA;
210//  @ZplusA;
211  ideal I     = imap(@A,I);
212  list Center = imap(@A,Center);
213  poly t      = imap(@A,t);
214  ideal @Ker;
215  for(i=1; i<=sZ; i++)
216  {
217    @Ker[i]=@z(i) - Center[i];
218  }
219  @Ker = @Ker,I;
220  ideal @JcapZ = eliminate(@Ker,t);
221// do not forget parameters of a basering!
222  string strZ="ring @@Z=("+charstr(@A)+"),(@z(1.."+string(sZ)+")),dp;";
223//  print(strZ);
224  execute(strZ);
225  setring @@Z;
226  ideal @JcapZ = imap(@ZplusA,@JcapZ);
227  @JcapZ = std(@JcapZ);
228//  @JcapZ;
229  int sJ = vdim(@JcapZ);
230  if (sJ==-1)
231  {
232    "There is no finite decomposition";
233    return(0);
234  }
235//  print(@JcapZ);
236// 2. compute the min.ass.primes of the ideal in the center
237  list @L = minAssGTZ(@JcapZ);
238  int sL = size(@L);
239//  print("etL:");
240//  @L;
241// exception: is sL==1, the whole ideal has unique cen.char
242  if (sL ==1)
243  {
244    setring @A;
245    map @M = @@Z,Center[1..size(Center)];
246    list L = @M(@L);
247    list @R;
248    @R[1] = L[1];
249    if (nrows(@R[1])==1)
250    {
251      @R[1] = ideal(@R[1]);
252    }
253    @R[2] = I;
254    if (nrows(@R[2])==1)
255    {
256      @R[2] = ideal(@R[2]);
257    }
258    @R[2] = std(@R[2]);
259    @R[3] = vdim(@R[2]);
260    return(@R);
261  }
262  list @CharKer;
263  for(i=1; i<=sL; i++)
264  {
265    @L[i] = std(@L[i]);
266  }
267// 3. compute the intersections of characters
268  for(i=1; i<=sL; i++)
269  {
270    @CharKer[i] = CharKernel(@L,i);
271  }
272//  print("Charker:");
273//  @CharKer;
274// 4. Go back to the algebra and compute central saturations
275  setring @A;
276  map @M = @@Z,Center[1..size(Center)];
277  list L = @M(@CharKer);
278  list R,@R;
279  for(i=1; i<=sL; i++)
280  {
281    @R[1] = L[i];
282    if (nrows(@R[1])==1)
283    {
284      @R[1] = ideal(@R[1]);
285    }
286    @R[2] = CentralSaturation(I,L[i]);
287    if (nrows(@R[2])==1)
288    {
289      @R[2] = ideal(@R[2]);
290    }
291    @R[2] = std(@R[2]);
292    @R[3] = vdim(@R[2]);
293     R[i] = @R;
294  }
295  return(R);
296}
297example
298{ "EXAMPLE:"; echo = 2;
299   option(returnSB);
300   def a = sl2(); // U(sl_2) in characteristic 0
301   setring a;
302   ideal I = e3,f3,h3-4*h;
303   I = twostd(I);           // two-sided ideal generated by I
304   vdim(I);                 // it is finite-dimensional
305   list Cn = 4*e*f+h^2-2*h; // the only central element
306   list T = CenCharDec(I,Cn);
307   T;
308}
309///////////////////////////////////////////////////////////////////////////////
310proc IntersectWithSub (ideal M, ideal Z)
311"USAGE:  IntersectWithSub(M,Z),  M an ideal, Z an ideal of pairwise commutative elements
312PURPOSE: computes an intersection of M with the subalgebra, generated by Z
313RETURN:  ideal (of two--sided generators, not a Groebner basis!)
314NOTE:    usually one puts generators of the center into Z
315EXAMPLE: example IntersectWithSub; shows an example
316"
317{
318  // returns a submodule of M, equal to M \cap Z
319  // correctness: Z should consists of pairwise
320  // commutative elements
321  int nz = size(Z);
322  int i,j;
323  poly p;
324  for (i=1; i<nz; i++)
325  {
326    for (j=i+1; j<=nz; j++)
327    {
328      p = bracket(Z[i],Z[j]);
329      if (p!=0)
330      {
331        "Error: generators of the subalgebra do not commute.";
332        return(ideal(0));
333      }
334    }
335  }
336  // main action
337  def B = basering;
338  setring B;
339  string s1,s2;
340  s1 = "ring @Z = (";
341  s2 = s1 + charstr(basering) + "),(z(1.." + string(nz)+")),Dp";
342  //  s2;
343  execute(s2);
344  setring B;
345  map F = @Z,Z;
346  setring @Z;
347  ideal PreM = preimage(B,F,M);
348  PreM = std(PreM);
349  setring B;
350  ideal T = F(PreM);
351  return(T);
352}
353example
354{
355  "EXAMPLE:"; echo = 2;
356  ring r=(0,a),(e,f,h),Dp;
357  matrix @d[3][3];
358  @d[1,2]=-h;
359  @d[1,3]=2e;
360  @d[2,3]=-2f;
361  ncalgebra(1,@d); // parametric U(sl_2)
362  ideal I = e,h-a;
363  ideal C;
364  C[1] = h^2-2*h+4*e*f; // the center of U(sl_2)
365  ideal X = IntersectWithSub(I,C);
366  X;
367  ideal G = e*f, h; // the biggest comm. subalgebra of U(sl_2)
368  ideal Y = IntersectWithSub(I,G);
369  Y;
370}
Note: See TracBrowser for help on using the repository browser.