i1 : A = QQ[i]/(i^2+1);
|
i2 : toField A
o2 = A
o2 : QuotientRing
|
i3 : B = A[x,y,z]
o3 = B
o3 : PolynomialRing
|
i4 : I = ideal(i*x^2-y-i, i*y^2-z-i)
2 2
o4 = ideal (i*x - y - i, i*y - z - i)
o4 : Ideal of B
|
i5 : gens gb I
o5 = | y2+zi-1 x2+yi-1 |
1 2
o5 : Matrix B <--- B
|
The declaration is accomplished by setting
R.isField to be
true, and, in case the ring is a ring handled by the engine, informing the engine. Polynomial rings over rings declared to be fields support Groebner basis operations.
If the engine eventually discovers that some nonzero element of
R is not a unit, an error will be signalled. The user may then use
getNonUnit to obtain a non-invertible element of
R. If a ring is probably a field, it can be used as a field until a contradiction is found, and this may be a good way of discovering whether a ring is a field.