source: git/Singular/LIB/ncdecomp.lib @ 238c959

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