up previous next
Leading coefficient of a polynomial over a free associative K-algebra.
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.
- @param F: a polynomial in K. Each polynomial in K is represented as a LIST of LISTs, which are pairs of form [c, w] where c is in K and w is a word in X*. Unit in X* is empty word represented as an empty string "". 0 polynomial is represented as an empty list. For example, polynomial F:=xy-y+1 in K is represented as F:=[[1,"xy"], [-1, "y"], [1,""]].
- @return: an element of the current field which is the leading term of F with respect to the current ordering. If F=0, then 0 will be returned.
NC.SetX("abc");
F:=[[1,"ab"],[2,"aa"],[3,"bb"],[4,"bab"]];
NC.SetOrdering("ELIM");
NC.LC(F);
2
-------------------------------
NC.SetOrdering("LLEX");
NC.LC(F);
4
-------------------------------
NC.LC([]); -- 0 polynomial
0
-------------------------------
|