"Source: Text/Commut/GB.text";
"Line: 2779";
"Date: Thu Sep 25 14:47:46 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Commut/GB.text, line: 2779
// Example: H115E13 ()
print "Example: H115E13";
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);
