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

 This article is about a function from ApCoCoA-1.

## Weyl.TwoWGB

Computes the reduced two-sided Groebner basis of a two-sided ideal I in the Weyl algebra A_n over the field of positive characteristic.

### Syntax

```Weyl.TwoWGB(I:IDEAL, L: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 computes the reduced two-sided Groebner Basis for a two-sided Ideal I = (f_1,f_2, ..., f_r) where every generator f_i should be a Weyl polynomial in standard form. The function first computes a left Groebner basis of the ideal I and then tries to update it into the two-sided one. One can also use another parameter L, a list of distinct positive integers corresponding to the number of indeterminate (1,2,..., 2n) to be eliminated while computing the Groebner basis of the ideal I.

• @param I An ideal in the Weyl algebra.

• @return A two-sided Groebner Basis of the given ideal.

The following parameters are optional:

• @param L An optional list of distinct positive integers. The default value is empty list. With this parameter, one can pass the list positive integers corresponding to the indeterminates to be eliminated during GB computation.

#### Example

```A1::=QQ[x,d];	--Define an appropriate ring
Use A1;
I:=Ideal(x,d);  -- Now start ApCoCoA server for executing next command
Weyl.TwoWGB(I);
-- CoCoAServer: computing Cpu Time = 0
-------------------------------
[1]
-------------------------------
```

#### Example

```A1::=ZZ/(3)[x,d];	--Define an appropriate ring
Use A1;
I1:=Ideal(x,d);  -- Now start ApCoCoA server for executing next command
Weyl.TwoWGB(I1);
-- CoCoAServer: computing Cpu Time = 0
-------------------------------
[1]
-------------------------------
I2:=Ideal(x^3);
Weyl.TwoWGB(I2);
[x^3]
-------------------------------
-- Done.
-------------------------------
I3:=Ideal(x^3d-d^3+1,d^6+d^3+1);
Weyl.TwoWGB(I3);
[d^3 - 1, x^3]
-------------------------------
-- Done.
-------------------------------
```

#### Example

```W3::=ZZ/(7)[x[1..3],d[1..3]];
Use W3;
I2:=Ideal(x[1]^7x[2],d[1]^7-x[1]^7-3);
Weyl.TwoWGB(I2);

[x[1]^7, d[1]^7 - 3]
-------------------------------
-- Done.
-------------------------------
I3:=Ideal(x[1]^7x[2]^7-x[3]^14-1,d[1]^7-x[1]^7,x[3]^7d[3]^7+3);
Set Indentation;
Weyl.TwoWGB(I3);

[
x[2]^7d[1]^7d[3]^7 + 3x[3]^7 - d[3]^7,
x[3]^14 - x[2]^7d[1]^7 + 1,
x[3]^7d[3]^7 + 3,
x[1]^7 - d[1]^7]
-------------------------------
-- Done.
-------------------------------
```