"Source: Text/Commut/GB.text";
"Line: 660";
"Date: Thu Sep 25 14:47:46 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Commut/GB.text, line: 660
// Example: H115E2 ()
print "Example: H115E2";
ei := GetEchoInput();
SetEchoInput(true);
P<x, y, z> := PolynomialRing(RationalField(), [1, 2, 4]);
P;
VariableWeights(P);
Degree(x);
assert $1 eq 1;
Degree(y);
assert $1 eq 2;
Degree(z);
assert $1 eq 4;
Degree(x^2*y*z^3); // Weighted total degree
assert $1 eq 16;
TotalDegree(x^2*y*z^3); // Natural total degree
assert $1 eq 6;
IsHomogeneous(x);
assert $1;
IsHomogeneous(x + y);
assert not $1;
IsHomogeneous(x^2 + y);
assert $1;
I := ideal<P | x^2*y + z, (x^4 + z)^2, y^2 + z>;
IsHomogeneous(I);
assert $1;
MonomialsOfDegree(P, 4);        
MonomialsOfWeightedDegree(P, 4);
SetEchoInput(ei);
