Index: Singular/LIB/gkdim.lib
===================================================================
--- Singular/LIB/gkdim.lib	(revision 06d5e10cda81b8b254f3c4e329dd70a92415fcd6)
+++ Singular/LIB/gkdim.lib	(revision 5bc4ee3956b1cef3f4a576f97eafb4340ddfc133)
@@ -1,4 +1,4 @@
 ///////////////////////////////////////////////////////////////////////////////
-version="$Id: gkdim.lib,v 1.6 2005-02-23 18:10:45 levandov Exp $";
+version="$Id: gkdim.lib,v 1.7 2005-04-27 19:32:14 levandov Exp $";
 category="Noncommutative";
 info="
@@ -47,5 +47,6 @@
 proc GKdim(list L)
 "USAGE:   GKdim(L);   L is a left ideal/module/matrix
-RETURN:  int, the Gelfand-Kirillov dimension of the factor-module, whose presentation is given by L
+PURPOSE: compute the Gelfand-Kirillov dimension of the factor-module, whose presentation is given by L
+RETURN:  int 
 NOTE:  if the factor-module is zero, -1 is returned
 EXAMPLE: example GKdim; shows examples
Index: Singular/LIB/involut.lib
===================================================================
--- Singular/LIB/involut.lib	(revision 06d5e10cda81b8b254f3c4e329dd70a92415fcd6)
+++ Singular/LIB/involut.lib	(revision 5bc4ee3956b1cef3f4a576f97eafb4340ddfc133)
@@ -1,3 +1,3 @@
-version="$Id: involut.lib,v 1.2 2005-02-23 18:10:45 levandov Exp $";
+version="$Id: involut.lib,v 1.3 2005-04-27 19:32:14 levandov Exp $";
 category="Noncommutative";
 info="
@@ -17,6 +17,6 @@
 find_invo_diag();     describes a variety of homothetic (diagonal) involutions on a basering;
 find_auto();          describes a variety of linear automorphisms of a basering;
-ncdetection(ring r);  computes an ideal, presenting an involution map on some classical noncommutative algebras;
-involution(m, map theta);  applies the involution, presented by theta, to the object m =
+ncdetection(ring r);  computes an ideal, presenting an involution map on some particular noncommutative algebras;
+involution(m, map theta);  applies the involution to an object.
 ";
 
@@ -27,11 +27,9 @@
 proc ncdetection(def r)
 "USAGE:  ncdetection(r), r a ring
-RETURN:  ideal, presenting an involution map on a noncommutative algebra r
-NOTE:    returns optimized involutions for some classical noncomm algebras,
-arising in the Control Theory, namely algebras with 
-differential, shift or advance operators
+PURPOSE: compute optimized involutions for some particular noncommutative algebras
+RETURN:  ideal (presenting an involution map)
+NOTE:    the procedure is aimed at noncommutative algebras with differential, shift or advance operators arising in the Control Theory
 EXAMPLE: example ncdetection; shows an example
