Index: Singular/LIB/dmod.lib
===================================================================
--- Singular/LIB/dmod.lib	(revision 3576f6fb6a525ec1407b464179ffc8ad1f2c0ea7)
+++ Singular/LIB/dmod.lib	(revision 0a2f7deb9cde7da147b192a31ec765e4f3923a09)
@@ -7,5 +7,6 @@
          Jorge Martin Morales,    jorge@unizar.es
 
-THEORY: Let K be a field of characteristic 0. Given a polynomial ring
+OVERVIEW: 
+Theory: Let K be a field of characteristic 0. Given a polynomial ring
       R = K[x_1,...,x_n] and a polynomial F in R,
       one is interested in the R[1/F]-module of rank one, generated by
@@ -28,5 +29,5 @@
      PS*F^(s+1) = bs*F^s holds in K[x_1,...,x_n,1/F]*F^s.
 
-REFERENCES:
+References:
 We provide the following implementations of algorithms:
 @*(OT) the classical Ann F^s algorithm from Oaku and Takayama (Journal of
@@ -41,5 +42,5 @@
 
 
-GUIDE:
+Guide:
 @*- Ann F^s = I(F^s) = LD in D(R)[s] can be computed by Sannfs [BM, OT, LOT]
 @*- Ann^(1) F^s in D(R)[s] can be computed by Sannfslog
@@ -58,12 +59,11 @@
 
 PROCEDURES:
-
 annfs(F[,S,eng]);       compute Ann F^s0 in D and Bernstein polynomial for a poly F
 annfspecial(I, F, m, n);  compute Ann F^n from Ann F^s for a polynomial F and a number n
 Sannfs(F[,S,eng]);      compute Ann F^s in D[s] for a polynomial F
 Sannfslog(F[,eng]);     compute Ann^(1) F^s in D[s] for a polynomial F
-bernsteinBM(F[,eng]);   compute global Bernstein polynomial for a polynomial F (algorithm of Briancon-Maisonobe)
-bernsteinLift(I,F [,eng]);  compute a possible multiple of Bernstein polynomial via lift-like procedure
-operatorBM(F[,eng]);    compute Ann F^s, Ann F^s0, BS and PS for a polynomial F (algorithm of Briancon-Maisonobe)
+bernsteinBM(F[,eng]);   compute global Bernstein-Sato polynomial of a poly F (alg of Briancon-Maisonobe)
+bernsteinLift(I,F [,eng]);  compute a multiple of Bernstein-Sato polynomial via lift-like procedure
+operatorBM(F[,eng]);    compute Ann F^s, Ann F^s0, BS and PS for a poly F (algorithm of Briancon-Maisonobe)
 operatorModulo(F, I, b); compute PS via the modulo approach
 annfsParamBM(F[,eng]);  compute the generic Ann F^s (algorithm by Briancon and Maisonobe) and exceptional parametric constellations for a polynomial F with parametric coefficients
@@ -75,4 +75,5 @@
 annfsRB(I,F [,eng]);          compute Ann F^s0 in D and Bernstein polynomial from the known Ann F^s in D[s] by using Jacobian ideal
 checkFactor(I,F,q[,eng]); check whether a polynomial q in K[s] is a factor of the global Bernstein polynomial of F from the known Ann F^s in D[s]
+
 
 arrange(p);           create a poly, describing a full hyperplane arrangement
Index: Singular/LIB/dmodapp.lib
===================================================================
--- Singular/LIB/dmodapp.lib	(revision 3576f6fb6a525ec1407b464179ffc8ad1f2c0ea7)
+++ Singular/LIB/dmodapp.lib	(revision 0a2f7deb9cde7da147b192a31ec765e4f3923a09)
@@ -7,7 +7,7 @@
 @*       Daniel Andres,   daniel.andres@math.rwth-aachen.de
 
-SUPPORT: DFG Graduiertenkolleg 1632 'Experimentelle und konstruktive Algebra'
-
-GUIDE: Let K be a field of characteristic 0, R = K[x1,...,xN] and
+Support: DFG Graduiertenkolleg 1632 'Experimentelle und konstruktive Algebra'
+
+OVERVIEW: Let K be a field of characteristic 0, R = K[x1,...,xN] and
 @* D be the Weyl algebra in variables x1,...,xN,d1,...,dN.
 @* In this library there are the following procedures for algebraic D-modules:
@@ -42,5 +42,5 @@
 
 
-REFERENCES:
+References:
 @* (SST) Saito, Sturmfels, Takayama 'Groebner Deformations of Hypergeometric
 @*         Differential Equations', Springer, 2000
@@ -49,5 +49,5 @@
 
 
-MAIN PROCEDURES:
+PROCEDURES:
 
 annPoly(f);   annihilator of a polynomial f in the corr. Weyl algebra
@@ -74,5 +74,4 @@
 
 
-AUXILIARY PROCEDURES:
 
 appelF1();     create an ideal annihilating Appel F1 function
@@ -103,5 +102,4 @@
 D-module; D-integration; integration of D-module; characteristic variety;
 Appel function; Appel hypergeometric function
-
 ";
 
Index: Singular/LIB/fpadim.lib
===================================================================
--- Singular/LIB/fpadim.lib	(revision 3576f6fb6a525ec1407b464179ffc8ad1f2c0ea7)
+++ Singular/LIB/fpadim.lib	(revision 0a2f7deb9cde7da147b192a31ec765e4f3923a09)
@@ -6,5 +6,5 @@
 AUTHORS: Grischa Studzinski,       grischa.studzinski@rwth-aachen.de
 
-SUPPORT: Projects LE 2697/2-1; KR 1907/3-1 of the Priority Programme SPP 1489:
+Support: Projects LE 2697/2-1; KR 1907/3-1 of the Priority Programme SPP 1489:
 @* 'Algorithmische und Experimentelle Methoden in Algebra, Geometrie und Zahlentheorie'
 @* of the German DFG
@@ -41,5 +41,5 @@
 @*
 
-REFERENCES:
+References:
 
 @*   [ufna] Ufnarovskij: Combinatorical and asymptotic methods in algebra, 1990
@@ -49,5 +49,5 @@
                       associative algebras, Diploma thesis, RWTH Aachen, 2010
 
-ASSUMPTIONS:
+Assumptions:
 @* - basering is always a Letterplace ring
 @* - all intvecs correspond to Letterplace monomials
Index: Singular/LIB/freegb.lib
===================================================================
--- Singular/LIB/freegb.lib	(revision 3576f6fb6a525ec1407b464179ffc8ad1f2c0ea7)
+++ Singular/LIB/freegb.lib	(revision 0a2f7deb9cde7da147b192a31ec765e4f3923a09)
@@ -6,5 +6,5 @@
 AUTHOR: Viktor Levandovskyy,     levandov@math.rwth-aachen.de
 
-THEORY: See chapter 'LETTERPLACE' in the @sc{Singular} Manual.
+OVERVIEW: For the theory, see chapter 'Letterplace' in the @sc{Singular} Manual.
 
 PROCEDURES:
@@ -13,5 +13,4 @@
 setLetterplaceAttributes(R,d,b);  supplies ring R with the letterplace structure
 
-AUXILIARY PROCEDURES:
 
 lpMult(f,g);        letterplace multiplication of letterplace polynomials
@@ -28,6 +27,6 @@
 ademRelations(i,j);    compute the ideal of Adem relations for i<2j in char 0
 
-SEE ALSO: LETTERPLACE
-"
+SEE ALSO: fpadim_lib, Letterplace
+";
 
 // this library computes two-sided GB of an ideal
@@ -907,5 +906,5 @@
 RETURN:  ring
 PURPOSE: creates a ring with the ordering, used in letterplace computations
-NOTE: if h is given an nonzero, the pure homogeneous letterplace block ordering will be used.
+NOTE: if h is given and nonzero, the pure homogeneous letterplace block ordering will be used.
 EXAMPLE: example makeLetterplaceRing; shows examples
 "
@@ -1136,4 +1135,115 @@
   attrib(A,"lV"); // number of variables in the main block
 }
