Difference between revisions of "Category:ApCoCoA-1:Package gbmr"

From ApCoCoAWiki
Line 11: Line 11:
 
(a) Predefined alias for this package is as follows.
 
(a) Predefined alias for this package is as follows.
  
             Alias NC := $apcocoa/gbmr;
+
             Alias NCo. := $apcocoa/gbmr;
  
  
 
(b) By default, the field <tt>K</tt> is rational numbers. It can be set to a finite field <tt>Fp</tt> through the functions
 
(b) By default, the field <tt>K</tt> is rational numbers. It can be set to a finite field <tt>Fp</tt> through the functions
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NC.SetFp(); and NC.SetFp(Prime);
+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NCo.SetFp(); and NCo.SetFp(Prime);
  
 
where <tt>Prime</tt> is a prime number. The former sets finite field to <tt>F2=Z/(2)</tt>, and the latter to <tt>F_{Prime}=Z/(Prime)</tt>. One can reset <tt>K</tt> to rational number via the function
 
where <tt>Prime</tt> is a prime number. The former sets finite field to <tt>F2=Z/(2)</tt>, and the latter to <tt>F_{Prime}=Z/(Prime)</tt>. One can reset <tt>K</tt> to rational number via the function
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NC.UnsetFp();
+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NCo.UnsetFp();
  
  
 
(c) The alphabet <tt>X</tt> is represented as a STRING of letters. Every letter in <tt>X</tt> must have a unique occurrence. The order of letters in <tt>X</tt> is important since it induces an admissible ordering specified by Ordering. <tt>X</tt> is set through the function
 
(c) The alphabet <tt>X</tt> is represented as a STRING of letters. Every letter in <tt>X</tt> must have a unique occurrence. The order of letters in <tt>X</tt> is important since it induces an admissible ordering specified by Ordering. <tt>X</tt> is set through the function
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NC.SetX(X);
+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NCo.SetX(X);
  
 
where <tt>X</tt> is a STRING of letters.
 
where <tt>X</tt> is a STRING of letters.
Line 44: Line 44:
  
  
(d) An admissible ordering <tt>Ordering</tt> is a STRING indicating which ordering we are working with. Currently, the package only supports length-lexicographic ordering ("LLEX"), elimination ordering ("ELIM") and length-reverse-lexicographic ordering ("LRLEX"), which are induced from the order of letters in <tt>X</tt>. We refer to the function NC.SetOrdering for the definitions of these orderings. Note that the default ordering is "LLEX".
+
(d) An admissible ordering <tt>Ordering</tt> is a STRING indicating which ordering we are working with. Currently, the package only supports length-lexicographic ordering ("LLEX"), elimination ordering ("ELIM") and length-reverse-lexicographic ordering ("LRLEX"), which are induced from the order of letters in <tt>X</tt>. We refer to the function NCo.SetOrdering for the definitions of these orderings. Note that the default ordering is "LLEX".
  
 
For example, X:="abc"; Ordering:="ELIM"; means the elimination ordering induced by <tt>a>b>c</tt>.  
 
For example, X:="abc"; Ordering:="ELIM"; means the elimination ordering induced by <tt>a>b>c</tt>.  
Line 50: Line 50:
 
<tt>Ordering</tt> is set through the function
 
<tt>Ordering</tt> is set through the function
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NC.SetOrdering(Ordering);
+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NCo.SetOrdering(Ordering);
  
 
where <tt>Ordering</tt> is one of the orderings supported by the package. One can reset <tt>Ordering</tt> to "LLEX" via the function
 
where <tt>Ordering</tt> is one of the orderings supported by the package. One can reset <tt>Ordering</tt> to "LLEX" via the function
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NC.UnsetOrdering();
+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NCo.UnsetOrdering();
  
  
Line 63: Line 63:
 
<tt>Relations</tt> is set through the function
 
<tt>Relations</tt> is set through the function
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NC.SetRelations(Relations);
+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NCo.SetRelations(Relations);
  
 
where <tt>Relations</tt> is a set of properly represented relations. One can set <tt>Relations</tt> to empty via the function
 
where <tt>Relations</tt> is a set of properly represented relations. One can set <tt>Relations</tt> to empty via the function
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NC.UnsetRelations();
+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NCo.UnsetRelations();
  
 
Note that using the functions UnsetRelations() is a tricky way to change a monoid ring to a free monoid ring.
 
Note that using the functions UnsetRelations() is a tricky way to change a monoid ring to a free monoid ring.
Line 78: Line 78:
 
<tt>Rules</tt> is set through the function
 
<tt>Rules</tt> is set through the function
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NC.SetRules(Rules);
+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NCo.SetRules(Rules);
  
 
where <tt>Rules</tt> is a set of properly represented rules. One can set <tt>Rules</tt> to empty via the function
 
where <tt>Rules</tt> is a set of properly represented rules. One can set <tt>Rules</tt> to empty via the function
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NC.UnsetRules();
+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NCo.UnsetRules();
  
  
 
(g) There is a function for showing general information on ring environment.
 
(g) There is a function for showing general information on ring environment.
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NC.RingEnv();
+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NCo.RingEnv();
  
  
 