-"
-{
+"{
 // in this procedure an involution map is generated from the NCRelations 
 // that will be used in the function involution
@@ -272,6 +270,5 @@
 RETURN:  object of the same type as m
 EXAMPLE: example involution; shows an example
-"
-{
+"{
   // applies the involution map theta to m, 
   // where m= vector, polynomial, module, matrix, ideal
@@ -411,9 +408,8 @@
 RETURN: a ring together with a list of pairs L, where
 @*        L[i][1]  =  Groebner Basis of an i-th associated prime,
-@*        L[i][2]  =  multiplication matrix, reduced wrt L[i][1]
-NOTE: for convenience, the full ideal of relations 'idJ' 
-and the matrix with indeterminates 'matD' are exported in the output ring.
-"
-{
+@*        L[i][2]  =  matrix, defining a linear map, with entries, reduced with respect to L[i][1]
+NOTE: for convenience, the full ideal of relations @code{idJ} 
+and the initial matrix with indeterminates @code{matD} are exported in the output ring.
+"{
   def @B    = basering; //save the name of basering
   int NVars = nvars(@B); //number of variables in basering
@@ -503,10 +499,12 @@
   matrix IM = @@D;     // involution map
   list L    = list();  // the answer
-  list TL; 
+  list TL;
+  ideal tmp = 0;
   for (i=1; i<=sL; i++) // compute GBs of components
   {
     TL    = list();
     TL[1] = std(mL[i]);
-    TL[2] = NF( ideal(IM), TL[1] );
+    tmp   = NF( ideal(IM), TL[1] );
+    TL[2] = matrix(tmp, NVars,NVars);
     L[i]  = TL;
   }
@@ -521,8 +519,10 @@
 { "EXAMPLE:"; echo = 2;
  def a = CreateWeyl(1);
- setring a;
+ setring a; // this algebra is a first Weyl algebra
  def X = find_invo();
- setring X;
+ setring X; // ring with new variables, corresponding to unknown coefficients
  L;
+ print(L[1][2]);  // L[i][2] is a matrix in new variables, defining the linear involution
+ L[1][1];  // where new variables obey these relations
 }
 ///////////////////////////////////////////////////////////////////////////
@@ -532,9 +532,8 @@
 RETURN: a ring together with a list of pairs L, where
 @*        L[i][1]  =  Groebner Basis of an i-th associated prime,
-@*        L[i][2]  =  multiplication matrix, reduced wrt L[i][1]
-NOTE: for convenience, the full ideal of relations 'idJ' 
-and the matrix with indeterminates 'matD' are exported in the output ring.
-"
-{
+@*        L[i][2]  =  matrix, defining a linear map, with entries, reduced with respect to L[i][1]
+NOTE: for convenience, the full ideal of relations @code{idJ} 
+and the initial matrix with indeterminates @code{matD} are exported in the output ring.
+"{
   def @B    = basering; //save the name of basering
   int NVars = nvars(@B); //number of variables in basering
@@ -626,11 +625,13 @@
   list L = list(); // the answer
   list TL; 
-  for (i=1; i<=sL; i++)// compute GBs of components
+  ideal tmp = 0;
+  for (i=1; i<=sL; i++) // compute GBs of components
   {
     TL    = list();
     TL[1] = std(mL[i]);
-    TL[2] = NF( ideal(IM), TL[1] );
+    tmp   = NF( ideal(IM), TL[1] );
+    TL[2] = matrix(tmp, NVars,NVars);
     L[i]  = TL;
-  }  
+  }
   export(L);
   ideal idJ = J; // debug-comfortable exports
@@ -643,8 +644,10 @@
 { "EXAMPLE:"; echo = 2;
  def a = CreateWeyl(1);
- setring a;
+ setring a; // this algebra is a first Weyl algebra
  def X = find_invo_diag();
- setring X;
- L;
+ setring X; // ring with new variables, corresponding to unknown coefficients
+ print(L[1][2]);  // a first matrix, defining the linear involution: we see it is constant
+ print(L[2][2]);  // and a second possible matrix; it is constant too
+ L; // let us take a look on the whole list
 }
 /////////////////////////////////////////////////////////////////////
@@ -653,10 +656,9 @@
 PURPOSE: describes a variety of linear automorphisms of a basering
 RETURN: a ring together with a list of pairs L, where
-@*           L[i][1]  =  Groebner Basis of an i-th associated prime,
-@*           L[i][2] = multiplication matrix, reduced wrt L[i][1]
-NOTE: for convenience, the full ideal of relations 'idJ' 
-and the matrix with indeterminates 'matD' are exported in the output ring.
-"
-{
+@*        L[i][1]  =  Groebner Basis of an i-th associated prime,
+@*        L[i][2]  =  matrix, defining a linear map, with entries, reduced with respect to L[i][1]
+NOTE: for convenience, the full ideal of relations @code{idJ} 
+and the initial matrix with indeterminates @code{matD} are exported in the output ring.
+"{
   def @B    = basering; //save the name of basering
   int NVars = nvars(@B); //number of variables in basering
@@ -747,9 +749,11 @@
   list L = list(); // the answer
   list TL; 
+  ideal tmp = 0;
   for (i=1; i<=sL; i++)// compute GBs of components
   {
     TL    = list();
     TL[1] = std(mL[i]);
-    TL[2] = NF( ideal(IM), TL[1] );
+    tmp   = NF( ideal(IM), TL[1] );
+    TL[2] = matrix(tmp,NVars, NVars);
     L[i]  = TL;
   }
@@ -764,7 +768,9 @@
 { "EXAMPLE:"; echo = 2;
  def a = CreateWeyl(1);
- setring a;
+ setring a; // this algebra is a first Weyl algebra
  def X = find_auto();
- setring X;
- L;
-}
+ setring X; // ring with new variables, corresponding to unknown coefficients
+ print(L[1][2]);  // a first matrix, defining the linear automorphism : we see it is constant
+ print(L[2][2]);  // and a second possible matrix; it is constant too
+ L; // let us take a look on the whole list
+}
