up previous next
NC.MRAdd

Addition of two polynomials in a finitely presented monoid ring.
Syntax
          
NC.MRAdd(X:STRING, Ordering:STRING, Relations: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.

Please set coefficient field via the function NC.SetFp (or NC.UnsetFp) before calling this function. The default coefficient field is Q. For more information, please check the relevant function.

Example
X := "abc";  
Ordering := "LLEX";  
Relations := [["aa",""], ["bb",""], ["ab","c"], ["ac", "b"], ["cb", "a"]];  
F1 := []; -- F1=0
F2 := []; -- F2=0
NC.MRAdd(X, Ordering, Relations, F1,F2);
[ ]
-------------------------------
F3 := [[1,"b"],[1,"ba"]]; -- F3=b+ba
NC.MRAdd(X, Ordering, Relations, F1,F3);
[[1, "ba"], [1, "b"]]
-------------------------------
NC.SetFp(2); 
F4 := [[1,"a"],[1,""]]; -- F4=a+1  
F5 := [[1,"b"],[1,"ac"]]; -- F5=b+ac=(by applying Relations)=>2b=0
NC.MRAdd(X, Ordering, Relations, F4,F5);
[[1, "a"], [1, ""]]
-------------------------------


See Also