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

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