
7.10.4.4 lpDivision
Procedure from library freegb.lib (see freegb_lib).
 Usage:
 lpDivision(p,G); poly p, ideal G
 Purpose:
 compute a twosided division with remainder of p wrt G; twosided noncommutative analogue of the procedure division
 Assume:
 G = {g1,...,gN} is a Groebner basis, the original ring of the Letterplace ring has the name 'r' and no variable is called 'tag_i' for i in 1...N
 Return:
 list L
 Note:
  L[1] is NF(p,I)
 L[2] is the list of expressions [i,l_(ij),r_(ij)] with \sum_(i,j) l_(ij) g_i r_(ij) = p  NF(p,I)
 procedure lpGBPres2Poly, applied to L, reconstructs p
Example:
 LIB "freegb.lib";
ring r = 0,(x,y),dp;
def R = freeAlgebra(r, 4); setring R;
ideal I = x*x + y*y  1; // 2D sphere
ideal J = letplaceGBasis(I); // compute a Letterplace Groebner basis
J; // it is finite and nice
==> J[1]=x*x+y*y1
==> J[2]=y*y*xx*y*y
poly h = x*x*yy*x*x+x*y;
lpDivision(h,J); // what means that the NF of h wrt J is x*y
==> [1]:
==> x*y
==> [2]:
==> [1]:
==> [1]:
==> 1
==> [2]:
==> 1
==> [3]:
==> y
==> [2]:
==> [1]:
==> 1
==> [2]:
==> y
==> [3]:
==> 1
h  lpNF(h,J); // and this poly has the folowing twosided Groebner presentation:
==> y*x*x+x*x*y
y*J[1] + J[1]*y;
==> y*x*x+x*x*y

