up previous next
NC.Add

Addition of two polynomials over a free associative K-algebra.
Syntax
          
NC.Add(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.

Before calling the function, please set ring environment coefficient field K, alphabet X and ordering through the functions NC.SetFp(Prime) (or NC.UnsetFp()), NC.SetX(X) and NC.SetOrdering(Ordering) respectively. Default coefficient field is Q. Default ordering is length-lexicographic ordering ("LLEX"). For more information, please check the relevant functions.

Example
NC.SetX("abc"); 				
NC.SetOrdering("ELIM"); 
NC.RingEnv();
Coefficient ring : Q
Alphabet : abc
Ordering : ELIM

-------------------------------		
F1 := [[1,"a"],[1,""]];
F2 := [[1,"b"],[1,"ba"]];
NC.Add(F1,F2); -- over Q
[[1, "ba"], [1, "a"], [1, "b"], [1, ""]]
-------------------------------
NC.SetFp(); -- set default Fp = F2
NC.RingEnv();
Coefficient ring : Fp = Z/(2)
Alphabet : abc
Ordering : ELIM

-------------------------------
NC.Add(F1,F2); -- over F2
[[1, "ba"], [1, "a"], [1, "b"], [1, ""]]
-------------------------------
NC.Add(F1,F1); -- over F2
[ ]
-------------------------------


See Also