[[Category:ApCoCoA_Manual]]
 
[[Category:ApCoCoA_Manual]]

Revision as of 14:29, 25 April 2013

Package gbmr is designed to enable us to do basic computations, such as addition (via Add(F1,F2)), subtraction (via Subtract(F1,F2)), multiplication (via Multiply(F1,F2)), leading term (via LT(F)), leading coefficient (via LC(F)), normal remainder (via NR(F,G)), (partial) Groebner basis (via GB(G)), reduced (partial) Groebner basis (via ReducedGB(G)) and so on, over non-commutative algebras, i.e. over finitely generated free monoid rings (or free associative K-algebras or non-commutative polynomial rings), finitely presented monoid rings, group ring, etc. Consequently, the package can be applied to many algebraic applications, for instance the computations of leading term ideal (via LTIdeal(G)), kernel of K-algebra homomorphism (via KernelOfHomomorphism(X1,X2,Images)), Hilbert function (via HF(Gb)), etc.

For most computations, there are three different functions having the same functionality but under different settings. Let us take addition as an example. There are three functions, namely MRAdd(X,Ordering,Relations,F1,F2), Add(F1,F2) and GAdd(F1,F2), doing addition over monoid ring, free associative algebra and group ring, respectively. For details about how to use each of them, please check relevant functions.


Generally speaking, a finitely presented monoid ring is defined by P=K<X|R>=K<X>/<R>, where K is a field, X is a finite alphabet (a finite set of indeterminates), and R is a finite set of relations. Particularly, P becomes a free associative K-algebra if R is empty.


Things to know about this package.

(a) Predefined alias for this package is as follows.

             Alias NCo. := $apcocoa/gbmr;


(b) By default, the field K is rational numbers. It can be set to a finite field Fp through the functions

             NCo.SetFp(); and NCo.SetFp(Prime);

where Prime is a prime number. The former sets finite field to F2=Z/(2), and the latter to F_{Prime}=Z/(Prime). One can reset K to rational number via the function

             NCo.UnsetFp();


(c) The alphabet X is represented as a STRING of letters. Every letter in X must have a unique occurrence. The order of letters in X is important since it induces an admissible ordering specified by Ordering. X is set through the function

             NCo.SetX(X);

where X is a STRING of letters.

      (c.1) Each word (term) in the free monoid <X> is represented as a STRING with all letters coming from X.

      For example, X:="abc"; W:="ba"; means a word W=ba.

      Note that the identity element in <X> is the empty word which is represented as the empty STRING "".

      (c.2) Each polynomial in K<X> (or K<X|R>) is represented as a LIST of monomials, and each monomial is represented as a LIST consisting of an element (coefficient) in K and a word (term) in <X>.

      For example, X := "abc"; P := [[1,"ab"],[1,"bb"],[1,""]]; means a polynomial P=ab+b^2+1.

      Note that the zero polynomial 0 is represented as the empty LIST [].

      (c.3) In the case that K=F2, every polynomial can be represented as a LIST of words (terms) in <X>. For example, the polynomial P=ab+b^2+1 in F2<a,b> is represented as P := ["ab","bb",""]. We refer to the examples of functions in free monoid rings over F2 (functions with the prefix "G") for more details.


(d) An admissible ordering Ordering is a STRING indicating which ordering we are working with. Currently, the package only supports length-lexicographic ordering ("LLEX"), elimination ordering ("ELIM") and length-reverse-lexicographic ordering ("LRLEX"), which are induced from the order of letters in X. We refer to the function NCo.SetOrdering for the definitions of these orderings. Note that the default ordering is "LLEX".

For example, X:="abc"; Ordering:="ELIM"; means the elimination ordering induced by a>b>c.

Ordering is set through the function

             NCo.SetOrdering(Ordering);

where Ordering is one of the orderings supported by the package. One can reset Ordering to "LLEX" via the function

             NCo.UnsetOrdering();


(e) A set Relations of relations is a finite set represented as a LIST. Each relation in Relations is represented as a LIST composed of two words in <X>.

For example, X := "abc"; Relations := [["ba","ab"], ["ca","ac"], ["cb","bc"]]; means Relations containing relations ba=ab, ca=ac and cb=bc.

Relations is set through the function

             NCo.SetRelations(Relations);

where Relations is a set of properly represented relations. One can set Relations to empty via the function

             NCo.UnsetRelations();

Note that using the functions UnsetRelations() is a tricky way to change a monoid ring to a free monoid ring.


(f) A set Rules of rewriting rules is a finite set represented as a LIST. Each rewriting rule in Rules is represented as a LIST composed of a word in <X> and a polynomial in K<X> (or K<X|R>).

For example, X := "ab"; Rules := [["ba", [[1,"ab"], [1,""]]]]; means Rules containing rewriting rule ba=ab+1.

Rules is set through the function

             NCo.SetRules(Rules);

where Rules is a set of properly represented rules. One can set Rules to empty via the function

             NCo.UnsetRules();


(g) There is a function for showing general information on ring environment.

             NCo.RingEnv();