source: git/Singular/LIB/ncdecomp.lib @ 3c4dcc

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