up previous next
NC.SetRules

Sets the (rewriting) rules over a monoid ring.
Syntax
          
NC.SetRules(Rules:LIST)

          

Description
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.RingEnv();
Coefficient ring : Q
Ordering : LLEX

-------------------------------
NC.SetX("ab");
Rules:=[["ba",[[1,"ab"],[1,""]]]]; -- ba= ab+1
NC.SetRules(Rules);
NC.RingEnv();
Coefficient ring : Q
Alphabet : ab
Ordering : LLEX
Rules : [["ba", [[1, "ab"], [1, ""]]]] -- rewriting rules generated by {ba=ab+1}

-------------------------------


See Also