# ApCoCoA-1:SB.ReducedSagbi

## SB.ReducedSagbi

Computes the finite reduced SAGBI-basis of a subalgebra if existing.

### Syntax

```SB.ReducedSagbi(G:LIST of POLY):LIST of POLY
```

### Description

If a finite SAGBI-basis of the subalgebra S generated by G is existing, this function computes the reduced SAGBI-basis of S. Then a list of polynomials is returned which form the reduced SAGBI-basis of S, i.e. these polynomials fulfill the conditions of a reduced SAGIB-basis. If no finite SAGBI-basis is existing the computation will be interrupted by an error message.

Important: This functions works only, if a finite SAGBI-basis of S is existing!

• @param G A list of polynomials which generates a subalgebra.

• @return If no error will occur, a list of polynomials which form a reduced SAGBI-basis of the given subalgebra.

#### Example

```Use R::=QQ[x,y];

G:=[x-y,x+y];
SB.Sagbi(G);
SB.ReducedSagbi(G);

-------------------------------------------------------
-- output:

-- a SAGBI-basis of K[G]
[
x - y,
x + y,
y]
-------------------------------

-- the reduced SAGBI-basis of K[G]
[
x,
y]
-------------------------------
-- Done.
-------------------------------
```

#### Example

```Use R::=QQ[x[1..6]];

G:=[-x - x, -x, x^2 + x^2,
-4x^2 - 5/2x^2 + 2xx - 4x^2,
-2xxx + x^2x - x^2x + 2xxx,
-x^2x + x^2x - 2xxx + x^2x - x^2x];
SB.Sagbi(G);
SB.ReducedSagbi(G);

-------------------------------------------------------
-- output:

-- a SAGBI-basis of K[G]
[
x + x,
x,
x^2 + x^2,
x^2 + 5/8x^2 - 1/2xx + x^2,
xxx - 1/2x^2x + 1/2x^2x - xxx,
x^2x - x^2x + 2xxx - x^2x + x^2x,
x^2 - 4xx,
x^2x - xxx + x^2x]
-------------------------------

-- the reduced SAGBI-basis of K[G]
[
x + x,
x,
x^2 + x^2,
xxx - 1/2x^2x + 1/2x^2x - xxx,
x^2 - 4xx,
x^2x - xxx + x^2x]
-------------------------------
-- Done.
-------------------------------
```

#### Example

```Use R::=QQ[x,y];

G:=[x+y, xy, xy^2];
SB.Sagbi(G);
SB.ReducedSagbi(G);

-------------------------------------------------------
-- output:

--- Computation was interrupted ---
NULL
-------------------------------
ERROR: SB.ReducedSagbi: No finite SAGBI-Basis is existing!
CONTEXT: Error("SB.ReducedSagbi: No finite SAGBI-Basis is existing!")
-------------------------------
-- Done.
-------------------------------
```