If the optional argument is not given, then the coefficient ring of the result is either ZZ or the base field.
The inverse of the isomorphism F is obtainable with F^-1.
i1 : A = ZZ[a]/(a^2-3) o1 = A o1 : QuotientRing |
i2 : B = A[x,y,z]/(a*x^2-y^2-z^2, y^3, z^3) o2 = B o2 : QuotientRing |
i3 : (D,F) = flattenRing B; |
i4 : F
o4 = map(D,B,{x, y, z, a})
o4 : RingMap D <--- B
|
i5 : F^-1
o5 = map(B,D,{x, y, z, a})
o5 : RingMap B <--- D
|
i6 : D o6 = D o6 : QuotientRing |
i7 : describe D
ZZ[x, y, z, a]
o7 = -------------------------------
2 2 2 2 3 3
(a - 3, x a - y - z , y , z )
|
i8 : flattenRing(B,Result => Ideal)
2 2 2 2 3 3
o8 = ideal (a - 3, x a - y - z , y , z )
o8 : Ideal of ZZ[x, y, z, a]
|
i9 : flattenRing(B,Result => (Ideal,,))
2 2 2 2 3 3
o9 = (ideal (a - 3, x a - y - z , y , z ), map(ZZ[x, y, z, a],B,{x, y, z,
------------------------------------------------------------------------
a}), map(B,ZZ[x, y, z, a],{x, y, z, a}))
o9 : Sequence
|
i10 : flattenRing(B,Result => (,,))
ZZ[x, y, z, a]
o10 = (-------------------------------,
2 2 2 2 3 3
(a - 3, x a - y - z , y , z )
-----------------------------------------------------------------------
ZZ[x, y, z, a]
map(-------------------------------,B,{x, y, z, a}),
2 2 2 2 3 3
(a - 3, x a - y - z , y , z )
-----------------------------------------------------------------------
ZZ[x, y, z, a]
map(B,-------------------------------,{x, y, z, a}))
2 2 2 2 3 3
(a - 3, x a - y - z , y , z )
o10 : Sequence
|
i11 : flattenRing(B,Result => 3)
ZZ[x, y, z, a]
o11 = (-------------------------------,
2 2 2 2 3 3
(a - 3, x a - y - z , y , z )
-----------------------------------------------------------------------
ZZ[x, y, z, a]
map(-------------------------------,B,{x, y, z, a}),
2 2 2 2 3 3
(a - 3, x a - y - z , y , z )
-----------------------------------------------------------------------
ZZ[x, y, z, a]
map(B,-------------------------------,{x, y, z, a}))
2 2 2 2 3 3
(a - 3, x a - y - z , y , z )
o11 : Sequence
|
i12 : flattenRing(B,Result => (Nothing,Nothing,))
o12 = (, , map(B,ZZ[x, y, z, a],{x, y, z, a}))
o12 : Sequence
|
Warning: flattening the same ring with different options may yield a separately constructed rings, unequal to each other.
Flattening an ideal instead of a quotient ring can save a lot of time spent computing the Gröbner basis of the resulting ideal, if the flattened quotient is not needed.
i13 : A = ZZ[a]/(a^2-3) o13 = A o13 : QuotientRing |
i14 : B = A[x,y,z] o14 = B o14 : PolynomialRing |
i15 : J = ideal (a*x^2-y^2-z^2, y^3, z^3)
2 2 2 3 3
o15 = ideal (a*x - y - z , y , z )
o15 : Ideal of B
|
i16 : (J',F) = flattenRing J; |
i17 : J'
2 2 2 2 3 3
o17 = ideal (a - 3, x a - y - z , y , z )
o17 : Ideal of ZZ[x, y, z, a]
|
In the following example, the coefficient ring of the result is the fraction field K.
i18 : K = frac(ZZ[a]) o18 = K o18 : FractionField |
i19 : B = K[x,y,z]/(a*x^2-y^2-z^2, y^3, z^3) o19 = B o19 : QuotientRing |
i20 : (D,F) = flattenRing B
o20 = (B, map(B,B,{x, y, z, a}))
o20 : Sequence
|
i21 : describe D
K[x, y, z]
o21 = ------------------------
2 2 2 3 3
(a*x - y - z , y , z )
|
Once a ring has been declared to be a field with toField, then it will be used as the coefficient ring.
i22 : A = QQ[a]/(a^2-3); |
i23 : L = toField A o23 = L o23 : PolynomialRing |
i24 : B = L[x,y,z]/(a*x^2-y^2-z^2, y^3, z^3) o24 = B o24 : QuotientRing |
i25 : (D,F) = flattenRing(B[s,t])
o25 = (D, map(D,B[s, t],{s, t, x, y, z, a}))
o25 : Sequence
|
i26 : describe D
L[s, t, x, y, z]
o26 = ------------------------
2 2 2 3 3
(a*x - y - z , y , z )
|
If a larger coefficient ring is desired, use the optional CoefficientRing parameter.
i27 : use L o27 = L o27 : PolynomialRing |
i28 : C1 = L[s,t]; |
i29 : C2 = C1/(a*s-t^2); |
i30 : C3 = C2[p_0..p_4]/(a*s*p_0)[q]/(q^2-a*p_1); |
i31 : (D,F) = flattenRing(C3, CoefficientRing=>C2)
o31 = (D, map(D,C3,{q, p , p , p , p , p , s, t, a}))
0 1 2 3 4
o31 : Sequence
|
i32 : describe D
C2[q, p , p , p , p , p ]
0 1 2 3 4
o32 = -------------------------
2
(a*s*p , q - a*p )
0 1
|
i33 : (D,F) = flattenRing(C3, CoefficientRing=>QQ)
o33 = (D, map(D,C3,{q, p , p , p , p , p , s, t, a}))
0 1 2 3 4
o33 : Sequence
|
i34 : describe D
QQ[q, p , p , p , p , p , s, t, a]
0 1 2 3 4
o34 = -------------------------------------
2 2 2
(a - 3, - t + s*a, p s*a, q - p a)
0 1
|