|This article is about a function from ApCoCoA-2.|
This function returns the reduced SAGBI basis of a given subalgebra.
SB.GetSAGBI(ref S: TAGGED(<quotes>$apcocoa/sagbi.Subalgebra</quotes>): LIST of POLY
This function takes a subalgebra S as a reference, computes its unique reduced SAGBI basis, returns it and saves it into S if the function wasn't called previously. If the function was called previously on the same subalgebra, then it just returns the reduced SAGBI basis of S. If no finite SAGBI basis is found after 120 seconds, the function stops and returns an error.
@param S A subalgebra
@return The reduced SAGBI basis of S
Use R ::= QQ[x,y]; fs := [x^2*y, x^2 -y^2, x^2*y^2 -y^4, x^2*y^4]; S := SB.Subalgebra(R,fs); PrintLn SB.GetSAGBI(ref S); -- [x^2 -y^2, x^2*y, x^2*y^2 -y^4, y^6, x^2*y^4]