#### 7.10.4.5 lpDivision

Procedure from library `freegb.lib` (see freegb_lib).

Usage:
  lpDivision(p,G); poly p, ideal G

Purpose:
  compute a two-sided division with remainder of p wrt G; two-sided 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;
    ring R = freeAlgebra(r, 4);
    ideal I = x*x + y*y - 1; // 2D sphere
    ideal J = twostd(I); // compute a two-sided Groebner basis
    J; // it is finite and nice
    ==> J[1]=x*x+y*y-1
    ==> J[2]=y*y*x-x*y*y
    poly h = x*x*y-y*x*x+x*y;
    list L = lpDivision(h,J); L; // 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 following two-sided Groebner presentation:
    ==> -y*x*x+x*x*y
    -y*J[1] + J[1]*y;
    ==> -y*x*x+x*x*y
    lpGBPres2Poly(L,J); // reconstructs the above automatically
    ==> -y*x*x+x*x*y+x*y

User manual for Singular version 4.4.1, 2025, generated by texi2html.