ApCoCoA-1:NC.Add

From ApCoCoAWiki
Revision as of 07:35, 14 July 2010 by 132.231.10.60 (talk) (New page: <command> <title>Gbmr.MRAdd</title> <short_description> Addition of two polynomials over a monoid ring. </short_description> <syntax> Gbmr.MRAdd(X:STRING, Ordering:STRING, R:LIST, F1:LIST,...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Gbmr.MRAdd

Addition of two polynomials over a monoid ring.

Syntax

Gbmr.MRAdd(X:STRING, Ordering:STRING, R:LIST, F1:LIST, F2: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.

  • @param X: an finite set of letters. It is of STRING type. Notice that every letter in X MUST appear only once.The order of letters in X is very important, since it induces a term ordering.

  • @param Ordering: a term ordering induced by the order of letters in X. It is represented as a STRING, which is a shortened-form of a name of corresponding term ordering. Notice that "LLEX" (length-lexicographic ordering) and "ELIM" (elimination ordering) are the only orderings supported currently.

  • @param R: a finite set of relations and it is of LIST type. Each element in R has form [w_{l}, w_{r}], where w_{l} and w_{r} are terms in M. Each term is represented as a STRING. For example, xy^2x is represented as "xyyx", identity element is represented as an empty STRING "", and relation (yx, xy) is represented as ["yx", "xy"].

  • @param F1, F2: two polynomials, where are left and right operands of addition respectively. Each polynomial is represented as a LIST of LISTs, which are pairs of form [a_{i}, w_{i}]. For example, polynomial F:=xy-y+1 is represented as F:=[[1,"xy"], [-1, "y"], [1,""]]. Zero polynomial is represented as an empty LIST [].

  • @return: a LIST which represents a polynomial equal to F1+F2.

Example

X := <quotes>abc</quotes>;  
Ordering := <quotes>LLEX</quotes>;  
Relations := [[<quotes>aa</quotes>,<quotes></quotes>], [<quotes>bb</quotes>,<quotes></quotes>], [<quotes>ab</quotes>,<quotes>c</quotes>], [<quotes>ac</quotes>, <quotes>b</quotes>], [<quotes>cb</quotes>, <quotes>a</quotes>]];  
F1 := []; -- F1=0
F2 := []; -- F2=0
Gbmr.MRAdd(X, Ordering, Relations, F1,F2);
ERROR: Undefined indeterminate e
CONTEXT: $cocoa5.PrintTime(1 * e - 05)
-------------------------------
[ ]
-------------------------------

X := <quotes>abc</quotes>;  
Ordering := <quotes>LLEX</quotes>;  
Relations := [[<quotes>aa</quotes>,<quotes></quotes>], [<quotes>bb</quotes>,<quotes></quotes>], [<quotes>ab</quotes>,<quotes>c</quotes>], [<quotes>ac</quotes>, <quotes>b</quotes>], [<quotes>cb</quotes>, <quotes>a</quotes>]];  
F1 := []; -- F1=0  
F2 := [[1,<quotes>b</quotes>],[1,<quotes>ba</quotes>]]; -- F2=b+ba
Gbmr.MRAdd(X, Ordering, Relations, F1,F2);
ERROR: Undefined indeterminate e
CONTEXT: $cocoa5.PrintTime(33 / 10 * e - 05)
-------------------------------
[[1, <quotes>ba</quotes>], [1, <quotes>b</quotes>]]
-------------------------------

X := <quotes>abc</quotes>;   
Ordering := <quotes>LLEX</quotes>;   
Relations := [[<quotes>aa</quotes>,<quotes></quotes>], [<quotes>bb</quotes>,<quotes></quotes>], [<quotes>ab</quotes>,<quotes>c</quotes>], [<quotes>ac</quotes>, <quotes>b</quotes>], [<quotes>cb</quotes>, <quotes>a</quotes>]];   
F1 := [[1,<quotes>a</quotes>],[1,<quotes></quotes>]]; -- F1=a+1  
F2 := [[1,<quotes>b</quotes>],[1,<quotes>ac</quotes>]]; -- F2=b+ac=2b 
Gbmr.MRAdd(X, Ordering, Relations, F1,F2);
ERROR: Undefined indeterminate e
CONTEXT: $cocoa5.PrintTime(24 / 10 * e - 05)
-------------------------------
[[1, <quotes>a</quotes>], [2, <quotes>b</quotes>], [1, <quotes></quotes>]]
-------------------------------

See also

Gbmr.MRSubtract

Gbmr.MRMultiply

Gbmr.MRBP

Gbmr.MRIntersection

Gbmr.MRKernelOfHomomorphism

Gbmr.MRMinimalPolynomials

Introduction to CoCoAServer