If
f is a matrix, and
g is a matrix or Gröbner basis, then
quotient(f,g) is an alternate notation for
f//g.
If either
f or
g is a ring element, then it is taken to be a scalar matrix acting on
H. If both are ring elements, then the result is also a ring element. If
g is a
MonomialIdeal, then it is taken to be the matrix of generators of
g. Finally, if
g is a
GroebnerBasis object, then the Gröbner basis as so far computed is used. In these latter two cases, no Gröbner bases will be computed.
The resulting matrix
h is such that
f - g*h is the reduction of
f modulo a Gröbner basis for the image of
g.
If the remainder
f - g*h is zero, then the quotient
f//g satisfies the equation
f === g * (f//g) and the quotient
g\\f satisfies the equation
f === g * (g\\f).
One common use is the following. If an ideal contains 1, then we may write 1 in terms of the generators of the ideal. First we make an ideal.
i1 : A = ZZ/101[x,y,z]
o1 = A
o1 : PolynomialRing
|
i2 : F = x^4 - y*z*(1-x)^2 - z - y^3
4 2 3
o2 = x - x y*z - y + 2x*y*z - y*z - z
o2 : A
|
i3 : I = ideal(F,diff(x,F),diff(y,F),diff(z,F))
4 2 3 3 2
o3 = ideal (x - x y*z - y + 2x*y*z - y*z - z, 4x - 2x*y*z + 2y*z, - x z -
------------------------------------------------------------------------
2 2
3y + 2x*z - z, - x y + 2x*y - y - 1)
o3 : Ideal of A
|
Transposing the (row) matrix of generators of the ideal puts the generators on separate lines and shows the degrees.
i4 : transpose gens I
o4 = {-4} | x4-x2yz-y3+2xyz-yz-z |
{-3} | 4x3-2xyz+2yz |
{-3} | -x2z-3y2+2xz-z |
{-3} | -x2y+2xy-y-1 |
4 1
o4 : Matrix A <--- A
|
Next we test whether 1 is in the ideal.
We see that 1 is in the ideal. Now we represent 1 in terms of the generators of
I.
i6 : h = 1 // gens I
o6 = {4} | 44x2y2+43x3z+42x2yz-30x3-26x2y-11xy2+21x2z-7xyz+30x2+15xy-36y2+42x
{3} | -11x3y2-36x4z+40x3yz-43x4-44x3y+9x2y2+20x3z+27x2yz+43x3-29x2y+22xy
{3} | 19x2y3-48x3yz-14x2y2z+10x3y-25x2y2-30xy3-7x2yz+36xy2z-10x2y-5xy2+1
{3} | -41x2y2z-24x3z2-7x2yz2+25x3y+5x3z+38x2yz+45xy2z+18x2z2+39xyz2+x2y-
------------------------------------------------------------------------
z+37yz-2x+2y+9z+31 |
2+40x2z+40xyz-50x2+50xy-20y2-28xz-6yz-33x-19y-47z |
2y3-14xyz-46y2z-2x2-33xy+33y2-19xz-3yz+35x-44y+24z-34 |
25x2z+35xyz-16y2z+25xz2-3yz2-2xy+8yz-33z2+y+3z-1 |
4 1
o6 : Matrix A <--- A
|
i7 : gens I * h
o7 = | 1 |
1 1
o7 : Matrix A <--- A
|