# sagbi -- Compute a subalgebra basis (sagbi basis)

## Synopsis

• Usage:
N = sagbi M
N = sagbi A
N = sagbi L
N = sagbi B
• Inputs:
• A, an instance of the type Subring,
• M, , of generators for a subring of
• L, a list, containing generators for a subring of
• B, an instance of the type SAGBIBasis, containing a partial computation of a sagbi basis
• Optional inputs:
• AutoSubduce => , default value true, a flag indicating when to perform autosubduction on the generators before performing the Sagbi basis computation (See: AutoSubduce)
• ReduceNewGenerators => , default value true, a flag indicating whether to apply gaussian elimination to new sagbi generators before adding them to the current sagbi basis (See: ReduceNewGenerators)
• StorePending => , default value true, a flag that indicates whether the pending list should be stored in the result. (See: StorePending)
• Strategy => , default value "Master", the update strategy at the beginning of each loop: \"DegreeByDegree\", \"Incremental\", and \"Master\". The strategy \"Master\" is a hybrid that combines the other two; starting with \"DegreeByDegree\" for low degrees and switching to \"Incremental\". (See: Strategy)
• SubductionMethod => , default value "Top", the method used for subduction either: \"Top\" or \"Engine\". (See: SubductionMethod)
• Limit => an integer, default value 10, a degree limit for the binomial S-pairs that are computed internally.
• AutoSubduceOnPartialCompletion => , default value false, apply autosubduction to the sagbi generators the first time no new generators are added. Use this only if very few new sagbi generators are expected. (See: AutoSubduceOnPartialCompletion)
• PrintLevel => an integer, default value 0, When this is greater than zero, information is printed about the progress of the computation (See: PrintLevel)
• Outputs:
• N, an instance of the type SAGBIBasis, a computation object holding the state of the sagbi basis computation

## Description

The output of this function is a partial subalgebra basis stored in a computation object.

 i1 : R = QQ[t_(1,1)..t_(3,3),MonomialOrder=>Lex]; i2 : M = genericMatrix(R,3,3); 3 3 o2 : Matrix R <--- R i3 : A = subring gens minors(2, M); i4 : verifySagbi A o4 = false i5 : S = sagbi A; i6 : gS = gens S o6 = | t_(2,2)t_(3,3)-t_(2,3)t_(3,2) t_(2,1)t_(3,3)-t_(2,3)t_(3,1) ------------------------------------------------------------------------ t_(2,1)t_(3,2)-t_(2,2)t_(3,1) t_(1,2)t_(3,3)-t_(1,3)t_(3,2) ------------------------------------------------------------------------ t_(1,2)t_(2,3)-t_(1,3)t_(2,2) t_(1,1)t_(3,3)-t_(1,3)t_(3,1) ------------------------------------------------------------------------ t_(1,1)t_(3,2)-t_(1,2)t_(3,1) t_(1,1)t_(2,3)-t_(1,3)t_(2,1) ------------------------------------------------------------------------ t_(1,1)t_(2,2)-t_(1,2)t_(2,1) ------------------------------------------------------------------------ t_(1,1)t_(2,2)t_(3,1)t_(3,3)-t_(1,1)t_(2,3)t_(3,1)t_(3,2)-t_(1,2)t_(2,1) ------------------------------------------------------------------------ t_(3,1)t_(3,3)+t_(1,2)t_(2,3)t_(3,1)^2+t_(1,3)t_(2,1)t_(3,1)t_(3,2)-t_(1 ------------------------------------------------------------------------ ,3)t_(2,2)t_(3,1)^2 t_(1,1)t_(1,3)t_(2,2)t_(3,3)-t_(1,1)t_(1,3)t_(2,3)t ------------------------------------------------------------------------ _(3,2)-t_(1,2)t_(1,3)t_(2,1)t_(3,3)+t_(1,2)t_(1,3)t_(2,3)t_(3,1)+t_(1,3 ------------------------------------------------------------------------ )^2t_(2,1)t_(3,2)-t_(1,3)^2t_(2,2)t_(3,1) | 1 11 o6 : Matrix R <--- R i7 : verifySagbi gS o7 = true

Partial subalgebra bases are unavoidable since a subalgebra of a polynomial ring, endowed with some polynomial order, need not have a finite subalgebra basis. Here is a quintessential example of this phenomenon:

 i8 : R=QQ[x,y]; i9 : A = subring matrix{{x+y,x*y,x*y^2}}; i10 : gens sagbi(A,Limit=>3) o10 = | x+y xy xy2 | 1 3 o10 : Matrix R <--- R i11 : gens sagbi(A,Limit=>10) o11 = | x+y xy xy2 xy3 xy4 xy5 xy6 xy7 xy8 xy9 | 1 10 o11 : Matrix R <--- R

Nevertheless, a finite subalgebra basis can be computed in many cases.