"Source: Text/Commut/GB.text";
"Line: 2312";
"Date: Thu Sep 25 14:47:46 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Commut/GB.text, line: 2312
// Example: H115E8 ()
print "Example: H115E8";
ei := GetEchoInput();
SetEchoInput(true);
P<x, y, S> := PolynomialRing(IntegerRing(), 3);
f1 := 2*x*y + S*y;          
f2 := (1 + S)*x^2 - x*y;
I := ideal<P | f1, f2, S^2 + 5>;
GroebnerBasis(I);
f5 := (5 + S)*y^2 - 15*y;
f7 := -2*S*y^2 + (5 + 5*S)*y;
f9 := x*y + S*y^3 - 5*S*y^2 + 8*S*y;
J := ideal<P |  f2, f5, f7, f9, S^2 + 5>;
I eq J;
assert $1;
GroebnerBasis(I) eq GroebnerBasis(J);
assert $1;
Coordinates(I, f5);
Coordinates(I, f7);
Coordinates(I, f9);
Q := [f2, f5, f7, f9, S^2 + 5];         
J := IdealWithFixedBasis(Q);                        
J eq I;
assert $1;
g := GroebnerBasis(I)[2];
g;
C := Coordinates(J, g);
C;
&+[C[i]*Q[i]: i in [1 .. #C]] eq g;
assert $1;
SetEchoInput(ei);
