  
  [1X3 [33X[0;0YCommutative Involutive Bases[133X[101X
  
  [33X[0;0YGiven  a  Gröbner  Basis  [22XG[122X  for  an  ideal  [22XJ[122X over a polynomial ring [22XR[122X, the
  remainder of any polynomial [22Xp ∈ R[122X with respect to [22XG[122X is unique. Although this
  remainder is unique, there may be many ways of finding it, as it is possible
  that several polynomials in [22XG[122X divide [22Xp[122X, each giving a [13Xreduction path[113X for [22Xp[122X.[133X
  
  
  [1X3.1 [33X[0;0YReduction Paths[133X[101X
  
  
  [1X3.1-1 [33X[0;0YAn Example[133X[101X
  
  [33X[0;0YConsider  the  DegLex  Gröbner  basis  [22XG  := {g_1, g_2, g_3} = {a^2-2ab+3, :
  2ab+b^2+5,  :  frac54b^3-frac52a+frac374b}[122X  over the polynomial ring [22XQ[a,b][122X,
  and  consider  the  polynomial  [22Xp  :=  a^2b+b^3+8b[122X.  The remainder of [22Xp[122X with
  respect to [22XG[122X is [22X0[122X (so that [22Xp[122X is a member of the ideal [22XJ[122X generated by [22XG[122X), but
  there  are  two  ways of obtaining this remainder, as shown in the following
  diagram.[133X
  
  
  [24X[33X[0;6Y\vcenter{\xymatrix{    &    a^2b+b^3+8b   \ar[dl]_{g_1}   \ar[dr]^{g_2}   \\
  2ab^2+b^3+5b  \ar[d]_{g_2}  &&  -\frac{1}{2}ab^2  +  b^3  -  \frac{5}{2}a+8b
  \ar[d]^{g_2}  \\ 0 && \frac{5}{4}b^3-\frac{5}{2}a+\frac{37}{4}b \ar[d]^{g_3}
  \\ && 0 }}[133X
  
  [124X
  
  [33X[0;0YAn  [13XInvolutive  Basis[113X for [22XJ[122X is a Gröbner Basis [22XG[122X such that there is only [13Xone[113X
  possible  reduction  path  for any polynomial [22Xp ∈ R[122X. In order to find such a
  basis,  we  restrict  which  reductions  or  divisions  may  take  place  by
  requiring,  for  each  potential reduction of a polynomial [22Xp[122X by a polynomial
  [22Xg_i  ∈  G[122X  (so  that  [22XLM(p)  =  LM(g_i)×  u[122X for some monomial [22Xu[122X), some extra
  conditions  on the variables in [22Xu[122X to be satisfied, namely that all variables
  in  [22Xu[122X have to be in a set of [13Xmultiplicative variables[113X for [22Xg_i[122X, a set that is
  determined by a particular choice of an [13Xinvolutive division[113X.[133X
  
  
  [1X3.2 [33X[0;0YCommutative Involutive Divisions[133X[101X
  
  [33X[0;0YRecall  that  a commutative monomial [22Xu[122X is divisible by another monomial [22Xw[122X if
  there  exists a third monomial [22Xu'[122X such that [22Xu = wu'[122X. We use the notation [22Xw ∣
  u[122X  and  refer  to [22Xw[122X as a [13Xconventional[113X divisor of [22Xu[122X. An involutive division [22XI[122X
  partitions  the variables in the polynomial ring into sets of [13Xmultiplicative[113X
  and   [13Xnonmultiplicative[113X   variables   for   each   polynomial.  The  set  of
  multiplicative variables for [22Xw[122X is denoted by [22XM_I(w)[122X. Then [22Xw[122X is an [13Xinvolutive
  divisor[113X of [22Xu[122X, written [22Xw ∣_I u[122X, if all variables in [22Xu'[122X are in [22XM_I(w)[122X.[133X
  
  
  [1X3.2-1 [33X[0;0YExample[133X[101X
  
  [33X[0;0YLet  [22Xu  :=  ab^3c[122X,  [22Xv  :=  abc^3[122X  and  [22Xw  :=  bc[122X be three monomials over the
  polynomial  ring  [22XR  := Q[a,b,c][122X. Let an involutive division [22XI[122X partition the
  variables  in [22XR[122X into the following two sets of variables for the monomial [22Xw[122X:
  multiplicative  =  [22X{a,b}[122X;  nonmultiplicative  =  [22X{c}[122X.  It  is  true  that  [22Xw[122X
  conventionally  divides  both  monomials  [22Xu[122X  and  [22Xv[122X, but [22Xw[122X only involutively
  divides  monomial  [22Xu[122X as, defining [22Xu' := ab^2[122X and [22Xv' := ac^2[122X (so that [22Xu = wu'[122X
  and  [22Xv  =  wv'[122X),  we observe that all variables in [22Xu'[122X are in [22XM_I(w)[122X, but the
  variables  in  [22Xv'[122X (in particular the variable [22Xc[122X) are not all in [22XM_I(w)[122X. So [22Xw
  ∣_I u[122X and [22Xw ∤_I v[122X.[133X
  
  
  [1X3.2-2 [33X[0;0YSelecting a Division[133X[101X
  
  [33X[0;0YThe  global  variable  [10XCommutativeDivision[110X is a string which can take values
  "Pommaret",  "Thomas"  or  "Janet".  The  default is "Pommaret". The example
  shows how to select the Pommaret division.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XCommutativeDivision := "Pommaret";[127X[104X
    [4X[28X"Pommaret"[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X3.2-3 [33X[0;0YSelecting an Ordering[133X[101X
  
  [33X[0;0YThese  three  divisions  are  defined  for  a set of monomials, but we shall
  define  a  [10XDivisionRecord[110X  below for a set of polynomials. The first step is
  therefore  to  select  the  leading  monomials  from this set, and that will
  bepend  of  the [13Xordering[113X chosen. We shall be using the orderings provided by
  the main [5XGAP[105X library as described in [14X2.3[114X.[133X
  
  [33X[0;0YWhen   calling   [10XMonomialLexOrdering[110X,   [10XMonomialGrlexOrdering[110X  etc.,  it  is
  essential  to  provide  a  list  of indeterminates, as shown in the example.
  Otherwise some of the functions in this package will throw an error.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XR := PolynomialRing( Rationals, [ "x", "y", "z" ] );;[127X[104X
    [4X[25Xgap>[125X [27Xx := R.1;; y := R.2;; z := R.3;;[127X[104X
    [4X[25Xgap>[125X [27Xord := MonomialLexOrdering( [x,y,z] );;[127X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X3.2-4 PommaretDivision[101X
  
  [33X[1;0Y[29X[2XPommaretDivision[102X( [3Xalg[103X, [3Xmons[103X, [3Xorder[103X ) [32X operation[133X
  
  [33X[0;0YLet [22XR = F[a_1,...,a_n][122X with [22Xa_1 > a_2 > ... > a_n[122X, and let [22Xw[122X be a polynomial
  in  [22XR[122X  with  leading  monomoial  [22Xa_1^e_1a_2^e_2 ... a_n^e_n[122X where [22Xe_i[122X is the
  [13Xfirst[113X  non-zero  exponent. The Pommaret involutive division [22XP[122X sets [22XM_P}(w) =
  {a_1, a_2, ..., a_i}[122X.[133X
  
  [33X[0;0YBecause [22XM_P}(w)[122X does not depend in any way on the other leading monomials in
  [13Xpolys[113X, this is a [13Xglobal[113X division.[133X
  
  [33X[0;0YIn  the  example  the first five monomials [22Xu_i[122X in [22XU[122X contain a power of [22Xx[122X, so
  [22XM_P}(u_i)  =  {x}[122X.  Then  [22Xu_6[122X  involves  [22Xy[122X  and [22Xz[122X, so [22XM_P}(u_6) = {x,y}[122X, and
  similarly [22XM_P}(u_7) = {x,y,z}[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XU := [ x^5*y^2*z, x^4*y*z^2, x^2*y^2*z, x*y*z^3, x*z^3, y^2*z, z ];[127X[104X
    [4X[28X[ x^5*y^2*z, x^4*y*z^2, x^2*y^2*z, x*y*z^3, x*z^3, y^2*z, z ][128X[104X
    [4X[25Xgap>[125X [27XPommaretDivision( R, U, ord );[127X[104X
    [4X[28X[ [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1, 2 ], [ 1 .. 3 ] ][128X[104X
    [4X[28X[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X3.2-5 ThomasDivision[101X
  
  [33X[1;0Y[29X[2XThomasDivision[102X( [3Xalg[103X, [3Xmons[103X, [3Xorder[103X ) [32X operation[133X
  
  [33X[0;0YLet  [22XR  =  F[a_1,...,a_n][122X  with [22Xa_1 > a_2 > ... > a_n[122X, and let [22XP[122X be a set of
  polynomials  [22XP = {p_1,...,p_m}[122X in [22XR[122X with leading monomials [22XU = {u_1,...,u_m}[122X
  where [22Xu_i = a_1^e^1_ia_2^e^2_i ... a_n^e^n_i[122X. The Thomas involutive division
  [22XT[122X  sets  [22Xa_i[122X to be multiplicative for [22Xp_j[122X and [22Xu_j[122X if [22Xe^i_j = max_k e^i_k[122X for
  all [22X1 leqslant k leqslant m[122X.[133X
  
  [33X[0;0YIn  the  example,  using  the  same  seven  monomials, the highest powers of
  [22X[x,y,z][122X  are [22X[5,2,3][122X respectively. So [22Xx[122X is multiplicative only for [22Xu_1[122X, [22Xy[122X is
  multiplicative  for  [22X{u_1,u_3,u_6}[122X, and [22Xz[122X is multiplicative only for [22Xu_4[122X and
  [22Xu_5[122X. Note that two of the monomials have no multiplicative variable.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XThomasDivision( R, U, ord );[127X[104X
    [4X[28X[ [ 1, 2 ], [  ], [ 2 ], [ 3 ], [ 3 ], [ 2 ], [  ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X3.2-6 JanetDivision[101X
  
  [33X[1;0Y[29X[2XJanetDivision[102X( [3Xalg[103X, [3Xmons[103X, [3Xorder[103X ) [32X operation[133X
  
  [33X[0;0YLet  [22XR  =  F[a_1,...,a_n][122X  with [22Xa_1 > a_2 > ... > a_n[122X, and let [22XP[122X be a set of
  polynomials  [22XP = {p_1,...,p_m}[122X in [22XR[122X with leading monomials [22XU = {u_1,...,u_m}[122X
  where  [22Xu_i = a_1^e^1_ia_2^e^2_i ... a_n^e^n_i[122X. The Janet involutive division
  [22XJ[122X sets [22Xa_n[122X to be multiplicative for [22Xu_j[122X provided [22Xe^n_j = max_k e^n_k[122X for all
  [22X1 leqslant k leqslant m[122X. To determine whether [22Xa_i[122X is multiplicative for [22Xu_j[122X,
  let  [22XL  =  [e^i+1_j,e^i+2_j,...,e^n_j][122X.  Let  [22XS[122X  be  the subset of [22X{1,...,m}[122X
  containing  those  [22Xk[122X  such that [22X[e^i+1_k,e^i+2_k,...,e^n_k] = L[122X. Then [22Xa_i[122X is
  multiplicative for [22Xu_j[122X provided [22Xe^i_j = max_k ∈ Se^i_k[122X.[133X
  
  [33X[0;0YIn the example, recall that the exponent lists for the seven monomials are[133X
  
  
  [24X[33X[0;6Y[5,2,1],~~~  [4,1,2],~~~  [2,2,1],~~~  [1,1,3],~~~  [1,0,3],~~~  [0,2,1],~~~
  [0,0,1].[133X
  
  [124X
  
  [33X[0;0YAs  with  the  Thomas division, [22Xmax_k e^3_k = 3[122X and [22Xz[122X is multiplicative only
  for [22Xu_4[122X and [22Xu_5[122X.[133X
  
  [33X[0;0YFor  [22Xy[122X,  [22XL  =  [1][122X  when  [22Xk ∈ {1,3,6,7}[122X and [22Xmax_{1,3,6,7} e^2_k = 2[122X, so [22Xy[122X is
  multiplicative  for [22Xu_1, u_3[122X and [22Xu_6[122X, but not for [22Xu_7[122X. [22XL = [2][122X only for [22Xu_2[122X,
  so  [22Xy[122X is multiplicative for [22Xu_2[122X. [22XL = [3][122X for [22Xu_4[122X and [22Xu_5[122X, and [22Xe^2_4 > e^2_5[122X,
  so [22Xy[122X is multiplicative for [22Xu_4[122X but not [22Xu_5[122X.[133X
  
  [33X[0;0YFor  [22Xx[122X,  [22XL  =  [2,1][122X for [22Xk ∈ {1,3,6}[122X and [22Xe^1_1 = 5[122X is greater than [22Xe^1_3[122X and
  [22Xe^1_6[122X, so [22Xx[122X is multiplicative for [22Xu_1[122X. The other values for [22XL[122X, namely [22X[1,2],
  [1,3],  [0,3][122X  and  [22X[0,1][122X,  occur just once each, so [22Xx[122X is multiplicative for
  [22Xu_2, u_4, u_5[122X and [22Xu_7[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XJanetDivision( R, U, ord );[127X[104X
    [4X[28X[ [ 1, 2 ], [ 1, 2 ], [ 2 ], [ 1, 2, 3 ], [ 1, 3 ], [ 2 ], [ 1 ] ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X3.2-7 DivisionRecord[101X
  
  [33X[1;0Y[29X[2XDivisionRecord[102X( [3Xalg[103X, [3Xpolys[103X, [3Xorder[103X ) [32X function[133X
  [33X[1;0Y[29X[2XDivisionRecordCP[102X( [3Xalg[103X, [3Xpolys[103X, [3Xorder[103X ) [32X operation[133X
  
  [33X[0;0YThe   global   function   [10XDivisionRecord[110X   calls   one   of  the  operations
  [10XDivisionRecordCP[110X  and  [10XDivisionRecordNP[110X, depending on whether the algebra is
  commutative or not. In the commutative case, this function finds the sets of
  multiplicative  variables  for  a  set  of  polynomials  using  one  of  the
  involutive  divisions listed above. The record constructed has three fields:
  the  chosen  division;  a  list  of lists of positions of the multiplicative
  variables; and the set of polynomials.[133X
  
  [33X[0;0YIn the following example, polynomials [22X{u = b^3-3a, v=a^3-3b}[122X define an ideal
  and  form  a  Gröbner  basis  for  that  ideal. Using the Pommaret division,
  [22XM_P}(u)  =  {a,b}[122X and [22XM_P}(v) = {a}[122X. The variable [10Xdrec2.mvars[110X in the listing
  below contains the [13Xpositions[113X of these variables in the generating set [22X{a,b}[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XR := PolynomialRing( Rationals, [ "a", "b" ] );;[127X[104X
    [4X[25Xgap>[125X [27Xa := R.1;; b := R.2;;[127X[104X
    [4X[25Xgap>[125X [27XL2 := [ b^3 - 3*a, a^3 - 3*b ];;[127X[104X
    [4X[25Xgap>[125X [27Xord := MonomialGrlexOrdering( [a,b] );;[127X[104X
    [4X[25Xgap>[125X [27XGB2 := ReducedGroebnerBasis( L2, ord );;[127X[104X
    [4X[25Xgap>[125X [27XGB2 = L2;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XCommutativeDivision := "Pommaret";;[127X[104X
    [4X[25Xgap>[125X [27Xdrec2 := DivisionRecordCP( R, L2, ord );[127X[104X
    [4X[28Xrec( div := "Pommaret", mvars := [ [ 1, 2 ], [ 1 ] ], [128X[104X
    [4X[28X  polys := [ b^3-3*a, a^3-3*b ] )[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YIn  the  [13Xreduction  diagrams[113X  below  the nodes [22X(j,k)[122X represent the monomials
  [22Xa^jb^k[122X.  The lead monomials of [22Xu[122X and [22Xv[122X are marked by these two names. In the
  left  hand  diagram  the two shaded areas indicate those monomials which are
  conventionally  reducible  by  [22Xu[122X  and  by  [22Xv[122X, so that the doubly shaded area
  contains  those monomials which are conventionally reducible by both. For an
  involutive division, this must be avoided.[133X
  
  [33X[0;0YIn the right-hand diagram we see that [22Xu[122X involutively divides the same set of
  monomials  in  the  main  shaded area. On the other hand [22Xv[122X just involutively
  divides  monomials [22X{a^j ∣ j ≥ 3}[122X. So none of the monomials [22X{a^jb, a^jb^2 ∣ j
  ≥  3}[122X  reduce  by  [22Xv[122X  involutively.  The  operation  [10XInvolutiveBasis[110X,  to be
  described  below,  produces  two further polynomials, [22Xw = vb = a^3b-3b^2[122X and
  [22Xvb^2[122X which reduces by [22Xu[122X to [22Xx = a^3b^2 - 9a[122X. Both [22Xw[122X and [22Xx[122X have multiplicative
  variables  [22X{a}[122X  and  the  monomials  which  they  can  reduce lie on the two
  horizantal  line  segments  in  the right-hand diagram. In this way, all the
  conventionally reducible monomials are involutively reducible by just one of
  [22X{u,v,w,x}[122X.[133X
  
  
  [24X[33X[0;6Y\vcenter{\xymatrix@=1em{  b  &  &  &  \ar@{-}[ddddrrrr]  & \ar@{-}[dddrrr] &
  \ar@{-}[ddrr]  & \ar@{-}[dr] & & & & b & & & & & & & \\ : \ar[u] \ar@{-}[ur]
  &  \cdot & \cdot & \cdot \ar@{-}[ddddrrrr] & \cdot & \cdot & \cdot & & & & :
  \ar[u]  \ar@{-}[ur]  &  \cdot & \cdot & \cdot & \cdot & \cdot & \cdot & \\ 5
  \ar@{-}[u] \ar@{-}[uurr] & \cdot & \cdot & \cdot \ar@{-}[ddddrrrr] & \cdot &
  \cdot  &  \cdot & & & & 5 \ar@{-}[u] \ar@{-}[uurr] & \cdot & \cdot & \cdot &
  \cdot  &  \cdot  & \cdot & \\ 4 \ar@{-}[u] \ar@{-}[uuurrr] & \cdot & \cdot &
  \cdot  \ar@{-}[ddddrrrr]  &  \cdot  &  \cdot  &  \cdot  & & & & 4 \ar@{-}[u]
  \ar@{-}[uuurrr]  &  \cdot  &  \cdot  &  \cdot & \cdot & \cdot & \cdot & \\ u
  \ar@{-}[u]  \ar@{-}[rrrrrrr]  \ar@{-}[uuuurrrr]  & \cdot \ar@{-}[uuuurrrr] &
  \cdot  \ar@{-}[uuuurrrr]  &  \cdot \ar@{-}[dddrrr] \ar@{-}[uuuurrrr] & \cdot
  \ar@{-}[uuurrr]  &  \cdot  \ar@{-}[uurr]  &  \cdot  \ar@{-}[ur]  &  &  & & u
  \ar@{-}[u]  \ar@{-}[rrrrrrr]  \ar@{-}[uuuurrrr]  & \cdot \ar@{-}[uuuurrrr] &
  \cdot  \ar@{-}[uuuurrrr] & \cdot \ar@{-}[uuuurrrr] & \cdot \ar@{-}[uuurrr] &
  \cdot  \ar@{-}[uurr] & \cdot \ar@{-}[ur] & & \\ 2 \ar@{-}[u] & \cdot & \cdot
  & \cdot \ar@{-}[ddrr] & \cdot & \cdot & \cdot & & & & 2 \ar@{-}[u] & \cdot &
  \cdot  &  x \ar@{-}[rrrr]& \cdot & \cdot & \cdot & \\ 1 \ar@{-}[u] & \cdot &
  \cdot  &  \cdot  \ar@{-}[dr]  & \cdot & \cdot & \cdot & & & & 1 \ar@{-}[u] &
  \cdot  &  \cdot  &  w  \ar@{-}[rrrr]  &  \cdot  &  \cdot  &  \cdot  &  \\  0
  \ar@{-}[r]\ar@{-}[u]   &   1  \ar@{-}[r]  &  2  \ar@{-}[r]  &  v  \ar@{-}[r]
  \ar@{-}[uuuuuuu]  &  4 \ar@{-}[r] & 5 \ar@{-}[r] & \cdots \ar[r] & a & & & 0
  \ar@{-}[r]\ar@{-}[u]  &  1  \ar@{-}[r]  &  2  \ar@{-}[r]  & v \ar@{-}[r] & 4
  \ar@{-}[r] & 5 \ar@{-}[r] & \cdots \ar[r] & a }}[133X
  
  [124X
  
  [33X[0;0YThe polynomial [22Xp = a^3b^3 + 2a^3b + 3ab^3[122X reduces involutively as follows.[133X
  
  
  [24X[33X[0;6Yp     \stackrel{u}{\longrightarrow}     3a^4     +     2a^3b     +     3ab^3
  \stackrel{v}{\longrightarrow}       2a^3b       +      3ab^3      +      9ab
  \stackrel{w}{\longrightarrow}       3ab^3       +       9ab      +      6b^2
  \stackrel{u}{\longrightarrow} 9a^2 + 9ab + 6b^2[133X
  
  [124X
  
  [33X[0;0YThis reduction is computed in section [14X3.3-2[114X.[133X
  
  [1X3.2-8 IPolyReduce[101X
  
  [33X[1;0Y[29X[2XIPolyReduce[102X( [3Xalgebra[103X, [3Xpolynomial[103X, [3XDivisionRecord[103X, [3Xorder[103X ) [32X function[133X
  [33X[1;0Y[29X[2XIPolyReduceCP[102X( [3Xalgebra[103X, [3Xpolynomial[103X, [3XDivisionRecord[103X, [3Xorder[103X ) [32X operation[133X
  
  [33X[0;0YThe  global  function  [10XIPolyReduce[110X calls one of the operations [10XIPolyReduceCP[110X
  and  [10XIPolyReduceNP[110X  depending  on whether the algebra is commutative or not.
  This  function reduces a polynomial [22Xp[122X using the current overlap record for a
  basis, and an ordering.[133X
  
  [33X[0;0YIn the example, using [10Xdrec2[110X, the polynomial [22Xp[122X reduces only to [22X2a^3b+9a^2+9ab[122X[133X
  
  
  [24X[33X[0;6Yp     \stackrel{u}{\longrightarrow}     3a^4     +     2a^3b     +     3ab^3
  \stackrel{v}{\longrightarrow}       2a^3b       +      3ab^3      +      9ab
  \stackrel{u}{\longrightarrow} 2a^3b + 9a^2 + 9ab[133X
  
  [124X
  
  [33X[0;0Ybecause the polynomial [22Xx[122X is not available to reduce [22X2a^3b[122X to [22X6b^2[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xp := a^3*b^3 + 2*a^3*b + 3*a*b^3;;[127X[104X
    [4X[25Xgap>[125X [27Xq := IPolyReduce( R, p, drec2, ord );[127X[104X
    [4X[28X2*a^3*b+9*a^2+9*a*b[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X3.2-9 LoggedIPolyReduce[101X
  
  [33X[1;0Y[29X[2XLoggedIPolyReduce[102X( [3Xalgebra[103X, [3Xpolynomial[103X, [3XDivisionRecord[103X, [3Xorder[103X ) [32X function[133X
  [33X[1;0Y[29X[2XLoggedIPolyReduceCP[102X( [3Xalgebra[103X, [3Xpolynomial[103X, [3XDivisionRecord[103X, [3Xorder[103X ) [32X operation[133X
  
  [33X[0;0YThe   global   function   [10XLoggedIPolyReduce[110X  calls  one  of  the  operations
  [10XLoggedIPolyReduceCP[110X and [10XLoggedIPolyReduceNP[110X depending on whether the algebra
  is  commutative  or not. This function is similar to [10XIPolyReduce[110X, reducing a
  polynomial  [22Xp[122X using the current overlap record for a basis, and an ordering.
  It's  output,  however,  is  a  record  containing,  as  well as the reduced
  polynomial  [22Xr[122X,  logging  information  which shows how the reduction has been
  obtained:[133X
  
  
  [24X[33X[0;6Yp ~=~ r + \sum_i logs[i] * polys[i].[133X
  
  [124X
  
  [33X[0;0YIn  the example [10Xr.result[110X is equal to the previous result [22Xq[122X, and the equation
  above is verified:[133X
  
  
  [24X[33X[0;6Ya^3b^3 + 2a^3b + 3ab^3 ~=~ (2a^3b+9a^2+9ab) + (a^3+3a)(b^3-3a) + 3a(a^3-3b).[133X
  
  [124X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xr := LoggedIPolyReduceCP( R, p, drec2, ord );[127X[104X
    [4X[28Xrec( logs := [ a^3+3*a, 3*a ], polys := [ b^3-3*a, a^3-3*b ], [128X[104X
    [4X[28X  result := 2*a^3*b+9*a^2+9*a*b )[128X[104X
    [4X[25Xgap>[125X [27Xr.result = q;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xp = r.result + r.logs[1]*r.polys[1] + r.logs[2]*r.polys[2];[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [1X3.2-10 IAutoreduce[101X
  
  [33X[1;0Y[29X[2XIAutoreduce[102X( [3Xalg[103X, [3Xpolys[103X, [3Xorder[103X ) [32X function[133X
  [33X[1;0Y[29X[2XIAutoreduceCP[102X( [3Xalg[103X, [3Xpolys[103X, [3Xorder[103X ) [32X operation[133X
  
  [33X[0;0YThe  global  function  [10XIAutoreduce[110X calls one of the operations [10XIAutoreduceCP[110X
  and  [10XIAutoreduceNP[110X  depending  on whether the algebra is commutative or not.
  This function applies [10XIPolyReduce[110X to a list of polynomials recursively until
  no   more   reductions   are  possible.  More  specifically,  this  function
  involutively  reduces  each  member of a list of polynomials with respect to
  all  the other members of the list, removing the polynomial from the list if
  it  reduces  involutively  to  [22X0[122X.  This  process  is  iterated until no more
  reductions are possible.[133X
  
  [33X[0;0YIf no reduction takes place, so that the result is equal to the initial list
  of polynomials, then [10Xtrue[110X is returned.[133X
  
  [33X[0;0YIn the example we form [10XL3[110X by adding [22Xp[122X to [10XL2[110X. On applying [10XIAutoreduceCP[110X, only
  [22Xp[122X  reduces, and the concatenation of [10XL2[110X with [22Xq[122X is returned. Starting with [10XL4
  = [u,v,w,x][110X, there are no reductions, and [10Xtrue[110X is returned.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XL3 := Concatenation( L2, [p] );;[127X[104X
    [4X[25Xgap>[125X [27XIAutoreduceCP( R, L3, ord );[127X[104X
    [4X[28X[ b^3-3*a, a^3-3*b, 2*a^3*b+9*a^2+9*a*b ][128X[104X
    [4X[25Xgap>[125X [27XL4 := Concatenation( L2, [ a^3*b-3*b^2, a^3*b^2-9*a ] );;[127X[104X
    [4X[25Xgap>[125X [27XIAutoreduceCP( R, L4, ord );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X3.3 [33X[0;0YComputing a Commutative Involutive Basis[133X[101X
  
  [33X[0;0YThe   involutive   algorithm  for  constructing  an  involutive  basis  uses
  [13Xprolongations[113X and [13Xautoreduction[113X.[133X
  
  
  [1X3.3-1 [33X[0;0YProlongations and Autoreduction[133X[101X
  
  [33X[0;0YGiven  a  set  of  polynomials  [22XP[122X, a [13Xprolongation[113X of [22Xp ∈ P[122X is a product [22Xpa_i[122X
  where  the  generator  [22Xa_i[122X is [13Xnot[113X multiplicative with respect to the current
  involutive division.[133X
  
  [33X[0;0YA  set  of  polynomials  [22XP[122X  is said to be [13Xautoreduced[113X if no polynomial [22Xp ∈ P[122X
  contains  a term which is involutively divisible by some polynomial [22Xp' ∈ P ∖
  {p}[122X.[133X
  
  [33X[0;0YWe  denote  by  [22Xrem_I(p,Q)[122X  the  involutive  remainder  of polynomial [22Xp[122X with
  respect  to  a  set  of polynomials [22XQ[122X. Here is the [13XCommutative Autoreduction
  Algorithm[113X:[133X
  
  [4X[32X[104X
    [4XInput: a set of polynomials P = {p_1,p_2,...,p_n} and an involutive division I [104X
    [4X  while there exists p_i in P such that rem_I(p_i, P\{p_i}) <> p_i do[104X
    [4X    q := Rem_I(p_i, P\{p_i});[104X
    [4X    P := P\{p_i};[104X
    [4X    if (q<>0) then[104X
    [4X      P := P union {q};[104X
    [4X    fi;[104X
    [4X  od;[104X
    [4X  return P;[104X
  [4X[32X[104X
  
  [33X[0;0YIt can be shown that if [22XP[122X is a set of polynomials over a polynomial ring [22XR =
  F[a_1,...,a_n][122X,  such  that  [22XP[122X  is autoreduced with respect to an involutive
  division  [22XI[122X,  and  if  [22Xp,q[122X  are  two  polynomials  in  [22XR[122X,  then [22Xrem_I(p,P) +
  rem_I(q,P) = rem_I(p+q,P)[122X.[133X
  
  [33X[0;0YGiven  an  involutive  division  [22XI[122X and an admissible monomial ordering [22XO[122X, an
  autoreduced  set of polynomials [22XP[122X is a [13Xlocally involutive basis[113X with respect
  to  [22XI[122X  and [22XO[122X if any prolongation of any [22Xp_i ∈ P[122X involutively reduces to zero
  using  [22XP[122X.  Further,  [22XP[122X is an [13Xinvolutive basis[113X with respect to [22XI[122X and [22XO[122X if any
  multiple  [22Xp_it[122X  of  any  [22Xp_i  ∈ P[122X by any term [22Xt[122X involutively reduces to zero
  using [22XP[122X.[133X
  
  [33X[0;0YThe [13XCommutative Involutive Basis Algorithm[113X:[133X
  
  [4X[32X[104X
    [4XInput: a basis F = {f_1,f_2,...,f_m} for an ideal J [104X
    [4X       over a commutative polynomial ring R[a_1,...,a_n];[104X
    [4X       an admissible monomial ordering O; [104X
    [4X       a continuous and constructive involutive division I [104X
    [4XOutput: an involutive basis G = {g_1,g_2,...,g_k} for J (if it terminates)[104X
    [4X  G := { };[104X
    [4X  F := autoreduction of F with respect to O and I;[104X
    [4X  while G = { } do[104X
    [4X    P := set of all prolongations f_i*a_j, 1<=i<=m, 1<=j<=n;[104X
    [4X    q := 0;[104X
    [4X    while (P <> { }) and (q=0) do[104X
    [4X      p := a polynomial in P with minimal lead monomial w.r.t. O;[104X
    [4X      P := P \ {p};[104X
    [4X      q := rem_I(p,F);[104X
    [4X    od;[104X
    [4X    if (q <> 0) then  ## new basis element found[104X
    [4X      F := autoreduction of (F union {q})[104X
    [4X    else  ## all the prolongations have reduced to zero[104X
    [4X      G := F;[104X
    [4X    fi;[104X
    [4X  od;[104X
    [4X  return G;[104X
  [4X[32X[104X
  
  [1X3.3-2 InvolutiveBasis[101X
  
  [33X[1;0Y[29X[2XInvolutiveBasis[102X( [3Xalg[103X, [3Xpolys[103X, [3Xorder[103X ) [32X function[133X
  [33X[1;0Y[29X[2XInvolutiveBasisCP[102X( [3Xalg[103X, [3Xpolys[103X, [3Xorder[103X ) [32X operation[133X
  
  [33X[0;0YThe   global   function   [10XInvolutiveBasis[110X   calls   one  of  the  operations
  [10XInvolutiveBasisCP[110X  and [10XInvolutiveBasisNP[110X depending on whether the algebra is
  commutative  or  not.  This function finds an involutive basis for the ideal
  generated  by  a  set of polynomials, using a chosen ordering, and returns a
  division record.[133X
  
  [33X[0;0YAny  involutive  basis  returned  by  this algorithm is a Gröbner basis, and
  remainders are involutively unique with respect to this basis.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XibasP := InvolutiveBasis( R, L2, ord );[127X[104X
    [4X[28Xrec( div := "Pommaret", mvars := [ [ 1, 2 ], [ 1 ], [ 1 ], [ 1 ] ], [128X[104X
    [4X[28X  polys := [ b^3-3*a, a^3-3*b, a^3*b-3*b^2, a^3*b^2-9*a ] )[128X[104X
    [4X[25Xgap>[125X [27Xr := IPolyReduce( R, p, ibasP, ord );[127X[104X
    [4X[28X9*a^2+9*a*b+6*b^2[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YHere  we  have  returned  to  the  example  in  section [14X3.2-7[114X. Starting with
  [22XF={u,v}[122X, there is only one prolongation, [22XP={w=vb}[122X, and [22XF[122X becomes [22X{u,v,w}[122X. At
  the  second  iteration,  [22XP={vb,wb}[122X;  [22Xvb[122X  reduces  to  zero;  [22Xwb[122X  reduces  to
  [22Xx=a^3b^2-9a[122X;  and  [22XF[122X  becomes [22X{u,v,w,x}[122X. At the third iteration [22XP={vb,wb,xb}[122X
  and all three of these reduce to zero, so [22XG = F[122X is returned.[133X
  
  [33X[0;0YIt  is  then  shown  that  the  multiplicative  variables  for [22X{u,v,w,x}[122X are
  [22X{{a,b},{a},{a},{a}}[122X.[133X
  
  [33X[0;0YFinally, the full reduction [22Xr[122X of [22Xp[122X is computed.[133X
  
  [33X[0;0YIf, instead of the Pommaret division, we use Janet or Thomas we obtain:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XCommutativeDivision := "Janet";;[127X[104X
    [4X[25Xgap>[125X [27XibasJ := InvolutiveBasis( R, L2, ord );;[127X[104X
    [4X[25Xgap>[125X [27X( ibasJ.mvars = ibasP.mvars ) and ( ibasJ.polys = ibasP.polys );[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XCommutativeDivision := "Thomas";;[127X[104X
    [4X[25Xgap>[125X [27XibasT := InvolutiveBasis( R, L2, ord );[127X[104X
    [4X[28Xrec( div := "Thomas", [128X[104X
    [4X[28X  mvars := [ [ 2 ], [ 1 ], [ 2 ], [ 1 ], [ 2 ], [ 1 ], [ 1, 2 ] ], [128X[104X
    [4X[28X  polys := [ b^3-3*a, a^3-3*b, a*b^3-3*a^2, a^3*b-3*b^2, a^2*b^3-9*b, [128X[104X
    [4X[28X      a^3*b^2-9*a, a^3*b^3-9*a*b ] )[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe  Janet  division  gives  the  same involutive basis as Pommaret, but the
  Thomas Division produces [22X7[122X, rather than [22X4[122X polynomials:[133X
  
  
  [24X[33X[0;6Y[u,v,y,w,z,x,t] ~=~ [~ b^3-3a,\ a^3-3b,\ ab^3-3a^2,\ a^3b-3b^2,\ a^2b^3-9b,\
  a^3b^2-9a,\ a^3b^3-9ab ~].[133X
  
  [124X
  
  [33X[0;0YThe multiplicative variables for these polynomials are [22X[ {b}, {a}, {b}, {a},
  {b}, {a}, {a,b} ][122X, so the reduction diagram for the Thomas basis is:[133X
  
  
  [24X[33X[0;6Y\vcenter{\xymatrix@=1em{  b  &  &  & & & & & & \\ : \ar[u] & \cdot & \cdot &
  \cdot  \ar@{-}[ur]  &  \cdot  &  \cdot & \cdot & & \\ 5 \ar@{-}[u] & \cdot &
  \cdot  &  \cdot  \ar@{-}[uurr] & \cdot & \cdot & \cdot & & \\ 4 \ar@{-}[u] &
  \cdot  &  \cdot  &  \cdot  \ar@{-}[uuurrr]  & \cdot & \cdot & \cdot & & \\ u
  \ar@{-}[u]  &  y  \ar@{-}[uuuu]  &  z  \ar@{-}[uuuu]  &  t \ar@{-}[uuuurrrr]
  \ar@{-}[uuuu]  \ar@{-}[rrrr] & \cdot \ar@{-}[uuurrr] & \cdot \ar@{-}[uurr] &
  \cdot  \ar@{-}[ur]  &  & \\ 2 \ar@{-}[u] & \cdot & \cdot & x \ar@{-}[rrrr] &
  \cdot  & \cdot & \cdot & & \\ 1 \ar@{-}[u] & \cdot & \cdot & w \ar@{-}[rrrr]
  &  \cdot  &  \cdot  & \cdot & & \\ 0 \ar@{-}[r]\ar@{-}[u] & 1 \ar@{-}[r] & 2
  \ar@{-}[r]  & v \ar@{-}[r] & 4 \ar@{-}[r] & 5 \ar@{-}[r] & \cdots \ar[r] & a
  & }}[133X
  
  [124X
  
  [33X[0;0YThe reduction of [22Xp[122X with this basis is:[133X
  
  
  [24X[33X[0;6Yp = a^3b^3 + 2a^3b + 3ab^3 \stackrel{t}{\longrightarrow} 2a^3b + 3ab^3 + 9ab
  \stackrel{w}{\longrightarrow}       3ab^3       +       9ab      +      6b^2
  \stackrel{y}{\longrightarrow} 9a^2 + 9ab + 6b^2.[133X
  
  [124X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xr := LoggedIPolyReduceCP( R, p, ibasT, ord );[127X[104X
    [4X[28Xrec( logs := [ 0, 0, 3, 2, 0, 0, 1 ], [128X[104X
    [4X[28X  polys := [ b^3-3*a, a^3-3*b, a*b^3-3*a^2, a^3*b-3*b^2, a^2*b^3-9*b, [128X[104X
    [4X[28X      a^3*b^2-9*a, a^3*b^3-9*a*b ], result := 9*a^2+9*a*b+6*b^2 )[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X3.3-3 [33X[0;0YA more detailed example[133X[101X
  
  [33X[0;0YHere   we   consider  Example  4.5.2  in  the  thesis  [Eva05].  On  setting
  [10XInfoLevel(InfoIBNP)[110X   to   [10X1[110X  some  of  the  intermediate  calculations  are
  displayed. The setting of the problem is a rational polynomial ring in three
  variables  with  the  lex  ordering  [22X[x,y,z][122X,  using  the  Janet  involutive
  division.[133X
  
  [30X    [33X[0;6Ythe initial basis contains two polynomials [22X{a=x^2+y^3,~b=x+z^3}[122X[133X
  
  [30X    [33X[0;6Ythe reduced Gröbner basis is [22X{c=y^3+z^6,~b=x+z^3}[122X, and the irreducible
        monomials are [22X{z^k,~yz^k,~y^2z^k~|~ k geqslant 0}[122X[133X
  
  [30X    [33X[0;6Ywhen starting to calculate an involutive basis, the autoreduction does
        nothing because [22Xx[122X is not multiplicative for [22Xb[122X[133X
  
  [30X    [33X[0;6Ythe  only  prolongation is [22Xbx = x^2+xz^3[122X which reduces, on subtracting
        [22Xa+bz^3[122X and changing the sign, to [22Xc=y^3+z^6[122X[133X
  
  [30X    [33X[0;6Yon  restarting with basis [22X[c,b,a][122X, autoreduction replaces [22Xa[122X with [22Xa-c =
        d = x^2-z^6[122X[133X
  
  [30X    [33X[0;6Ythere are then [22X3[122X prolongations [22X[by,bx,dy][122X and [22Xbx[122X now reduces to zero[133X
  
  [30X    [33X[0;6Y[22Xby = e = xy+yz^3[122X is then added to the basis: [22X[c,b,e,d][122X[133X
  
  [30X    [33X[0;6Y[22Xdy = x^2y-yz^6[122X reduces to zero on adding [22Xe(-x+z^3)[122X[133X
  
  [30X    [33X[0;6Yon   restarting   with  basis  [22X[c,b,e,d][122X  there  are  [22X4[122X  prolongations
        [22X[by,ey,bx,dy][122X  and  of these only [22Xf = ey = xy^2+y^2z^3[122X does not reduce
        to zero[133X
  
  [30X    [33X[0;6Yrestarting    with    basis    [22X[c,b,e,f,d][122X,    the   [22X5[122X   prolongations
        [22X[by,ey,fy,bx,dy][122X all reduce to zero.[133X
  
  [30X    [33X[0;6Ynow  see  what  happens  when reducing [22Xp = x^7+y^7+z^7[122X using the basis
        [22X[c,b,e,f,d][122X[133X
  
  [30X    [33X[0;6Y[22Xx^7-dx^5  = x^5z^6[122X and [22Xx^5z^6 - dx^3z^6 = x^3z^12[122X and [22Xx^3z^12-dxz^12 =
        xz^18[122X and [22Xxz^18-bz^18=-z^21[122X[133X
  
  [30X    [33X[0;6Y[22Xy^7  -  cy^4  =  -y^4z^6[122X  and [22X-y^4z^6 + cyz^6 = yz^12[122X, so [22Xp[122X reduces to
        [22X-z^21 + yz^12 + z^7[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XSetInfoLevel( InfoIBNP, 1 );; [127X[104X
    [4X[25Xgap>[125X [27XCommutativeDivision := "Janet";;[127X[104X
    [4X[25Xgap>[125X [27XR3 := PolynomialRing( Rationals, [ "x", "y", "z" ] );;[127X[104X
    [4X[25Xgap>[125X [27Xx := R3.1;; y := R3.2;; z := R3.3;; [127X[104X
    [4X[25Xgap>[125X [27Xord3 := MonomialLexOrdering( [x,y,z] );;[127X[104X
    [4X[25Xgap>[125X [27XF := [ y^3 + x^2, z^3 + x ];;[127X[104X
    [4X[25Xgap>[125X [27Xgbas := GrobnerBasis( F, ord3 );[127X[104X
    [4X[28X[ y^3+x^2, z^3+x, -z^6-y^3 ][128X[104X
    [4X[25Xgap>[125X [27Xrgbas := ReducedGrobnerBasis( F, ord3 );[127X[104X
    [4X[28X[ z^6+y^3, z^3+x ][128X[104X
    [4X[25Xgap>[125X [27XibasF := InvolutiveBasisCP( R3, F, ord3 );[127X[104X
    [4X[28X#I  restarting with basis:[128X[104X
    [4X[28X[ z^3+x, y^3+x^2 ][128X[104X
    [4X[28X#I  division record for basis: rec([128X[104X
    [4X[28Xdiv := "Janet",[128X[104X
    [4X[28Xmvars := [ [ 2, 3 ], [ 1, 2, 3 ] ],[128X[104X
    [4X[28Xpolys := [ z^3+x, y^3+x^2 ] )[128X[104X
    [4X[28X#I  prolongations = [ x*z^3+x^2 ][128X[104X
    [4X[28X#I  restarting with basis:[128X[104X
    [4X[28X[ z^6+y^3, z^3+x, y^3+x^2 ][128X[104X
    [4X[28X#I  after autoreduction basis = [128X[104X
    [4X[28X[ z^6+y^3, z^3+x, -z^6+x^2 ][128X[104X
    [4X[28X#I  division record for basis: rec([128X[104X
    [4X[28Xdiv := "Janet",[128X[104X
    [4X[28Xmvars := [ [ 1, 2, 3 ], [ 3 ], [ 1, 3 ] ],[128X[104X
    [4X[28Xpolys := [ z^6+y^3, z^3+x, -z^6+x^2 ] )[128X[104X
    [4X[28X#I  prolongations = [ y*z^3+x*y, x*z^3+x^2, -y*z^6+x^2*y ][128X[104X
    [4X[28X#I  restarting with basis:[128X[104X
    [4X[28X[ z^6+y^3, z^3+x, y*z^3+x*y, -z^6+x^2 ][128X[104X
    [4X[28X#I  division record for basis: rec([128X[104X
    [4X[28Xdiv := "Janet",[128X[104X
    [4X[28Xmvars := [ [ 1, 2, 3 ], [ 3 ], [ 1, 3 ], [ 1, 3 ] ],[128X[104X
    [4X[28Xpolys := [ z^6+y^3, z^3+x, y*z^3+x*y, -z^6+x^2 ] )[128X[104X
    [4X[28X#I  prolongations = [ y*z^3+x*y, y^2*z^3+x*y^2, x*z^3+x^2, -y*z^6+x^2*y ][128X[104X
    [4X[28X#I  restarting with basis:[128X[104X
    [4X[28X[ z^6+y^3, z^3+x, y*z^3+x*y, y^2*z^3+x*y^2, -z^6+x^2 ][128X[104X
    [4X[28X#I  division record for basis: rec([128X[104X
    [4X[28Xdiv := "Janet",[128X[104X
    [4X[28Xmvars := [ [ 1, 2, 3 ], [ 3 ], [ 1, 3 ], [ 1, 3 ], [ 1, 3 ] ],[128X[104X
    [4X[28Xpolys := [ z^6+y^3, z^3+x, y*z^3+x*y, y^2*z^3+x*y^2, -z^6+x^2 ] )[128X[104X
    [4X[28X#I  prolongations = [ y*z^3+x*y, y^2*z^3+x*y^2, y^3*z^3+x*y^3, x*z^3+x^2, -y*z\[128X[104X
    [4X[28X^6+x^2*y ][128X[104X
    [4X[28Xrec( div := "Janet", [128X[104X
    [4X[28X  mvars := [ [ 1, 2, 3 ], [ 3 ], [ 1, 3 ], [ 1, 3 ], [ 1, 3 ] ], [128X[104X
    [4X[28X  polys := [ z^6+y^3, z^3+x, y*z^3+x*y, y^2*z^3+x*y^2, -z^6+x^2 ] )[128X[104X
    [4X[25Xgap>[125X [27X## now for a reduction - reset the info level:[127X[104X
    [4X[25Xgap>[125X [27XSetInfoLevel( InfoIBNP, 2 );; [127X[104X
    [4X[25Xgap>[125X [27Xp := x^7 + y^7 + z^7;;[127X[104X
    [4X[25Xgap>[125X [27XIPolyReduce( R3, p, ibasF, ord3 );[127X[104X
    [4X[28X#I  reduced to: x^5*z^6+y^7+z^7[128X[104X
    [4X[28X#I  reduced to: x^3*z^12+y^7+z^7[128X[104X
    [4X[28X#I  reduced to: x*z^18+y^7+z^7[128X[104X
    [4X[28X#I  reduced to: -z^21+y^7+z^7[128X[104X
    [4X[28X#I  reduced to: -z^21-y^4*z^6+z^7[128X[104X
    [4X[28X#I  reduced to: -z^21+y*z^12+z^7[128X[104X
    [4X[28X-z^21+y*z^12+z^7[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  
  [1X3.3-4 [33X[0;0YUsing homogeneous polynomials[133X[101X
  
  [33X[0;0YIf  the polynomials in an initial basis are not homogeneous then they may be
  made  homogeneous  by  introducing  an  additional  variable.  The resulting
  involutive  basis  will  contain  only  homogeneous polynomials. However, if
  these  are de-homogenised by setting the additional variable equal to [22X1[122X, the
  resulting basis may not be involutive.[133X
  
  [33X[0;0YApplying  this  to  the  previous  example,  the resulting basis contains [22X10[122X
  polynomials which include homogenised versions of [22X[c,b,e,f][122X, but not [22Xd[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XSetInfoLevel( InfoIBNP, 0 );[127X[104X
    [4X[25Xgap>[125X [27XR4 := PolynomialRing( Rationals, [ "x", "y", "z", "t" ] );;[127X[104X
    [4X[25Xgap>[125X [27Xx := R4.1;; y := R4.2;; z := R4.3;; t := R4.4;;[127X[104X
    [4X[25Xgap>[125X [27XH := [ x^2*t + y^3, x*t^2 + z^3 ];;[127X[104X
    [4X[25Xgap>[125X [27Xord4 := MonomialLexOrdering( [x,y,z,t] );;[127X[104X
    [4X[25Xgap>[125X [27XibasH := InvolutiveBasisCP( R4, H, ord4 );[127X[104X
    [4X[28Xrec( div := "Janet",[128X[104X
    [4X[28X  mvars := [ [ 1, 2, 3, 4 ], [ 1, 2, 3 ], [ 1, 3, 4 ], [ 1, 2, 3 ], [128X[104X
    [4X[28X      [ 1, 2, 3 ], [ 1, 3, 4 ], [ 1, 3, 4 ], [ 1, 2 ], [ 1, 2 ], [ 1, 2 ] ],[128X[104X
    [4X[28X  polys := [ y^3*t^3+z^6, x*t^2+z^3, x*t^3+z^3*t, x*z^3-y^3*t, [128X[104X
    [4X[28X      x*z^3*t-y^3*t^2, x*y*t^3+y*z^3*t, x*y^2*t^3+y^2*z^3*t, x^2*t+y^3, [128X[104X
    [4X[28X      x^2*z*t+y^3*z, x^2*z^2*t+y^3*z^2 ] )[128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
