"Source: Text/Commut/GB.text";
"Line: 660";
"Date: Mon Jun 27 11:39:56 2022";
"Main: Thu May 25 10:02:38 2023";
// original file: Text/Commut/GB.text, line: 660
// Example: H112E2 ()
print "Example: H112E2";
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);
