"Source: Text/Commut/Ideal.text";
"Line: 2757";
"Date: Thu Sep 25 14:47:46 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Commut/Ideal.text, line: 2757
// Example: H116E19 ()
print "Example: H116E19";
ei := GetEchoInput();
SetEchoInput(true);
R<x, y, z> := PolynomialRing(RationalField(), 3);
P := [x^2 + y^2, z];
S := [1, x + y + z];
L := [x^2 + y^2, (x+y+z)^2-z^2-2*x*y, x*y];
B, V := HomogeneousModuleTest(P, S, L);
B;
V;
// Thus L[1] is P[1]*S[1] and
// L[2] is (P[1] - 2*P[2]^2)*S[1] + 2*P[2]*S[2].
L[1] eq P[1]*S[1];
assert $1;
(P[1] - 2*P[2]^2)*S[1] + 2*P[2]*S[2] eq L[2];
assert $1;
// Determine subsequence of [x^3, y^3, z^3] which forms
// extension basis of module generated by P and S.
L := [x^3, y^3, z^3];
HomogeneousModuleTestBasis(P, S, L);
// Thus x^2 and y^2 could be appended to S to preserve
// minimality.
SetEchoInput(ei);
