up previous next
NC.Subtract

Subtraction of two polynomials in a free monoid ring.
Syntax
          
NC.Subtract(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 ring environment coefficient fieldK, alphabet (or set of indeterminates) X and ordering via the functions NC.SetFp, NC.SetX and NC.SetOrdering, respectively, before calling the function. The default coefficient field is Q. The default ordering is length-lexicographic ordering ("LLEX"). For more information, please check the relevant functions.

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


See Also