+
+
+proc makeLetterplaceRing3(int d)
+"USAGE:  makeLetterplaceRing1(d); d an integer
+RETURN:  ring
+PURPOSE: creates a ring with a special ordering, representing
+@* the original P[s,sigma] (adds d blocks of shifted s)
+ASSUME: basering is a letterplace ring as well
+NOTE: experimental status
+EXAMPLE: example makeLetterplaceRing1; shows examples
+"
+{
+  // d = up to degree, will be shifted to d+1
+  if (d<1) {"bad d"; return(0);}
+
+  int uptodeg = d; int lV = nvars(basering);
+
+  int ppl = printlevel-voice+2;
+  string err = "";
+
+  int i,j,s;
+  def save = basering;
+  int D = d-1;
+  list LR  = ringlist(save);
+  list L, tmp;
+  L[1] = LR[1]; // ground field
+  L[4] = LR[4]; // quotient ideal
+  tmp  = LR[2]; // varnames
+  tmp[size(tmp)+1] = "s";
+  // add s's
+  //  string newSname = "@s";
+  s = size(LR[2]);
+  for (i=1; i<=D; i++)
+  {
+    for (j=1; j<=s; j++)
+    {
+      tmp[i*s+j] = string(tmp[j])+"("+string(i+1)+")";
+    }
+  }
+  // the final index is D*s+s = (D+1)*s = degBound*s
+  for (i=1; i<=d; i++)
+  {
+    tmp[FIndex + i] =  string(newSname)+"("+string(i)+")";
+  }
+  L[2] = tmp;
+  list OrigNames = LR[2];
+  // ordering: d blocks of the MODIFIED ord on r
+  // try to get whether the ord on r is blockord itself
+  // TODO: make L(2) ordering! exponent is maximally 2
+  s = size(LR[3]);
+
+  // assume: basering was a letterplace, so get its block
+  tmp = LR[3][1]; // ASSUME: it's a nice block
+  // modify it
+  // add (0,..,0,1) ... as antiblock part
+  intvec iv; list ttmp, tmp1;
+  for (i=1; i<=d; i++)
+  {
+    // the position to hold 1: 
+    iv = intvec( gen( i*(lV+1)-1 ) );
+    ttmp[1] = "a";
+    ttmp[2] = iv;
+    tmp1[i] = ttmp;
+  }
+  // finished: antiblock part //TOCONTINUE
+
+  if (s==2)
+  {
+    // not a blockord, 1 block + module ord
+    tmp = LR[3][s]; // module ord
+    for (i=1; i<=D; i++)
+    {
+      LR[3][s-1+i] = LR[3][1];
+    }
+    LR[3][s+D] = tmp;
+  }
+  if (s>2)
+  {
+    // there are s-1 blocks
+    int nb = s-1;
+    tmp = LR[3][s]; // module ord
+    for (i=1; i<=D; i++)
+    {
+      for (j=1; j<=nb; j++)
+      {
+        LR[3][i*nb+j] = LR[3][j];
+      }
+    }
+    //    size(LR[3]);
+    LR[3][nb*(D+1)+1] = tmp;
+  }
+  L[3] = LR[3];
+  def @R = ring(L);
+  //  setring @R;
+  //  int uptodeg = d; int lV = nvars(basering); // were defined before
+  def @@R = setLetterplaceAttributes(@R,uptodeg,lV);
+  return (@@R);
+}
+example
+{
+  "EXAMPLE:"; echo = 2;
+  ring r = 0,(x,y,z),(dp(1),dp(2));
+  def A = makeLetterplaceRing3(2);
+  setring A;
+  A;
+  attrib(A,"isLetterplaceRing");
+  attrib(A,"uptodeg");  // degree bound
+  attrib(A,"lV"); // number of variables in the main block
+}
+
+
 
 /* EXAMPLES:
Index: Singular/LIB/ncfactor.lib
===================================================================
--- Singular/LIB/ncfactor.lib	(revision 3576f6fb6a525ec1407b464179ffc8ad1f2c0ea7)
+++ Singular/LIB/ncfactor.lib	(revision 0a2f7deb9cde7da147b192a31ec765e4f3923a09)
@@ -1,3 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////
 version = "$Id: ncfactor.lib, v 1.00 2010/02/15 10:06 heinle Exp $";
 category="Noncommutative";
@@ -6,16 +6,18 @@
 AUTHORS: Albert Heinle,     albert.heinle@rwth-aachen.de
 
-MAIN PROCEDURES:
-homogfac(h);         computes one factorization of a homogeneous polynomial h
-homogfac_all(h);     computes all factorizations of a homogeneous polynomial h
-facwa(h);            computes all factorizations of an inhomogeneous polynomial h
-
+PROCEDURES:
+facfirstwa(h);     factorization in the first Weyl algebra
+";
+
+LIB "general.lib";
+LIB "nctools.lib";
+LIB "involut.lib";
+
+//static homogfac(h);         computes one factorization of a homogeneous polynomial h
+//static homogfac_all(h);     computes all factorizations of a homogeneous polynomial h
+//static facwa(h);            computes all factorizations of an inhomogeneous polynomial h
 /* ring R = 0,(x,y),Ws(-1,1); */
 /* def r = nc_algebra(1,1); */
 /* setring(r); */
