ApCoCoA-1:NCo.SetRelations: Difference between revisions

From ApCoCoAWiki
Xiu (talk | contribs)
No edit summary
m replaced <quotes> tag by real quotes
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Version|1}}
<command>
<command>
<title>NCo.SetRelations</title>
<title>NCo.SetRelations</title>
Line 5: Line 6:
</short_description>
</short_description>
<syntax>
<syntax>
NCo.SetRelations(Relations:LIST)
NCo.SetRelations(R:LIST)
</syntax>
</syntax>
<description>
<description>
Before calling the function, please set ring environment alphabet (or set of indeterminates) <tt>X</tt> through the functions <ref>NCo.SetX</ref>. For more information, please check the relevant functions.
Before calling the function, please set ring environment alphabet (or set of indeterminates) <tt>X</tt> through the functions <ref>ApCoCoA-1:NCo.SetX|NCo.SetX</ref>. For more information, please check the relevant functions.
<itemize>
<itemize>
<item>@param <em>Relations:</em> a finite set of relations. It is of LIST type. Each element in Relations is of the form [W1, W2], where W1 and W2 are words in <tt>&lt;X&gt;</tt>. Each word is represented as a STRING. For example, the word <tt>xy^2x</tt> is represented as <quotes>xyyx</quotes>, and the identity is represented as the empty string <quotes></quotes>. Thus, the relation <tt>(yx, xy)</tt> is represented as [<quotes>yx</quotes>, <quotes>xy</quotes>], and the set of relations <tt>{(yx, xy),(zx,xz),(zy,yz)}</tt> is represented as [[<quotes>yx</quotes>, <quotes>xy</quotes>],[<quotes>zx</quotes>, <quotes>xz</quotes>],[<quotes>zy</quotes>, <quotes>yz</quotes>]].</item>
<item>@param <em>R:</em> a finite set of relations. It is of LIST type. Each element in Relations is of the form [W1, W2], where W1 and W2 are words in <tt>&lt;X&gt;</tt>. Each word is represented as a STRING. For example, the word <tt>xy^2x</tt> is represented as "xyyx", and the identity is represented as the empty string "". Thus, the relation <tt>(yx, xy)</tt> is represented as ["yx", "xy"], and the set of relations <tt>{(yx, xy),(zx,xz),(zy,yz)}</tt> is represented as [["yx", "xy"],["zx", "xz"],["zy", "yz"]].</item>
</itemize>
</itemize>
<example>
<example>
Line 17: Line 18:
Ordering : LLEX
Ordering : LLEX
-------------------------------
-------------------------------
NCo.SetX(<quotes>abc</quotes>);
NCo.SetX("abc");
Relations:=[[<quotes>ba</quotes>,<quotes>ab</quotes>], [<quotes>ca</quotes>,<quotes>ac</quotes>], [<quotes>cb</quotes>,<quotes>bc</quotes>]]; --ba=ab, ca=ac, cb=bc
R:=[["ba","ab"], ["ca","ac"], ["cb","bc"]]; --ba=ab, ca=ac, cb=bc
NCo.SetRelations(Relations);
NCo.SetRelations(R);
NCo.RingEnv();
NCo.RingEnv();
Coefficient ring : Q
Coefficient ring : Q
Alphabet : abc
Alphabet : abc
Ordering : LLEX
Ordering : LLEX
Relations : [[<quotes>ba</quotes>, <quotes>ab</quotes>], [<quotes>ca</quotes>, <quotes>ac</quotes>], [<quotes>cb</quotes>, <quotes>bc</quotes>]] -- relations generated by {ba=ab, ca=ac, cb=bc}
Relations : [["ba", "ab"], ["ca", "ac"], ["cb", "bc"]] -- relations generated by {ba=ab, ca=ac, cb=bc}
-------------------------------
-------------------------------
</example>
</example>
</description>
</description>
<seealso>
<seealso>
<see>NCo.SetX</see>
<see>ApCoCoA-1:NCo.SetX|NCo.SetX</see>
<see>NCo.UnsetRelations</see>
<see>ApCoCoA-1:NCo.UnsetRelations|NCo.UnsetRelations</see>
</seealso>
</seealso>
<types>
<types>
Line 38: Line 39:
<key>NCo.SetRelations</key>
<key>NCo.SetRelations</key>
<key>SetRelations</key>
<key>SetRelations</key>
<wiki-category>Package_gbmr</wiki-category>
<wiki-category>ApCoCoA-1:Package_gbmr</wiki-category>
</command>
</command>

Latest revision as of 13:44, 29 October 2020

This article is about a function from ApCoCoA-1.

NCo.SetRelations

Set relations for a finitely presented monoid ring.

Syntax

NCo.SetRelations(R:LIST)

Description

Before calling the function, please set ring environment alphabet (or set of indeterminates) X through the functions NCo.SetX. For more information, please check the relevant functions.

  • @param R: a finite set of relations. It is of LIST type. Each element in Relations is of the form [W1, W2], where W1 and W2 are words in <X>. Each word is represented as a STRING. For example, the word xy^2x is represented as "xyyx", and the identity is represented as the empty string "". Thus, the relation (yx, xy) is represented as ["yx", "xy"], and the set of relations {(yx, xy),(zx,xz),(zy,yz)} is represented as [["yx", "xy"],["zx", "xz"],["zy", "yz"]].

Example

NCo.RingEnv();
Coefficient ring : Q
Ordering : LLEX
-------------------------------
NCo.SetX("abc");
R:=[["ba","ab"], ["ca","ac"], ["cb","bc"]]; --ba=ab, ca=ac, cb=bc
NCo.SetRelations(R);
NCo.RingEnv();
Coefficient ring : Q
Alphabet : abc
Ordering : LLEX
Relations : [["ba", "ab"], ["ca", "ac"], ["cb", "bc"]] -- relations generated by {ba=ab, ca=ac, cb=bc}
-------------------------------

See also

NCo.SetX

NCo.UnsetRelations