source: git/Singular/LIB/involut.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: 20.2 KB
Line 
1version="$Id: involut.lib,v 1.2 2005-02-23 18:10:45 levandov Exp $";
2category="Noncommutative";
3info="
4LIBRARY:  involution.lib  Procedures for Computations and Operations with Involutions
5AUTHORS:  Oleksandr Iena,       yena@mathematik.uni-kl.de,
6@*        Markus Becker,        mbecker@mathematik.uni-kl.de,
7@*        Viktor Levandovskyy,  levandov@mathematik.uni-kl.de
8
9SUPPORT: Forschungsschwerpunkt 'Mathematik und Praxis' (Project of Dr. E. Zerz
10and V. Levandovskyy), Uni Kaiserslautern
11
12NOTE: This library provides algebraic tools for computations and operations
13with algebraic involutions and linear automorphisms of noncommutative algebras
14
15PROCEDURES:
16find_invo();          describes a variety of linear involutions on a basering;
17find_invo_diag();     describes a variety of homothetic (diagonal) involutions on a basering;
18find_auto();          describes a variety of linear automorphisms of a basering;
19ncdetection(ring r);  computes an ideal, presenting an involution map on some classical noncommutative algebras;
20involution(m, map theta);  applies the involution, presented by theta, to the object m =
21";
22
23LIB "ncalg.lib";
24LIB "poly.lib";
25LIB "primdec.lib";
26///////////////////////////////////////////////////////////////////////////////
27proc ncdetection(def r)
28"USAGE:  ncdetection(r), r a ring
29RETURN:  ideal, presenting an involution map on a noncommutative algebra r
30NOTE:    returns optimized involutions for some classical noncomm algebras,
31arising in the Control Theory, namely algebras with
32differential, shift or advance operators
33EXAMPLE: example ncdetection; shows an example
34"
35{
36// in this procedure an involution map is generated from the NCRelations
37// that will be used in the function involution
38// in dieser proc. wird eine matrix erzeugt, die in der i-ten zeile die indices
39// der differential-, shift- oder advance-operatoren enthaelt mit denen die i-te
40// variable nicht kommutiert.
41  int i,j,k,LExp;
42  int NVars  = nvars(r);
43  matrix rel = NCRelations(r)[2];
44  intmat M[NVars][3];
45  int NRows = nrows(rel);
46  intvec v,w;
47  poly d,d_lead;
48  ideal I;
49  map theta;
50  for( j=NRows; j>=2; j-- )
51  {
52   if( rel[j] == w )       //the whole column is zero
53    {
54      j--;
55      continue;
56    }
57    for( i=1; i<j; i++ )         
58    {
59      if( rel[i,j]==1 )        //relation of type var(j)*var(i) = var(i)*var(j) +1
60      {
61         M[i,1]=j;
62      }
63      if( rel[i,j] == -1 )    //relation of type var(i)*var(j) = var(j)*var(i) -1
64      {
65        M[j,1]=i;
66      }
67      d = rel[i,j];
68      d_lead = lead(d);
69      v = leadexp(d_lead); //in the next lines we check wether we have a  relation of differential or shift type
70      LExp=0;
71      for(k=1; k<=NVars; k++)
72      {
73        LExp = LExp + v[k];
74      }
75      //      if( (d-d_lead != 0) || (LExp > 1) )
76if ( ( (d-d_lead) != 0) || (LExp > 1) || ( (LExp==0) && ((d_lead>1) || (d_lead<-1)) ) )
77      {
78        return(theta);
79      }
80
81      if( v[j] == 1)                   //relation of type var(j)*var(i) = var(i)*var(j) -lambda*var(j)
82      {
83        if (leadcoef(d) < 0)
84        {
85          M[i,2] = j;
86        }
87        else
88        {
89          M[i,3] = j;
90        }
91      }
92      if( v[i]==1 )                    //relation of type var(j)*var(i) = var(i)*var(j) -lambda*var(i)
93      {
94        if (leadcoef(d) > 0)
95        {
96          M[j,2] = i;
97        }
98        else
99        {
100          M[j,3] = i;
101        }
102      }
103    }
104  }
105  // from here on, the map is computed
106  for(i=1;i<=NVars;i++)
107  {
108    I=I+var(i);
109  }
110
111  for(i=1;i<=NVars;i++)
112  {
113    if( M[i,1..3]==(0,0,0) )
114    {
115      i++;
116      continue;
117    }
118    if( M[i,1]!=0 )
119    {
120      if( (M[i,2]!=0) && (M[i,3]!=0) )
121      {
122        I[M[i,1]] = -var(M[i,1]);
123        I[M[i,2]] = var(M[i,3]);
124        I[M[i,3]] = var(M[i,2]);
125      }
126      if( (M[i,2]==0) && (M[i,3]==0) )
127      {
128        I[M[i,1]] = -var(M[i,1]);
129      }                 
130      if( ( (M[i,2]!=0) && (M[i,3]==0) )|| ( (M[i,2]!=0) && (M[i,3]==0) )
131)
132      {
133        I[i] = -var(i);
134      }
135    }
136    else
137    {
138      if( (M[i,2]!=0) && (M[i,3]!=0) )
139      {
140        I[i] = -var(i);
141        I[M[i,2]] = var(M[i,3]);
142        I[M[i,3]] = var(M[i,2]);
143      }
144      else
145      {
146        I[i] = -var(i);
147      }
148    }
149  }
150  return(I);
151}
152example
153{
154  "EXAMPLE:"; echo = 2;
155  ring r=0,(x,y,z,D(1..3)),dp;
156  matrix D[6][6];
157  D[1,4]=1; D[2,5]=1;  D[3,6]=1;
158  ncalgebra(1,D);
159  ncdetection(r);
160  kill r;
161  //----------------------------------------
162  ring r=0,(x,S),dp;
163  ncalgebra(1,-S);
164  ncdetection(r);
165  kill r;
166  //----------------------------------------
167  ring r=0,(x,D(1),S),dp;
168  matrix D[3][3];
169  D[1,2]=1;  D[1,3]=-S;
170  ncalgebra(1,D);
171  ncdetection(r);
172}
173
174static proc In_Poly(poly mm, list l, int NVars)
175// applies the involution to the poly mm
176// entries of a list l are images of variables under invo
177// more general than invo_poly; used in many rings setting
178{
179  int i,j;
180  intvec v;
181  poly pp, zz;
182  poly nn = 0;
183  i = 1;
184  while(mm[i]!=0)
185  {
186    v  = leadexp(mm[i]);
187    zz = 1;
188    for( j=NVars; j>=1; j--)
189    {
190      if (v[j]!=0)
191      {
192        pp = l[j];
193        zz = zz*(pp^v[j]);
194      }
195    }   
196    nn = nn + (leadcoef(mm[i])*zz);
197    i++; 
198  }
199  return(nn);
200}
201
202static proc Hom_Poly(poly mm, list l, int NVars)
203// applies the endomorphism to the poly mm
204// entries of a list l are images of variables under endo
205// should not be replaced by map-based stuff! used in
206// many rings setting
207{
208  int i,j;
209  intvec v;
210  poly pp, zz;
211  poly nn = 0;
212  i = 1;
213  while(mm[i]!=0)
214  {
215    v  = leadexp(mm[i]);
216    zz = 1;
217    for( j=NVars; j>=1; j--)
218    {
219      if (v[j]!=0)
220      {
221        pp = l[j];
222        zz = (pp^v[j])*zz;
223      }
224    }   
225    nn = nn + (leadcoef(mm[i])*zz);
226    i++; 
227  }
228  return(nn);
229}
230
231static proc invo_poly(poly m, map theta)
232// applies the involution map theta to m, where m=polynomial
233{
234  // compatibility:
235  ideal l = ideal(theta);
236  int i;
237  list L;
238  for (i=1; i<=size(l); i++)
239  {
240    L[i] = l[i];
241  }
242  int nv = nvars(basering);
243  return (In_Poly(m,L,nv));
244//   if (m==0) { return(m); }
245//   int i,j;
246//   intvec v;
247//   poly p,z;
248//   poly n = 0;
249//   i = 1;
250//   while(m[i]!=0)
251//   {
252//     v = leadexp(m[i]);
253//     z =1;
254//     for(j=nvars(basering); j>=1; j--)
255//     {
256//       if (v[j]!=0)
257//       {
258//         p = var(j);
259//         p = theta(p);
260//         z = z*(p^v[j]);
261//       }
262//     }   
263//     n = n + (leadcoef(m[i])*z);
264//     i++; 
265//   }
266//   return(n);
267}
268///////////////////////////////////////////////////////////////////////////////////
269proc involution(m, map theta)
270"USAGE:  involution(m, theta); m is a poly/vector/ideal/matrix/module, theta is a map
271PURPOSE: applies the involution, presented by theta to the input m
272RETURN:  object of the same type as m
273EXAMPLE: example involution; shows an example
274"
275{
276  // applies the involution map theta to m,
277  // where m= vector, polynomial, module, matrix, ideal
278  int i,j;
279  intvec v;
280  poly p,z;
281  if (typeof(m)=="poly")
282  {
283    return (invo_poly(m,theta)); 
284  }
285  if ( typeof(m)=="ideal" )
286  {
287    ideal n;
288    for (i=1; i<=size(m); i++)
289    {
290      n[i] = invo_poly(m[i], theta);
291    }
292    return(n);
293  }
294  if (typeof(m)=="vector")
295  {
296    for(i=1; i<=size(m); i++)
297    {
298      m[i] = invo_poly(m[i], theta);
299    }
300    return (m); 
301  }
302  if ( (typeof(m)=="matrix") || (typeof(m)=="module"))
303  { 
304    matrix n = matrix(m);
305    int @R=nrows(n);
306    int @C=ncols(n);
307    for(i=1; i<=@R; i++)
308    {
309      for(j=1; j<=@C; j++)
310      {
311        if (m[i,j]!=0)
312        {
313          n[i,j] = invo_poly( m[i,j], theta);
314        }
315      }
316    }
317    if (typeof(m)=="module")
318    {
319      return (module(n));
320    }
321    else // matrix
322    {
323      return(n);
324    }
325  }
326  // if m is not of the supported type:
327  "Error: unsupported argument type!";
328  return();
329}
330example
331{
332  "EXAMPLE:";echo = 2;
333  ring r = 0,(x,d),dp;
334  ncalgebra(1,1); // Weyl-Algebra
335  map F = r,x,-d;
336  poly f =  x*d^2+d;
337  poly If = involution(f,F);
338  f-If;
339  poly g = x^2*d+2*x*d+3*x+7*d;
340  poly tg = -d*x^2-2*d*x+3*x-7*d;
341  poly Ig = involution(g,F);
342  tg-Ig;
343  ideal I = f,g;
344  ideal II = involution(I,F);
345  II;
346  I - involution(II,F);
347  module M  = [f,g,0],[g,0,x^2*d];
348  module IM = involution(M,F);
349  print(IM);
350  print(M - involution(IM,F)); 
351}
352///////////////////////////////////////////////////////////////////////////////////
353static proc new_var()
354//generates a string of new variables
355{
356
357  int NVars=nvars(basering);
358  int i,j;
359  string s="@_1_1";
360  for(i=1; i<=NVars; i++)
361  {
362    for(j=1; j<=NVars; j++)
363    {
364      if(i*j!=1)
365      {
366        s = s+ ","+NVAR(i,j);
367      };   
368    };
369  };
370  return(s);
371};
372
373static proc NVAR(int i, int j)
374{
375  return("@_"+string(i)+"_"+string(j));
376};
377///////////////////////////////////////////////////////////////////////////////////
378static proc new_var_special()
379//generates a string of new variables
380{
381  int NVars=nvars(basering);
382  int i;
383  string s="@_1_1";
384  for(i=2; i<=NVars; i++)
385  {
386    s = s+ ","+NVAR(i,i);
387  };
388  return(s);
389};
390///////////////////////////////////////////////////////////////////////////////////
391static proc RelMatr()
392// returns the matrix of relations
393// only Lie-type relations x_j x_i= x_i x_j + .. are taken into account
394{
395  int i,j;
396  int NVars = nvars(basering);
397  matrix Rel[NVars][NVars];
398  for(i=1; i<NVars; i++)
399  {
400    for(j=i+1; j<=NVars; j++)
401    {
402      Rel[i,j]=var(j)*var(i)-var(i)*var(j);
403    };
404  };
405  return(Rel);
406};
407/////////////////////////////////////////////////////////////////
408proc find_invo()
409"USAGE: find_invo();
410PURPOSE: describes a variety of linear involutions on a basering
411RETURN: a ring together with a list of pairs L, where
412@*        L[i][1]  =  Groebner Basis of an i-th associated prime,
413@*        L[i][2]  =  multiplication matrix, reduced wrt L[i][1]
414NOTE: for convenience, the full ideal of relations 'idJ'
415and the matrix with indeterminates 'matD' are exported in the output ring.
416"
417{
418  def @B    = basering; //save the name of basering
419  int NVars = nvars(@B); //number of variables in basering
420  int i, j;
421 
422  matrix Rel = RelMatr(); //the matrix of relations
423   
424  string s   = new_var(); //string of new variables
425  string Par = parstr(@B); //string of parameters in old ring
426 
427  if (Par=="") // if there are no parameters
428  {
429    execute("ring @@K=0,("+varstr(@B)+","+s+"), dp;"); //new ring with new variables
430  }
431  else //if there exist parameters
432  { 
433     execute("ring @@K=(0,"+Par+") ,("+varstr(@B)+","+s+"), dp;");//new ring with new variables
434  };
435 
436  matrix Rel = imap(@B, Rel); //consider the matrix of relations in new ring
437 
438  int Sz = NVars*NVars+NVars; // number of variables in new ring
439 
440  matrix M[Sz][Sz]; //to be the matrix of relations in new ring
441 
442  for(i=1; i<NVars; i++) //initialize that matrix of relations
443  {
444    for(j=i+1; j<=NVars; j++)
445    {
446      M[i,j] = Rel[i,j];
447    };
448  };
449 
450  ncalgebra(1, M); //now new ring @@K become a noncommutative ring
451 
452  list l; //list to define an involution
453  poly @@F;
454  for(i=1; i<=NVars; i++) //initializing list for involution
455  {
456    @@F=0;
457    for(j=1; j<=NVars; j++)
458    {
459      execute( "@@F = @@F+"+NVAR(i,j)+"*"+string( var(j) )+";" );
460    }; 
461    l=l+list(@@F); 
462  };
463     
464  matrix N = Rel; //imap(@B,Rel);
465 
466  for(i=1; i<NVars; i++)//get matrix by applying the involution to relations
467  {
468    for(j=i+1; j<=NVars; j++)
469    {
470      N[i,j]= l[j]*l[i] - l[i]*l[j] + In_Poly( N[i,j], l, NVars);
471    };
472  };
473  kill l;
474  //---------------------------------------------
475  //get the ideal of coefficients of N
476  ideal J; 
477  ideal idN = simplify(ideal(N),2);
478  J = ideal(coeffs( idN, var(1) ) );
479  for(i=2; i<=NVars; i++)
480  {
481    J = ideal( coeffs( J, var(i) ) );
482  };
483  J = simplify(J,2);
484  //-------------------------------------------------
485  if ( Par=="" ) //initializes the ring of relations
486  {
487    execute("ring @@KK=0,("+s+"), dp;");
488  }
489  else
490  {
491    execute("ring @@KK=(0,"+Par+"),("+s+"), dp;");
492  };
493  ideal J = imap(@@K,J); // ideal, considered in @@KK now
494  string snv = "["+string(NVars)+"]";
495  execute("matrix @@D"+snv+snv+"="+s+";"); // matrix with entries=new variables
496 
497  J = J, ideal( @@D*@@D-matrix( freemodule(NVars) ) ); // add the condition that involution to square is just identity
498  J = simplify(J,2); // without extra zeros
499  list mL = minAssGTZ(J); // components not in GB
500  int sL  = size(mL);
501  option(redSB);       // important for reduced GBs
502  option(redTail);
503  matrix IM = @@D;     // involution map
504  list L    = list();  // the answer
505  list TL;
506  for (i=1; i<=sL; i++) // compute GBs of components
507  {
508    TL    = list();
509    TL[1] = std(mL[i]);
510    TL[2] = NF( ideal(IM), TL[1] );
511    L[i]  = TL;
512  }
513  export(L); // main export
514  ideal idJ = J; // debug-comfortable exports
515  matrix matD = @@D;
516  export(idJ);
517  export(matD);
518  return(@@KK);
519}
520example
521{ "EXAMPLE:"; echo = 2;
522 def a = CreateWeyl(1);
523 setring a;
524 def X = find_invo();
525 setring X;
526 L;
527}
528///////////////////////////////////////////////////////////////////////////
529proc find_invo_diag()
530"USAGE: find_invo_diag();
531PURPOSE: describes a variety of homothetic (diagonal) involutions on a basering
532RETURN: a ring together with a list of pairs L, where
533@*        L[i][1]  =  Groebner Basis of an i-th associated prime,
534@*        L[i][2]  =  multiplication matrix, reduced wrt L[i][1]
535NOTE: for convenience, the full ideal of relations 'idJ'
536and the matrix with indeterminates 'matD' are exported in the output ring.
537"
538{
539  def @B    = basering; //save the name of basering
540  int NVars = nvars(@B); //number of variables in basering
541  int i, j;
542 
543  matrix Rel = RelMatr(); //the matrix of relations
544   
545  string s   = new_var_special(); //string of new variables
546  string Par = parstr(@B); //string of parameters in old ring
547 
548  if (Par=="") // if there are no parameters
549  {
550    execute("ring @@K=0,("+varstr(@B)+","+s+"), dp;"); //new ring with new variables
551  }
552  else //if there exist parameters
553  { 
554    execute("ring @@K=(0,"+Par+") ,("+varstr(@B)+","+s+"), dp;");//new ring with new variables
555  };
556 
557  matrix Rel = imap(@B, Rel); //consider the matrix of relations in new ring
558 
559  int Sz = 2*NVars; // number of variables in new ring
560 
561  matrix M[Sz][Sz]; //to be the matrix of relations in new ring
562  for(i=1; i<NVars; i++) //initialize that matrix of relations
563  {
564    for(j=i+1; j<=NVars; j++)
565    {
566      M[i,j] = Rel[i,j];
567    };
568  };
569 
570  ncalgebra(1, M); //now new ring @@K become a noncommutative ring
571 
572  list l; //list to define an involution
573
574  for(i=1; i<=NVars; i++) //initializing list for involution
575  {
576    execute( "l["+string(i)+"]="+NVAR(i,i)+"*"+string( var(i) )+";" );
577 
578  };
579  matrix N = Rel; //imap(@B,Rel);
580 
581  for(i=1; i<NVars; i++)//get matrix by applying the involution to relations
582  {
583    for(j=i+1; j<=NVars; j++)
584    {
585      N[i,j]= l[j]*l[i] - l[i]*l[j] + In_Poly( N[i,j], l, NVars);
586    };
587  };
588  kill l;
589  //---------------------------------------------
590  //get the ideal of coefficients of N
591
592  ideal J; 
593  ideal idN = simplify(ideal(N),2);
594  J = ideal(coeffs( idN, var(1) ) );
595  for(i=2; i<=NVars; i++)
596  {
597    J = ideal( coeffs( J, var(i) ) );
598  };
599  J = simplify(J,2);
600  //-------------------------------------------------
601 
602  if ( Par=="" ) //initializes the ring of relations
603  {
604    execute("ring @@KK=0,("+s+"), dp;");
605  }
606  else
607  {
608    execute("ring @@KK=(0,"+Par+"),("+s+"), dp;");
609  };
610     
611  ideal J = imap(@@K,J); // ideal, considered in @@KK now
612 
613  matrix @@D[NVars][NVars]; // matrix with entries=new variables to square i.e. @@D=@@D^2
614  for(i=1;i<=NVars;i++)
615  {
616    execute("@@D["+string(i)+","+string(i)+"]="+NVAR(i,i)+";");
617  };
618  J = J, ideal( @@D*@@D - matrix( freemodule(NVars) ) ); // add the condition that involution to square is just identity
619  J = simplify(J,2); // without extra zeros
620 
621  list mL = minAssGTZ(J); // components not in GB
622  int sL  = size(mL);
623  option(redSB); // important for reduced GBs
624  option(redTail);
625  matrix IM = @@D; // involution map
626  list L = list(); // the answer
627  list TL;
628  for (i=1; i<=sL; i++)// compute GBs of components
629  {
630    TL    = list();
631    TL[1] = std(mL[i]);
632    TL[2] = NF( ideal(IM), TL[1] );
633    L[i]  = TL;
634  } 
635  export(L);
636  ideal idJ = J; // debug-comfortable exports
637  matrix matD = @@D;
638  export(idJ);
639  export(matD);
640  return(@@KK);
641}
642example
643{ "EXAMPLE:"; echo = 2;
644 def a = CreateWeyl(1);
645 setring a;
646 def X = find_invo_diag();
647 setring X;
648 L;
649}
650/////////////////////////////////////////////////////////////////////
651proc find_auto()
652"USAGE: find_auto();
653PURPOSE: describes a variety of linear automorphisms of a basering
654RETURN: a ring together with a list of pairs L, where
655@*           L[i][1]  =  Groebner Basis of an i-th associated prime,
656@*           L[i][2] = multiplication matrix, reduced wrt L[i][1]
657NOTE: for convenience, the full ideal of relations 'idJ'
658and the matrix with indeterminates 'matD' are exported in the output ring.
659"
660{
661  def @B    = basering; //save the name of basering
662  int NVars = nvars(@B); //number of variables in basering
663  int i, j;
664 
665  matrix Rel = RelMatr(); //the matrix of relations
666   
667  string s   = new_var(); //string of new variables
668  string Par = parstr(@B); //string of parameters in old ring
669 
670  if (Par=="") // if there are no parameters
671  {
672    execute("ring @@K=0,("+varstr(@B)+","+s+"), dp;"); //new ring with new variables
673  }
674  else //if there exist parameters
675  { 
676     execute("ring @@K=(0,"+Par+") ,("+varstr(@B)+","+s+"), dp;");//new ring with new variables
677  };
678 
679  matrix Rel = imap(@B, Rel); //consider the matrix of relations in new ring
680 
681  int Sz = NVars*NVars+NVars; // number of variables in new ring
682 
683  matrix M[Sz][Sz]; //to be the matrix of relations in new ring
684 
685  for(i=1; i<NVars; i++) //initialize that matrix of relations
686  {
687    for(j=i+1; j<=NVars; j++)
688    {
689      M[i,j] = Rel[i,j];
690    };
691  };
692 
693  ncalgebra(1, M); //now new ring @@K become a noncommutative ring
694 
695  list l; //list to define a homomorphism(isomorphism)
696  poly @@F;
697  for(i=1; i<=NVars; i++) //initializing list for involution
698  {
699    @@F=0;
700    for(j=1; j<=NVars; j++)
701    {
702      execute( "@@F = @@F+"+NVAR(i,j)+"*"+string( var(j) )+";" );
703    }; 
704    l=l+list(@@F); 
705  };
706     
707  matrix N = Rel; //imap(@B,Rel);
708 
709  for(i=1; i<NVars; i++)//get matrix by applying the homomorphism  to relations
710  {
711    for(j=i+1; j<=NVars; j++)
712    {
713      N[i,j]= l[j]*l[i] - l[i]*l[j] - Hom_Poly( N[i,j], l, NVars);
714    };
715  };
716  kill l;
717  //---------------------------------------------
718  //get the ideal of coefficients of N
719  ideal J; 
720  ideal idN = simplify(ideal(N),2);
721  J = ideal(coeffs( idN, var(1) ) );
722  for(i=2; i<=NVars; i++)
723  {
724    J = ideal( coeffs( J, var(i) ) );
725  };
726  J = simplify(J,2);
727  //-------------------------------------------------
728  if ( Par=="" ) //initializes the ring of relations
729  {
730    execute("ring @@KK=0,("+s+"), dp;");
731  }
732  else
733  {
734    execute("ring @@KK=(0,"+Par+"),("+s+"), dp;");
735  };
736  ideal J = imap(@@K,J); // ideal, considered in @@KK now
737  string snv = "["+string(NVars)+"]";
738  execute("matrix @@D"+snv+snv+"="+s+";"); // matrix with entries=new variables
739 
740  J = J, ideal( @@D*@@D-matrix( freemodule(NVars) ) ); // add the condition that homomorphism to square is just identity
741  J       = simplify(J,2); // without extra zeros
742  list mL = minAssGTZ(J); // components not in GB
743  int sL  = size(mL);
744  option(redSB); // important for reduced GBs
745  option(redTail);
746  matrix IM = @@D; //  map
747  list L = list(); // the answer
748  list TL;
749  for (i=1; i<=sL; i++)// compute GBs of components
750  {
751    TL    = list();
752    TL[1] = std(mL[i]);
753    TL[2] = NF( ideal(IM), TL[1] );
754    L[i]  = TL;
755  }
756  export(L);
757  ideal idJ = J; // debug-comfortable exports
758  matrix matD = @@D;
759  export(idJ);
760  export(matD);
761  return(@@KK);
762}
763example
764{ "EXAMPLE:"; echo = 2;
765 def a = CreateWeyl(1);
766 setring a;
767 def X = find_auto();
768 setring X;
769 L;
770}
Note: See TracBrowser for help on using the repository browser.