-";
-LIB "general.lib";
-LIB "nctools.lib";
-LIB "involut.lib";
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -428,5 +430,5 @@
 //one factorization of a homogeneous polynomial
 //in the first Weyl Algebra
-proc homogfac(poly h)
+static proc homogfac(poly h)
 "USAGE: homogfac(h); h is a homogeneous polynomial in the first Weyl algebra with respect to the weight vector [-1,1]
 RETURN: list
@@ -436,12 +438,4 @@
 SEE ALSO: homogfac_all
 "{//proc homogfac
-     if (!isWeyl())
-     {//Our basering is not the Weyl algebra
-	  return(list());
-     }//Our basering is not the Weyl algebra
-     if(nvars(basering)!=2)
-     {//Our basering is the Weyl algebra, but not the first
-	  return(list());
-     }//Our basering is the Weyl algebra, but not the first
      def r = basering;
      poly hath;
@@ -530,17 +524,17 @@
      return(result);
 }//proc homogfac
-example
-{
-     "EXAMPLE:";echo=2;
-     ring R = 0,(x,y),Ws(-1,1);
-     def r = nc_algebra(1,1);
-     setring(r);
-     poly h = (x^2*y^2+1)*(x^4);
-     homogfac(h);
-}
+/* example */
+/* { */
+/*      "EXAMPLE:";echo=2; */
+/*      ring R = 0,(x,y),Ws(-1,1); */
+/*      def r = nc_algebra(1,1); */
+/*      setring(r); */
+/*      poly h = (x^2*y^2+1)*(x^4); */
+/*      homogfac(h); */
+/* } */
 
 //==================================================
 //Computes all possible homogeneous factorizations
