# Difference between revisions of "ApCoCoA-1:Weyl.WRGBS"

## Weyl.WRGBS

Convert a Groebner basis of an ideal in Weyl algebra A_n in to its reduced Groebner Basis using corresponding implementation in ApCoCoALib.

### Syntax

```Weyl.WRGBS(GB:LIST):LIST
```

### Description

Please note: The function(s) explained on this page is/are using the ApCoCoAServer. You will have to start the ApCoCoAServer in order to use it/them.

This function converts Groebner basis GB of and ideal I computed by ApCoCoAServer into the reduced Groebner Basis by using the corresponding implementation in ApCoCoaLib. If GB is not a Groebner basis then the output will not be the reduced Groebner basis. In fact, this function reduces a list GB of Weyl polynomials into a new list L such that Ideal(L) = Ideal(GB), every polynomial is reduced with respect to the remaining polynomials in the list L and leading coefficient of each polynomial in L is 1. Therefore, if GB is a Weyl Groebner basis then output of this function will be reduced Groebner basis.

• @param GB Groebner Basis of an ideal in the Weyl algebra.

• @result The reduced Groebner Basis of the given ideal.

#### Example

```A1::=QQ[x,d];	--Define appropriate ring
Use A1;
L:=[x,d,1];
Weyl.WRGBS(L);
-------------------------------
-- CoCoAServer: computing Cpu Time = 0
-------------------------------

-------------------------------
-- Done.
-------------------------------
```

#### Example

```A2::=ZZ/(13)[x[1..2],y[1..2]]; -- define appropriate ring and activate it with Use command.
Use A2;
I:=Ideal(x^13-1,x^3+xy^2+y-2);

-- Done.
-------------------------------
GbI:=Weyl.WGB(I,0);  --computes complete GB of the ideal I
-------------------------------
-- CoCoAServer: computing Cpu Time = 0.063
-------------------------------
-- Done.
-------------------------------
Len(GbI);

11
-------------------------------
-- Done.
-------------------------------
GbI:=Weyl.WRGBS(GbI);GbI;Len(GbI);
-------------------------------
-- CoCoAServer: computing Cpu Time = 0.031
-------------------------------
[
y^10 - 5x^2y^6 - 3xy^7 - y^8 + 6x^2y^5 - xy^6 + y^7 + 3x^2y^4 - 6xy^5 + 2y^6 +
x^2y^3 - 6xy^4 + 4y^5 + x^2y^2 + 2xy^3 + 2x^2y + 2xy^2 - 2y^3 + 3x^2 - 3xy +
4y^2 - 6x - 6y + 5,
x^2y^7 - 4xy^8 + y^9 - 6x^2y^6 - xy^7 + 2y^8 + 4x^2y^5 - 3y^7 - x^2y^4 -
2xy^5 - 5x^2y^3 - 4xy^4 + 4x^2y^2 - 3xy^3 - 6y^4 - 5x^2y + 6xy^2 + y^3 + 3x^2 -
5xy + 3y^2 + 4x + y - 5,
xy^9 + 6xy^8 + 2y^9 + 6x^2y^6 + 4xy^7 - 6y^8 - 3x^2y^5 + 4xy^6 - 3x^2y^4 -
4xy^5 + 6y^6 - 6xy^4 + 3y^5 + x^2y^2 - 6xy^3 + y^4 - 2x^2y + 6xy^2 - y^3 +
3x^2 - 2xy + 6y^2 - 5x + 2y + 5,
x^3 + xy^2 + y - 2]
-------------------------------
4  -- which is now size of reduced GB of the ideal I
-------------------------------
-- Done.
-------------------------------
```