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

From ApCoCoAWiki
Line 1: Line 1:
Package gbmr is designed to enable us to do basic computations, such as addition (via Add(F1,F2)), subtraction (via Subtract(F1,F2)) and 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 finitly generated free monoid rings, finitely presented monoid rings, group ring. etc. As a consequence, the package can also be applied to many algebraic applications, for instance the leading term ideal (via LTIdeal(G)), Hilbert function (via HF(Gb)), etc.
+
Package gbmr is designed to enable us to do basic computations, such as addition (via Add(F1,F2)), subtraction (via Subtract(F1,F2)) and 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 <tt>K</tt>-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 <tt>K</tt>-algebra homomorphism (via KernelOfHomomorphism(X1,X2,Images)), Hilbert function (via HF(Gb)), etc.
  
  
Line 5: Line 5:
  
  
Generally speaking, a finitely presented monoid ring is defined by <tt>P=K<X|R>=K<X>/<R></tt>, where <tt>K</tt> is a field, <tt>X</tt> is a finite alphabet (a finite set of letters or indeterminates), and <tt>R</tt> is a finite set of relations. If <tt>R</tt> is empty, then <tt>P</tt> becomes a free associative <tt>K</tt>-algebra.
+
Generally speaking, a finitely presented monoid ring is defined by <tt>P=K<X|R>=K<X>/<R></tt>, where <tt>K</tt> is a field, <tt>X</tt> is a finite alphabet (a finite set of indeterminates), and <tt>R</tt> is a finite set of relations. Particularly, <tt>P</tt> becomes a free associative <tt>K</tt>-algebra if <tt>R</tt> is empty.
  
  
 
Things to know about this package.
 
Things to know about this package.
  
(a) Predefined alias for this package is
+
(a) Predefined alias for this package is as follows.
  
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Alias NC := $apcocoa/gbmr;
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Alias NC := $apcocoa/gbmr;
  
  
(b) <tt>K</tt> is field of rational number <tt>Q</tt> by default. It can be set to a finite field <tt>Fp</tt> through the functions
+
(b) The alphabet <tt>X</tt> is represented as a STRING of letters. Every letter in <tt>X</tt> should have a unique occurrence. The order of letters in <tt>X</tt> is important since it induces an admissible ordering specified by Ordering. The alphabet <tt>X</tt> is set through the function
  
&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; NC.SetX(X);
 +
 
 +
where <tt>X</tt> is a STRING of letters.
  
where <tt>Prime</tt>is a prime number. The prevouse one sets finite field to <tt>F_{2}=Z/(2)</tt> and the later to <tt>F_{Prime}=Z/(Prime)</tt>. And <tt>K</tt> can be reset to field of rational number through the function
+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(b0) Each word (term) in the free monoid <tt><X></tt> is represented as a STRING with all letters coming from <tt>X</tt>
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NC.UnsetFp();
+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For example, X := "abc"; W := "ba"; means a word <tt>W=ba</tt>.  
  
 +
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Note that the identity element in <tt><X></tt> is the empty word which is represented as an empty STRING "".
  
(c) <tt>X</tt> (or Alphabet) is represented as a STRING of letters. Every letter in <tt>X</tt> should 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> can be set through the function
 
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NC.SetX(X);
+
(c) By default, the field <tt>K</tt> is rational number. It can be set to a finite field <tt>Fp</tt> through the functions
  
where <tt>X</tt> is a STRING of letters. And <tt>X</tt> can be reset to empty through the function
+
&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; NC.UnsetX();
+
where <tt>Prime</tt> is a prime number. The prevouse one sets finite field to <tt>F_{2}=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
  
However I fail to find a proper situation to use it currently.
+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NC.UnsetFp();
  
  
(d) Ordering is a STRING indicating which ordering we are working with. In the package we use admissible orderings. Currently, the package only supports length-lexicographic ordering ("LLEX") and elimination ordering ("ELIM") induced from the order of letters in <tt>X</tt>. The default ordering is "LLEX".
+
(d) An ordering <tt>Ordering</tt> is a STRING indicating which admissible ordering we are working with. Currently, the package only supports length-lexicographic ordering ("LLEX"), elimination ordering ("ELIM") and degree reverse lexicographic ordering ("DEGREVLEX"), which are induced from the order of letters in <tt>X</tt>. Note that the default ordering is "LLEX".
  
 
For example, X:="abc"; Ordering:="ELIM"; means elimination ordering induced from <tt>a>b>c</tt>.  
 