-proc homogfac_all(poly h)
+static proc homogfac_all(poly h)
 "USAGE: homogfac_all(h); h is a homogeneous polynomial in the first Weyl algebra with respect to the weight vector [-1,1]
 RETURN: list
@@ -554,12 +548,4 @@
 	  return(list(list(h)));
      }//h is a constant
-     if (!isWeyl())
-     {//Our basering is not the Weyl algebra
-	  return(list());
-     }//Our basering is not the Weyl algebra
-     if(nvars(basering)!=2)
-     {//Our basering is the Weyl algebra, but not the first
-	  return(list());
-     }//Our basering is the Weyl algebra, but not the first
      def r = basering;
      list one_hom_fac; //stands for one homogeneous factorization
@@ -800,13 +786,13 @@
      return(result);
 }//proc HomogFacAll
-example
-{
-     "EXAMPLE:";echo=2;
-     ring R = 0,(x,y),Ws(-1,1);
-     def r = nc_algebra(1,1);
-     setring(r);
-     poly h = (x^2*y^2+1)*(x^4);
-     homogfac_all(h);
-}
+/* example */
+/* { */
+/*      "EXAMPLE:";echo=2; */
+/*      ring R = 0,(x,y),Ws(-1,1); */
+/*      def r = nc_algebra(1,1); */
+/*      setring(r); */
+/*      poly h = (x^2*y^2+1)*(x^4); */
+/*      homogfac_all(h); */
+/* } */
 
 //==================================================*
@@ -887,5 +873,46 @@
 //==================================================
 //factorization of the first Weyl Algebra
