 LIB "sagbi.lib";
ring r= 0,(x,y),dp;
//The following algebra does not have a finite SAGBI basis.
ideal I=x^2, xyy2, xy2;
//
//Call with two iterations
def DI = algebraicDependence(I,2);
==> //AlgDep1 initialisation and precomputation
==> //AlgDep2 call of SAGBI construction algorithm
==> //SAGBI construction algorithm stopped as it reached the limit of 2 itera\
tions.
==> //In general the returned generators are no SAGBI basis for the given alg\
ebra.
==> //AlgDep3 postprocessing of results
setring DI; algDep;
==> algDep[1]=0
// we see that no dependency has been seen so far
//
//Call with two iterations
setring r; kill DI;
def DI = algebraicDependence(I,3);
==> //AlgDep1 initialisation and precomputation
==> //AlgDep2 call of SAGBI construction algorithm
==> //SAGBI construction algorithm stopped as it reached the limit of 3 itera\
tions.
==> //In general the returned generators are no SAGBI basis for the given alg\
ebra.
==> //AlgDep3 postprocessing of results
setring DI; algDep;
==> algDep[1]=0
map F = DI,x,y,x^2, xyy2, xy2;
F(algDep); // we see that it is a dependence indeed
==> _[1]=0
