"Source: Text/Commut/GB.text";
"Line: 2767";
"Date: Mon Jun 27 11:39:56 2022";
"Main: Thu May 25 10:02:38 2023";
// original file: Text/Commut/GB.text, line: 2767
// Example: H112E13 ()
print "Example: H112E13";
ei := GetEchoInput();
SetEchoInput(true);
function univgen(I, i)
   // Make sure I has a Groebner basis so that
   // the conversion algorithm will be used when
   // constructing a Groebner basis of J
   Groebner(I);
   J := ChangeOrder(I, "univ", i);
   Groebner(J);
   return rep{f: f in Basis(J) | IsUnivariate(f, i)};
end function;
P<x, y, z> := PolynomialRing(RationalField(), 3, "grevlex");
I := ideal<P |
    1 - x + x*y^2 - x*z^2,
    1 - y + y*x^2 + y*z^2,
    1 - z - z*x^2 + z*y^2 >;
univgen(I, 1);
univgen(I, 2);
univgen(I, 3);
SetEchoInput(ei);