-proc facwa(poly h)
+
+//The following procedure just serves the purpose to
+//transform the input into an appropriate input for
+//the procedure sfacwa, where the ring must contain the
+//variables in a certain order.
+proc facfirstwa(poly h)
+{//proc facfirstwa
+      //Redefine the ring in my standard form
+     if (!isWeyl())
+     {//Our basering is not the Weyl algebra
+	  return(list());
+     }//Our basering is not the Weyl algebra
+     if(nvars(basering)!=2)
+     {//Our basering is the Weyl algebra, but not the first
+	  return(list());
+     }//Our basering is the Weyl algebra, but not the first
+     if (ringlist(basering)[6][1,2] == -1) //manual of ringlist will tell you why
+     {
+	  def r = basering;
+	  ring tempRing = ringlist(r)[1][1],(x,y),Ws(-1,1);
+	  def tempRingnc = nc_algebra(1,1);
+	  setring(tempRingnc);
+	  map transf = r, var(2), var(1);
+	  list result = sfacwa(transf(h));
+	  setring(r);
+	  map transfback = tempRingnc, var(2),var(1);
+	  return(transfback(result));
+     }
+     else { return(sfacwa(h));}
+}//proc facfirstwa
+example
+{
+     "EXAMPLE:";echo=2;
+     ring R = 0,(x,y),dp;
+     def r = nc_algebra(1,1);
+     setring(r);
+     poly h = (x^2*y^2+x)*(y-1);
+     facfirstwa(h);
+}
+
+//This is the main program
+static proc sfacwa(poly h)
 "USAGE: facwa(h); h is a polynomial in the first Weyl algebra
 RETURN: list
@@ -894,18 +921,9 @@
 EXAMPLE: example facwa; shows examples
 SEE ALSO: homogfac_all, homogfac
-"{//proc facwa
+"{//proc sfacwa
      if(homogwithorder(h,intvec(-1,1)))
      {
 	  return(homogfac_all(h));
      }
-     //Redefine the ring in my standard form
-     if (!isWeyl())
-     {//Our basering is not the Weyl algebra
-	  return(list());
-     }//Our basering is not the Weyl algebra
-     if(nvars(basering)!=2)
-     {//Our basering is the Weyl algebra, but not the first
-	  return(list());
-     }//Our basering is the Weyl algebra, but not the first
      def r = basering;
      map invo = basering,-var(1),var(2);
@@ -1058,14 +1076,6 @@
      result = delete_dublicates_noteval(result);
      return(result);
-}//proc facwa
-example
-{
-     "EXAMPLE:";echo=2;
-     ring R = 0,(x,y),Ws(-1,1);
-     def r = nc_algebra(1,1);
-     setring(r);
-     poly h = (x^2*y^2+x)*x;
-     facwa(h);
-}
+}//proc sfacwa
+
 
 //==================================================
@@ -1090,4 +1100,174 @@
      return(1);
 }//proc homogwithorder