For example, X:="abc"; Ordering:="ELIM"; means elimination ordering induced from <tt>a>b>c</tt>.  
  
Ordering can be set through the function
+
The ordering <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; NC.SetOrdering(Ordering);
  
where Ordering is the ordering supported by the package. And Ordering can be reset to "LLEX" through 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; NC.UnsetOrdering();
  
  
(e) Relations, which is a finite generating set, is represented as a LIST of relations. Each relation of Relations is represented as a LIST (pair) composting of two words in <tt>X*</tt>.
+
(e) A set <tt>Relations</tt> of relations is a finite set represented as a LIST. Each relation in <tt>Relations</tt> is represented as a LIST composting of two words from <tt><X></tt>.
 
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(e0) Each word (term) in <tt>X*</tt> is represented as a STRING with all letters coming from <tt>X</tt>. 
 
 
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For example, X := "abc"; W := "ba"; means <tt>W=ba</tt>.
 
 
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Note that unit in <tt>X*</tt> is empty word represented as an empty STRING "".
 
  
For example, X := "abc"; Relations := [["ba","ab"], ["ca","ac"], ["cb","bc"]]; means Relations generated by <tt>{ba=ab, ca=ac, cb=bc}</tt>.  
+
For example, X := "abc"; Relations := [["ba","ab"], ["ca","ac"], ["cb","bc"]]; means <tt>Relations</tt> containing <tt>ba=ab</tt>, <tt>ca=ac</tt> and <tt>cb=bc</tt>.  
  
Relations can be set through the function
+
A set of relations 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; NC.SetRelations(Relations);
  
where Relations is a properly represented Relations. And Relations can be reset to empty through 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; NC.UnsetRelations();
  
which might be a tricky way to change a monoid ring to a free associative <tt>K</tt>-algebra.
+
Note that using the function UnsetRelations() is a tricky way to change a monoid ring to a free monoid ring.
  
  

Revision as of 11:47, 6 June 2012

Package gbmr is designed to enable us to do basic computations, such as addition (via Add(F1,F2)), subtraction (via Subtract(F1,F2)) and 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 each computation mentioned above, there are three different functions having the same functionality but under different settings. Let us take addition for 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 NC := $apcocoa/gbmr;


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

             NC.SetX(X);

where X is a STRING of letters.

      (b0) 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 an empty STRING "".


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

             NC.SetFp(); and NC.SetFp(Prime);

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

             NC.UnsetFp();


(d) An ordering Ordering is a STRING indicating which admissible ordering we are working with. Currently, the package only supports length-lexicographic ordering ("LLEX"), elimination ordering ("ELIM") and degree reverse lexicographic ordering ("DEGREVLEX"), which are induced from the order of letters in X. Note that the default ordering is "LLEX".

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

The ordering Ordering is set through the function

             NC.SetOrdering(Ordering);

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

             NC.UnsetOrdering();


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

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

A set of relations is set through the function

             NC.SetRelations(Relations);

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

             NC.UnsetRelations();

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


(f) Rules, which is also a finite generating set, is represented as a LIST of (rewriting) rules. Each rule of Rules is represented as a LIST (pair) consisting of one word in X* and one polynomial in K<X> (or K<X|R>).

      (f0) Each polynomial in K<X> (or K<X|R>) is represented as a LIST of monomials, and each monomial is represented as a LIST (pair) consisting of one coefficient in K and one word (term) in X*.

      For example, X := "abc"; P := [[1,"ab"], [1,""]]; means P=ab+1.

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

For example, X := "ab"; Rules := [["ba", [[1,"ab"], [1,""]]]]; means Rules generated by {ba=ab+1}.

Rules can be set through the function

             NC.SetRules(Rules);

where Rules is a properly represented Rules. And Rules can be reset to empty through the function

             NC.UnsetRules();


(g) There is a function to get general information about ring environment.

             NC.RingEnv();


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.