# Difference between revisions of "ApCoCoA-1:NCo.TruncatedGB"

## NCo.TruncatedGB

Compute a truncated Groebner basis of a finitely generated homogeneous two-sided ideal in a free monoid ring.

### Syntax

```NCo.TruncatedGB(G:LIST, DB:INT):LIST
```

### Description

Given a word ordering and a homogeneous two-sided ideal I, a set of non-zero polynomials G is called a Groebner basis of I if the leading word set LW{G} generates the leading word ideal LW(I). Note that it may not exist finite Groebner basis of the ideal I. Moreover, let D be a positive integer. Then the set {g in G | Deg(g)<=D} is a Groebner basis of the ideal <f in I | Deg(f)<=D> and is called a D-truncated Groebner basis of I.

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.

Please set ring environment coefficient field K, alphabet (or set of indeterminates) X and ordering via the functions NCo.SetFp, NCo.SetX and NCo.SetOrdering, respectively, before using this function. The default coefficient field is Q, and the default ordering is the length-lexicographic ordering ("LLEX"). For more information, please check the relevant functions.

• @param G: a LIST of non-zero homogeneous polynomials generating a two-sided ideal in K<X>. Each polynomial is represented as a LIST of monomials, which are LISTs of the form [C, W] where W is a word in <X> and C is the coefficient of W. For example, the polynomial f=xy-y+1 is represented as F:=[[1,"xy"], [-1, "y"], [1,""]].

• @param DB: a positive INT, which gives a degree bound of S-polynomials (or obstructions) during the Buchberger enumerating procedure. The procedure will discard S-polynomials (or obstructions) whose degrees are larger than DB.

• @return: a LIST of polynomials, which is a truncated Groebner basis at degree DB with respect to the current word ordering if the enumerating procedure doesn't terminate due to reaching the loop bound LB, and is a partial Groebner basis otherwise.

#### Example

```NCo.SetX("xyz");
F1:=[[1,"yxy"],[-1,"zyz"]];
F2:=[[1,"xyx"],[-1,"zxy"]];
F3:=[[1,"zxz"],[-1,"yzx"]];
F4:=[[1,"xxx"],[1,"yyy"],[1,"zzz"],[1,"xyz"]];
G:=[F1,F2,F3,F4];
NCo.TruncatedGB(G,6);
[[[1, "yzx"], [-1, "zxz"]], [[1, "yxy"], [-1, "zyz"]], [[1, "xyx"], [-1, "zxy"]], [[1, "xxx"], [1, "xyz"], [1, "yyy"], [1, "zzz"]],
[[1, "zxzy"], [-1, "zzxz"]], [[1, "xzyz"], [-1, "zxyy"]], [[1, "xxyz"], [1, "xyyy"], [-1, "xzxz"], [1, "xzzz"], [-1, "yyyx"],
[-1, "zzzx"]], [[1, "zzxyy"], [-1, "zzxzz"]], [[1, "yzzxz"], [-1, "zxzzy"]], [[1, "yzzxy"], [-1, "zzxzx"]], [[1, "yzyyy"],
[1, "yzzzz"], [1, "zxzxx"], [1, "zzxzz"]], [[1, "yxzxz"], [-1, "zyzzx"]], [[1, "xzzxz"], [-1, "zxyyx"]], [[1, "xyyyy"], [1, "xyzzz"],
[1, "zxyyz"], [1, "zzzxy"]], [[1, "xxzxz"], [1, "xyyyx"], [-1, "xzxzx"], [1, "xzzzx"], [-1, "yyyxx"], [-1, "zzzxx"]], [[1, "xxzxy"],
[1, "xyzyx"], [1, "yyyyx"], [1, "zzzyx"]], [[1, "xxyyy"], [1, "xxzzz"], [-1, "xyzyz"], [-1, "xzxzx"], [-1, "yyyxx"], [-1, "yyyyz"],
[-1, "zzzxx"], [-1, "zzzyz"]], [[1, "zxzzyz"], [-1, "zzxzxy"]], [[1, "yzzzxz"], [-1, "zxzzyy"]], [[1, "yzzzxy"], [-1, "zzxzxx"]],
[[1, "xzzzxz"], [-1, "zxyzyz"]], [[1, "xyyzyz"], [1, "xzxyyx"], [-1, "xzxzxy"], [1, "xzzzxy"], [-1, "yyyxxy"], [-1, "zzzxxy"]],
[[1, "xxzzzy"], [1, "xyyyzz"], [-1, "xyzyzy"], [-1, "xzxyyz"], [-1, "xzxzxy"], [-1, "xzxzzz"], [-1, "xzzzxy"], [1, "xzzzzz"],
[-1, "yyyxxy"], [-1, "yyyxzz"], [-1, "yyyyzy"], [-1, "zzzxxy"], [-1, "zzzxzz"], [-1, "zzzyzy"]], [[1, "xxzzxy"], [1, "xyzyxx"],
[1, "yyyyxx"], [1, "zzzyxx"]]]
-------------------------------
```