+
+//==================================================
+//Testfac: Given a list with different factorizations of
+// one polynomial, the following procedure checks
+// whether they all refer to the same polynomial.
+// If they do, the output will be a list, that contains
+// the product of each factorization. If not, the empty
+// list will be returned.
+// If the optional argument # is given (i.e. the polynomial
+// which is factorized by the elements of the given list),
+// then we look, if the entries are factorizations of p
+// and if not, a list with the products subtracted by p
+// will be returned
+proc testfac(list l, list #)
+"USAGE:  - testfac(l); l is a list, that contains lists with entries in the first Weyl algebra or
+         @*- testfac(l,p); l is a list, that contains lists with entries in the first Weyl algebra and p is a polynomial in the first Weyl algebra
+RETURN: list@*
+PURPOSE: Checks whether a list of factorizations contains factorizations of the same element in the first Weyl algebra@*
+THEORY: @code{testfac} multiplies out each factorization and checks whether each factorization was a factorization of the same element.
+@* - if there is only a list given, the output will be the empty list, if it does not contain factorizations of the same element. Otherwise it will multiply out all the factorizations and return a list of the length if the given one, in which each entry is the factorized polynomial
+@* - if there is a polynomial in the second argument, then the procedure checks whether the given list contains factorizations of this polynomial. If it does, then the output will be a list with the length of the given one and each entry contains this polynomial. If it does not, then the procedure returns a list, in which each entry is the given polynomial subtracted by the multiplied candidate for its factorization.
+EXAMPLE: example testfac; shows examples
+SEE ALSO: homogfac_all, homogfac, facwa
+"{//proc testfac
+     if (size(l)==0)
+     {//The empty list is given
+	  return(list());
+     }//The empty list is given
+     if (size(#)>1)
+     {//We want max. one optional argument
+	  return(list());
+     }//We want max. one optional argument
+     list result;
+     int i; int j;
+     if (size(#)==0)
+     {//No optional argument is given
+	  int valid = 1;
+	  for (i = size(l);i>=1;i--)
+	  {//iterate over the elements of the given list
+	       if (size(result)>0)
+	       {
+		    if (product(l[i])!=result[size(l)-i])
+		    {
+			 valid = 0;
+			 break;
+		    }
+	       }
+	       result = insert(result, product(l[i]));
+	  }//iterate over the elements of the given list
+	  if (valid)
+	  {
+	       return(result);
+	  }
+	  return(list());
+     }//No optional argument is given
+     else
+     {
+	  int valid = 1;
+	  for (i = size(l);i>=1;i--)
+	  {//iterate over the elements of the given list
+	       if (product(l[i])!=#[1])
+	       {
+		    valid = 0;
+	       }
+	       result = insert(result, product(l[i]));
+	  }//iterate over the elements of the given list
+	  if (valid)
+	  {
+	       return(result);
+	  }
+	  for (i = 1 ; i<= size(result);i++)
+	  {//subtract p from every entry in result
+	       result[i] = result[i] - #[1];
+	  }//subtract p from every entry in result
+	  return(result);
+     }
+}//proc testfac
+example
+{
+     "EXAMPLE:";echo=2;
+     ring R = 0,(x,y),Ws(-1,1);
+     def r = nc_algebra(1,1);
+     setring(r);
+     poly h = (x^2*y^2+1)*(x^4);
+     def t1 = facfirstwa(h);
+     //fist a correct list
+     testfac(t1);
+     //now a correct list with the factorized polynomial
+     testfac(t1,h);
+     //now we put in an incorrect list without a polynomial
+     t1[5][3] = y;
+     testfac(t1);
+     //and last but not least we take h as additional input
+     testfac(t1,h);
+}
+//==================================================
+//Procedure facsubwa:
+//This procedure serves the purpose to compute a
+//factorization of a given polynomial in a ring, whose subring
+//is the first Weyl algebra. The polynomial must only contain
+//the two arguments, which are also given by the user.
+proc facsubwa(poly h, X, D)
+"USAGE:  facsubwa(h,x,y) - h is a polynomial in the first Weyl algebra, X and D are the variables in h, which have the commutation rule DX = XD + 1@*
+RETURN: list@*
+PURPOSE: Given a polynomial in a Ring, which contains the first Weyl algebra as a subring. Furthermore let this polynomial be in the first Weyl algebra with the variables X and D with DX = XD +1.@*
+THEORY: @code{facsubwa} computes some factorizations of the given polynomial, which is a polynomial in the variables X and D@*
+EXAMPLE: example facsubwa; shows examples
+SEE ALSO: facfirstwa
+"{//proc facsubwa
+     if(!isWeyl())
+     {
+	  return(list());
+     }
+     def r = basering;
+     //We begin to check the input
+     if (size(X)>1)
+     {
+	  return(list());
+     }
+     if (size(D)>1)
+     {
+	  return(list());
+     }
+     intvec lexpofX = leadexp(X);
+     intvec lexpofD = leadexp(D);
+     if (sum(lexpofX)!=1)
+     {
+	  return(list());
+     }
+     if (sum(lexpofD)!=1)
+     {
+	  return(list());
+     }
+     int varnumX=1;
+     int varnumD=1;
+     while(lexpofX[varnumX] != 1)
+     {
+	  varnumX++;
+     }
+     while(lexpofD[varnumD] != 1)
+     {
+	  varnumD++;
+     }
+     lexpofX = lexpofX +1;
+     lexpofX[varnumX] = 0;
+     lexpofX[varnumD] = 0;
+     if (deg(h,lexpofX)!=0)
+     {
+	  return(list());
+     }
+     //Input successfully checked
+     ring firstweyl = 0,(var(varnumX),var(varnumD)),dp;
+     def Firstweyl = nc_algebra(1,1);
+     setring Firstweyl;
+     poly h = imap(r,h);
+     list result = facfirstwa(h);
+     setring r;
+     list result = imap(Firstweyl,result);
+     return(result);
+}//proc facsubwa
+example
+{
+     "EXAMPLE:";echo=2;
+     ring R = 0,(x,y),Ws(-1,1);
+     def r = nc_algebra(1,1);
+     setring(r);
+     poly h = (x^2*y^2+x)*x;
+     facsubwa(h,x,y);
+}
+//==================================================
 /*
 Example polynomials where one can find factorizations
