-- -*- M2 -*-;
------------------- a
R = ZZ/101[x,y,z];
m = matrix{{x,y,z}};
assert(gens gbi m == matrix{{z,y,x}});
assert(0 == x % m);
syz1 = syzi m;
assert(gens gb syz1 - matrix {{0, -y, -z}, {-z, x, 0}, {y, 0, x}} == 0);
syz2 = syzi syz1;
syz3 = syzi syz2;
assert(syz1 * syz2 == 0);
assert(syz3 == 0);
------------------- b
R = ZZ/101[symbol x, symbol y, symbol z];
I = ideal(x,y,z^2,x*z+z^2);
assert(gens gbi I == matrix {{y, x, z^2}});
mingens I;
------------------- c
R = ZZ/101[symbol x, symbol y, symbol z];
I = ideal(x*y-y^2, x^2);
gens gbi I;
mingens I;
syzi gens I;
syzi gens gbi I;
assert(gens gbi I == matrix{{x*y-y^2, x^2, y^3}});
y^3 // (gens I);
first first entries((gens I) * (y^3 // (gens I))) == y^3;
assert((x*y) % I == y^2);
status gbi I
--assert(status gbi I == "status: done; S-pairs encountered up to degree 3");
peek gbi I
------------------- d
R = ZZ/101[symbol x, symbol y, symbol z];
I = ideal(x*y-y^2, x^2, y^4);
gens gbi I;
assert(gens gbi I == matrix{{x*y-y^2, x^2, y^3}});
assert(mingens I == matrix{{x*y-y^2, x^2}});
------------------- e
R = ZZ/101[symbol a .. symbol f];
I = ideal((5*a+b+3*c)^10, (3*a+17*b+4*d)^10, (9*b+13*c+12*d)^10);
gens gbi I;
------------------- f
R = ZZ/101[symbol x, symbol y, symbol z];
I = ideal(x*y-1, x^2-x, x^3-z-1);
if crit I then (
     assert(gens gbi I == matrix{{z,y-1,x-1}});
     );
------------------- g
R = ZZ/101[symbol x, symbol y, symbol z, MonomialOrder=>Lex];
I = ideal(x*y-1, x^2-x, x^3-z-1);
if crit I then (
     assert(gens gbi I == matrix{{z,y-1,x-1}});
     );
------------------- h
R = ZZ/101[symbol a .. symbol f];
I = ideal((5*a+b+3*c)^10, (3*a+17*b+4*d)^10, (9*b+13*c+12*d)^10-1);
if crit I then (
     gens gbi I;
     );
------------------- i
R = QQ[symbol a .. symbol f];
I = ideal((5*a+b+3*c)^10, (3*a+17*b+4*d)^10, (9*b+13*c+12*d)^10-1);
if crit I then (
     gens gbi I;
     );
end
------------------- done;
