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

m (replaced <quotes> tag by real quotes) |
|||

(3 intermediate revisions by the same user not shown) | |||

Line 1: | Line 1: | ||

+ | {{Version|1}} | ||

<command> | <command> | ||

<title>NCo.GB</title> | <title>NCo.GB</title> | ||

Line 12: | Line 13: | ||

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

<par/> | <par/> | ||

− | Please set ring environment <em>coefficient field</em> <tt> K</tt>, <em>alphabet</em> (or set of indeterminates) <tt>X</tt> and <em>ordering</em> via the functions <ref>NCo.SetFp</ref>, <ref>NCo.SetX</ref> and <ref>NCo.SetOrdering</ref>, respectively, before using this function. The default coefficient field is <tt>Q</tt>, and the default ordering is the length-lexicographic ordering ( | + | Please set ring environment <em>coefficient field</em> <tt> K</tt>, <em>alphabet</em> (or set of indeterminates) <tt>X</tt> and <em>ordering</em> via the functions <ref>ApCoCoA-1:NCo.SetFp|NCo.SetFp</ref>, <ref>ApCoCoA-1:NCo.SetX|NCo.SetX</ref> and <ref>ApCoCoA-1:NCo.SetOrdering|NCo.SetOrdering</ref>, respectively, before using this function. The default coefficient field is <tt>Q</tt>, and the default ordering is the length-lexicographic ordering ("LLEX"). For more information, please check the relevant functions. |

<itemize> | <itemize> | ||

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

<item>@return: a LIST of polynomials, which is a Groebner basis with respect to the current word ordering if there exists a finite Groebner basis and the enumerating procedure doesn't terminate due to reaching the degree bound <tt>DB</tt> or the loop bound LB, and is a partial Groebner basis otherwise.</item> | <item>@return: a LIST of polynomials, which is a Groebner basis with respect to the current word ordering if there exists a finite Groebner basis and the enumerating procedure doesn't terminate due to reaching the degree bound <tt>DB</tt> or the loop bound LB, and is a partial Groebner basis otherwise.</item> | ||

Line 27: | Line 28: | ||

</itemize> | </itemize> | ||

<example> | <example> | ||

− | NCo.SetX( | + | NCo.SetX("xyzt"); |

− | F1 := [[1, | + | F1 := [[1,"xx"], [-1,"yx"]]; |

− | F2 := [[1, | + | F2 := [[1,"xy"], [-1,"ty"]]; |

− | F3 := [[1, | + | F3 := [[1,"xt"], [-1, "tx"]]; |

− | F4 := [[1, | + | F4 := [[1,"yt"], [-1, "ty"]]; |

G := [F1, F2,F3,F4]; | G := [F1, F2,F3,F4]; | ||

NCo.GB(G); -- over Q (default field), LLEX ordering (default ordering) | NCo.GB(G); -- over Q (default field), LLEX ordering (default ordering) | ||

− | [[[1, | + | [[[1, "yt"], [-1, "ty"]], [[1, "xt"], [-1, "tx"]], [[1, "xy"], [-1, "ty"]], |

− | [[1, | + | [[1, "xx"], [-1, "yx"]], [[1, "tyy"], [-1, "tty"]], [[1, "yyx"], [-1, "tyx"]], |

− | [[1, | + | [[1, "ttyy"], [-1, "ttty"]], [[1, "tyyx"], [-1, "ttyx"]]] |

------------------------------- | ------------------------------- | ||

NCo.SetFp(); -- set default Fp=F2 | NCo.SetFp(); -- set default Fp=F2 | ||

NCo.GB(G); -- over F2, LLEX ordering | NCo.GB(G); -- over F2, LLEX ordering | ||

− | [[[1, | + | [[[1, "yt"], [1, "ty"]], [[1, "xt"], [1, "tx"]], [[1, "xy"], [1, "ty"]], |

− | [[1, | + | [[1, "xx"], [1, "yx"]], [[1, "tyy"], [1, "tty"]], [[1, "yyx"], [1, "tyx"]], |

− | [[1, | + | [[1, "ttyy"], [1, "ttty"]], [[1, "tyyx"], [1, "ttyx"]]] |

------------------------------- | ------------------------------- | ||

NCo.SetFp(3); | NCo.SetFp(3); | ||

NCo.GB(G); -- over F3, LLEX ordering | NCo.GB(G); -- over F3, LLEX ordering | ||

− | [[[1, | + | [[[1, "yt"], [2, "ty"]], [[1, "xt"], [2, "tx"]], [[1, "xy"], [2, "ty"]], |

− | [[1, | + | [[1, "xx"], [2, "yx"]], [[1, "tyy"], [2, "tty"]], [[1, "yyx"], [2, "tyx"]], |

− | [[1, | + | [[1, "ttyy"], [2, "ttty"]], [[1, "tyyx"], [2, "ttyx"]]] |

------------------------------- | ------------------------------- | ||

− | NCo.SetX( | + | NCo.SetX("txyz"); |

− | NCo.SetOrdering( | + | NCo.SetOrdering("ELIM"); -- ELIM will eliminate t, x, y, z one after another |

Gb:=NCo.GB(G); | Gb:=NCo.GB(G); | ||

− | NCo.FindPolynomials( | + | NCo.FindPolynomials("xyz",Gb); -- compute GB of the intersection of <G> and F3<x,y,z> |

− | [[[1, | + | [[[1, "xx"], [2, "yx"]], [[1, "xyx"], [2, "yyx"]], [[1, "xyy"], [2, "yxy"]]] |

------------------------------- | ------------------------------- | ||

</example> | </example> | ||

</description> | </description> | ||

<seealso> | <seealso> | ||

− | <see>NCo.IsGB</see> | + | <see>ApCoCoA-1:NCo.IsGB|NCo.IsGB</see> |

− | <see>NCo.LW</see> | + | <see>ApCoCoA-1:NCo.LW|NCo.LW</see> |

− | <see>NCo.ReducedGB</see> | + | <see>ApCoCoA-1:NCo.ReducedGB|NCo.ReducedGB</see> |

− | <see>NCo.SetFp</see> | + | <see>ApCoCoA-1:NCo.SetFp|NCo.SetFp</see> |

− | <see>NCo.SetOrdering</see> | + | <see>ApCoCoA-1:NCo.SetOrdering|NCo.SetOrdering</see> |

− | <see>NCo.SetX</see> | + | <see>ApCoCoA-1:NCo.SetX|NCo.SetX</see> |

− | <see>NCo.TruncatedGB</see> | + | <see>ApCoCoA-1:NCo.TruncatedGB|NCo.TruncatedGB</see> |

− | <see>Introduction to CoCoAServer</see> | + | <see>ApCoCoA-1:Introduction to CoCoAServer|Introduction to CoCoAServer</see> |

</seealso> | </seealso> | ||

<types> | <types> | ||

Line 81: | Line 82: | ||

<key>NCo.GB</key> | <key>NCo.GB</key> | ||

<key>GB</key> | <key>GB</key> | ||

− | <wiki-category>Package_gbmr</wiki-category> | + | <wiki-category>ApCoCoA-1:Package_gbmr</wiki-category> |

</command> | </command> |

## Latest revision as of 13:39, 29 October 2020

This article is about a function from ApCoCoA-1. |

## NCo.GB

Enumerate a (partial) Groebner basis of a finitely generated two-sided ideal in a free monoid ring (using the Buchberger procedure).

### Syntax

NCo.GB(G:LIST[, DB:INT, LB:INT, OFlag:INT]):LIST

### Description

Given a two-sided ideal `I` and a word ordering `Ordering`, a set of non-zero polynomials `G` is called a *Groebner basis* of `I` with respect to `Ordering` if the leading word set `LW{G}` generates the leading word ideal `LW(I)`. Note that a two-sided ideal may not have finite Groebner bases.

*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 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,""]].@return: a LIST of polynomials, which is a Groebner basis with respect to the current word ordering if there exists a finite Groebner basis and the enumerating procedure doesn't terminate due to reaching the degree bound

`DB`or the loop bound LB, and is a partial Groebner basis otherwise.

About 3 optional parameters: for most cases we do not know whether or not there exists a finite Groebner basis beforehand. Thus, the function offers 3 optional parameters for the enumerating procedure. Note that at the moment *all* of the following 3 optional parameters must be used at the same time.

@param

*DB:*a positive INT, which gives a degree bound of S-polynomials (or obstructions) during the enumerating procedure. When the degree bound is reached, the procedure will be interrupted and return a partial Groebner basis.@param

*LB:*a positive INT, which gives a loop bound of enumerating steps. When the LB-th enumerating step finishes, the procedure will be interrupted and return a partial Groebner basis.@param

*OFlag:*a non-negative INT, which is a multi-switch for the output of the ApCoCoAServer. If OFlag=0, the server displaces nothing on the screen. If OFlag=1, the server prints basic information on the enumerating procedure, such as the number of enumerating steps has been proceeded, the number of elements in partial Groebner basis, the number of unselected obstructions; the total number of obstructions, the number of selected obstructions, and the number of unnecessary obstructions. If OFlag=2, besides the information as OFlag=1, the server also displays explicitly the elements in partial Groebner basis and the current selected S-polynonial. Note that the initial idea of using OFlag is to trace and debug the enumerating procedure.

#### Example

NCo.SetX("xyzt"); F1 := [[1,"xx"], [-1,"yx"]]; F2 := [[1,"xy"], [-1,"ty"]]; F3 := [[1,"xt"], [-1, "tx"]]; F4 := [[1,"yt"], [-1, "ty"]]; G := [F1, F2,F3,F4]; NCo.GB(G); -- over Q (default field), LLEX ordering (default ordering) [[[1, "yt"], [-1, "ty"]], [[1, "xt"], [-1, "tx"]], [[1, "xy"], [-1, "ty"]], [[1, "xx"], [-1, "yx"]], [[1, "tyy"], [-1, "tty"]], [[1, "yyx"], [-1, "tyx"]], [[1, "ttyy"], [-1, "ttty"]], [[1, "tyyx"], [-1, "ttyx"]]] ------------------------------- NCo.SetFp(); -- set default Fp=F2 NCo.GB(G); -- over F2, LLEX ordering [[[1, "yt"], [1, "ty"]], [[1, "xt"], [1, "tx"]], [[1, "xy"], [1, "ty"]], [[1, "xx"], [1, "yx"]], [[1, "tyy"], [1, "tty"]], [[1, "yyx"], [1, "tyx"]], [[1, "ttyy"], [1, "ttty"]], [[1, "tyyx"], [1, "ttyx"]]] ------------------------------- NCo.SetFp(3); NCo.GB(G); -- over F3, LLEX ordering [[[1, "yt"], [2, "ty"]], [[1, "xt"], [2, "tx"]], [[1, "xy"], [2, "ty"]], [[1, "xx"], [2, "yx"]], [[1, "tyy"], [2, "tty"]], [[1, "yyx"], [2, "tyx"]], [[1, "ttyy"], [2, "ttty"]], [[1, "tyyx"], [2, "ttyx"]]] ------------------------------- NCo.SetX("txyz"); NCo.SetOrdering("ELIM"); -- ELIM will eliminate t, x, y, z one after another Gb:=NCo.GB(G); NCo.FindPolynomials("xyz",Gb); -- compute GB of the intersection of <G> and F3<x,y,z> [[[1, "xx"], [2, "yx"]], [[1, "xyx"], [2, "yyx"]], [[1, "xyy"], [2, "yxy"]]] -------------------------------

### See also