source: git/Singular/LIB/ncdecomp.lib @ bc7f20

spielwiese
Last change on this file since bc7f20 was bc7f20, checked in by Viktor Levandovskyy <levandov@…>, 19 years ago
*levandov: unified ideal-list handling for conveniency, minor corrections git-svn-id: file:///usr/local/Singular/svn/trunk@7800 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 9.4 KB
Line 
1///////////////////////////////////////////////////////////////////////////////
2version="$Id: ncdecomp.lib,v 1.7 2005-03-25 18:38: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 of Z.
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, def #)
179"USAGE:  CenCharDec(I, C);  I a module, C an ideal/list of generators of the center;
180PURPOSE: compute a finite central character decomposition (or point out that there is no finite one),
181RETURN:  a list L, where each entry consists of three records:
182@*       L[*][1] ('ideal' type), the central character as the maximal ideal in the center,
183@*       L[*][2] ('module' type), the Groebner basis of the weight module, corresponding to the character,
184@*       L[*][3] ('int' type) is the K-dimension of the weight module (-1 is returned for an infinite dimension);
185NOTE:     some modules have no finite decomposition (in such case one
186          gets warning message)
187SEE ALSO: CentralQuot, CentralSaturation
188EXAMPLE: example CenCharDec; shows examples
189"
190{
191  list Center;
192  if (typeof(#) == "ideal")
193  {
194    int cc;
195    ideal tmp = ideal(#);
196    for (cc=1; cc<=size(tmp); cc++)
197    {
198      Center[cc] = tmp[cc];
199    }
200    kill tmp;
201  }
202  if (typeof(#) == "list")
203  {
204    Center = #;
205  }
206// M = A/I
207//1. Find the Zariski closure of Supp_Z M
208// J = Ann_M 1 == I
209// J \cap Z:
210  option(redSB);
211  option(redTail);
212  option(returnSB);
213  def @A = basering;
214  setring @A;
215  int sZ=size(Center);
216  int i,j;
217  poly t=1;
218  for(i=1; i<=nvars(@A); i++)
219  {
220    t=t*var(i);
221  }
222  ring @Z=0,(@z(1..sZ)),dp;
223//  @Z;
224  def @ZplusA = @A+@Z;
225  setring @ZplusA;
226//  @ZplusA;
227  ideal I     = imap(@A,I);
228  list Center = imap(@A,Center);
229  poly t      = imap(@A,t);
230  ideal @Ker;
231  for(i=1; i<=sZ; i++)
232  {
233    @Ker[i]=@z(i) - Center[i];
234  }
235  @Ker = @Ker,I;
236  ideal @JcapZ = eliminate(@Ker,t);
237// do not forget parameters of a basering!
238  string strZ="ring @@Z=("+charstr(@A)+"),(@z(1.."+string(sZ)+")),dp;";
239//  print(strZ);
240  execute(strZ);
241  setring @@Z;
242  ideal @JcapZ = imap(@ZplusA,@JcapZ);
243  @JcapZ = std(@JcapZ);
244//  @JcapZ;
245  int sJ = vdim(@JcapZ);
246  if (sJ==-1)
247  {
248    "There is no finite decomposition";
249    return(0);
250  }
251//  print(@JcapZ);
252// 2. compute the min.ass.primes of the ideal in the center
253  list @L = minAssGTZ(@JcapZ);
254  int sL = size(@L);
255//  print("etL:");
256//  @L;
257// exception: is sL==1, the whole ideal has unique cen.char
258  if (sL ==1)
259  {
260    setring @A;
261    map @M = @@Z,Center[1..size(Center)];
262    list L = @M(@L);
263    list @R;
264    @R[1] = L[1];
265    if (nrows(@R[1])==1)
266    {
267      @R[1] = ideal(@R[1]);
268    }
269    @R[2] = I;
270    if (nrows(@R[2])==1)
271    {
272      @R[2] = ideal(@R[2]);
273    }
274    @R[2] = std(@R[2]);
275    @R[3] = vdim(@R[2]);
276    return(@R);
277  }
278  list @CharKer;
279  for(i=1; i<=sL; i++)
280  {
281    @L[i] = std(@L[i]);
282  }
283// 3. compute the intersections of characters
284  for(i=1; i<=sL; i++)
285  {
286    @CharKer[i] = CharKernel(@L,i);
287  }
288//  print("Charker:");
289//  @CharKer;
290// 4. Go back to the algebra and compute central saturations
291  setring @A;
292  map @M = @@Z,Center[1..size(Center)];
293  list L = @M(@CharKer);
294  list R,@R;
295  for(i=1; i<=sL; i++)
296  {
297    @R[1] = L[i];
298    if (nrows(@R[1])==1)
299    {
300      @R[1] = ideal(@R[1]);
301    }
302    @R[2] = CentralSaturation(I,L[i]);
303    if (nrows(@R[2])==1)
304    {
305      @R[2] = ideal(@R[2]);
306    }
307    @R[2] = std(@R[2]);
308    @R[3] = vdim(@R[2]);
309     R[i] = @R;
310  }
311  return(R);
312}
313example
314{ "EXAMPLE:"; echo = 2;
315   option(returnSB);
316   def a = sl2(); // U(sl_2) in characteristic 0
317   setring a;
318   ideal I = e3,f3,h3-4*h;
319   I = twostd(I);           // two-sided ideal generated by I
320   vdim(I);                 // it is finite-dimensional
321   list Cn = 4*e*f+h^2-2*h; // the only central element
322   list T = CenCharDec(I,Cn);
323   T;
324}
325///////////////////////////////////////////////////////////////////////////////
326proc IntersectWithSub (ideal M, def #)
327"USAGE:  IntersectWithSub(M,Z),  M an ideal, Z an ideal/list of pairwise commutative elements
328PURPOSE: computes an intersection of M with the subalgebra, generated by Z
329RETURN:  ideal (of two--sided generators, not a Groebner basis!)
330NOTE:    usually one puts generators of the center into Z
331EXAMPLE: example IntersectWithSub; shows an example
332"
333{
334  ideal Z;
335  if (typeof(#) == "list")
336  {
337    int cc;
338    list tmp = #;
339    for (cc=1; cc<=size(tmp); cc++)
340    {
341      Z[cc] = tmp[cc];
342    }
343    kill tmp;
344  }
345  if (typeof(#) == "ideal")
346  {
347    Z = #;
348  }
349  // returns a submodule of M, equal to M \cap Z
350  // correctness: Z should consists of pairwise
351  // commutative elements
352  int nz = size(Z);
353  int i,j;
354  poly p;
355  for (i=1; i<nz; i++)
356  {
357    for (j=i+1; j<=nz; j++)
358    {
359      p = bracket(Z[i],Z[j]);
360      if (p!=0)
361      {
362        "Error: generators of the subalgebra do not commute.";
363        return(ideal(0));
364      }
365    }
366  }
367  // main action
368  def B = basering;
369  setring B;
370  string s1,s2;
371  s1 = "ring @Z = (";
372  s2 = s1 + charstr(basering) + "),(z(1.." + string(nz)+")),Dp";
373  //  s2;
374  execute(s2);
375  setring B;
376  map F = @Z,Z;
377  setring @Z;
378  ideal PreM = preimage(B,F,M);
379  PreM = std(PreM);
380  setring B;
381  ideal T = F(PreM);
382  return(T);
383}
384example
385{
386  "EXAMPLE:"; echo = 2;
387  ring r=(0,a),(e,f,h),Dp;
388  matrix @d[3][3];
389  @d[1,2]=-h;
390  @d[1,3]=2e;
391  @d[2,3]=-2f;
392  ncalgebra(1,@d); // parametric U(sl_2)
393  ideal I = e,h-a;
394  ideal C;
395  C[1] = h^2-2*h+4*e*f; // the center of U(sl_2)
396  ideal X = IntersectWithSub(I,C);
397  X;
398  ideal G = e*f, h; // the biggest comm. subalgebra of U(sl_2)
399  ideal Y = IntersectWithSub(I,G);
400  Y;
401}
Note: See TracBrowser for help on using the repository browser.