55
66 The full license is in the file LICENSE, distributed with this software.
77
8- .. TODO update
9-
108.. currentmodule :: libsemigroups_pybind11
119
1210Converting to a KnuthBendix
@@ -35,8 +33,8 @@ possible:
3533
3634.. _todd-coxeter-to-knuth-bendix-default :
3735
38- Converting a :any: `ToddCoxeter ` to a :any: `KnuthBendix ` (default rewriter )
39- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36+ Converting a :any: `ToddCoxeter ` to a :any: `KnuthBendix ` (default rewriting system and order )
37+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4038
4139To construct a :any: `KnuthBendix ` from a :any: `ToddCoxeter ` using the default
4240rewriter, specify all of the following values for *args *:
@@ -99,12 +97,19 @@ following values for *args*:
9997 - **tc ** (:any: `ToddCoxeter `) -- the :any: `ToddCoxeter ` object being
10098 converted.
10199
102- Additionally, specify one of the following for *rtype *:
100+ Additionally, specify *rtype * to be a tuple with first item :any: `KnuthBendix `, second item one of
101+
102+ - ``'Trie' `` for constructing a :any: `KnuthBendix `
103+ with a trie based rewriting system.
104+ - ``'Set' `` for constructing a :any: `KnuthBendix `
105+ with a set based rewriting system.
103106
104- - ``(KnuthBendix, 'RewriteTrie') `` for constructing a :any: `KnuthBendix `
105- with the ``RewriteTrie `` rewriter.
106- - ``(KnuthBendix, 'RewriteFromLeft') `` for constructing a :any: `KnuthBendix `
107- with the ``RewriteFromLeft `` rewriter.
107+ and the third item one of:
108+
109+ - :any: `Order.shortlex ` for constructing a :any: `KnuthBendix `
110+ with short-lex reduction ordering.
111+ - :any: `Order.recursive ` for constructing a :any: `KnuthBendix `
112+ with recursive path reduction ordering.
108113
109114This function converts a :any: `ToddCoxeter ` object *tc * to a :any: `KnuthBendix `
110115object with the rewriter as specified above, using
@@ -119,6 +124,7 @@ the semigroup defined by *tc*.
119124 ... congruence_kind,
120125 ... to,
121126 ... KnuthBendix,
127+ ... Order,
122128 ... Presentation,
123129 ... presentation,
124130 ... ToddCoxeter,
@@ -134,7 +140,7 @@ the semigroup defined by *tc*.
134140 >>> kb = to(
135141 ... congruence_kind.twosided, # knd
136142 ... tc, # tc
137- ... rtype= (KnuthBendix, ' RewriteFromLeft ' )
143+ ... rtype= (KnuthBendix, ' Set ' , Order.shortlex )
138144 ... )
139145 >>> kb.run()
140146
@@ -156,18 +162,30 @@ following values for *args*:
156162
157163Additionally, specify one of the following for *rtype *:
158164
159- - ``(KnuthBendix, str, 'RewriteTrie' ) `` for constructing a
160- :any: `KnuthBendix ` on words with type ``str `` using the `` RewriteTrie ``
161- rewriter .
162- - ``(KnuthBendix, list[int], 'RewriteTrie' ) `` for constructing a
165+ - ``(KnuthBendix, str, 'Trie', Order.shortlex ) `` for constructing a
166+ :any: `KnuthBendix ` on words with type ``str `` using the
167+ trie based rewriting system and short-lex reduction ordering .
168+ - ``(KnuthBendix, list[int], 'Trie', Order.shortlex ) `` for constructing a
163169 :any: `KnuthBendix ` on words with type ``list[int] `` using the
164- ``RewriteTrie `` rewriter.
165- - ``(KnuthBendix, str, 'RewriteFromLeft') `` for constructing a
170+ trie based rewriting system and short-lex reduction ordering.
171+ - ``(KnuthBendix, str, 'Set', Order.shortlex) `` for constructing a
172+ :any: `KnuthBendix ` on words with type ``str `` using a set based rewriting
173+ system and short-lex reduction ordering.
174+ - ``(KnuthBendix, list[int], 'Set', Order.shortlex) `` for constructing a
175+ :any: `KnuthBendix ` on words with type ``list[int] `` using a set based
176+ rewriting system and short-lex reduction ordering.
177+ - ``(KnuthBendix, str, 'Trie', Order.recursive) `` for constructing a
166178 :any: `KnuthBendix ` on words with type ``str `` using the
167- `` RewriteFromLeft `` rewriter .
168- - ``(KnuthBendix, list[int], 'RewriteFromLeft' ) `` for constructing a
179+ trie based rewriting system and recursive path reduction ordering .
180+ - ``(KnuthBendix, list[int], 'Trie', Order.recursive ) `` for constructing a
169181 :any: `KnuthBendix ` on words with type ``list[int] `` using the
170- ``RewriteFromLeft `` rewriter.
182+ trie based rewriting system and recursive path reduction ordering.
183+ - ``(KnuthBendix, str, 'Set', Order.recursive) `` for constructing a
184+ :any: `KnuthBendix ` on words with type ``str `` using a set based rewriting
185+ system and recursive path reduction ordering.
186+ - ``(KnuthBendix, list[int], 'Set', Order.recursive) `` for constructing a
187+ :any: `KnuthBendix ` on words with type ``list[int] `` using a set based
188+ rewriting system and short-lex reduction ordering.
171189
172190This function converts a :any: `FroidurePin ` object *fpb * to a :any: `KnuthBendix `
173191object with the word type and rewriter as specified above. This is done using
@@ -198,7 +216,7 @@ the semigroup defined by *fpb*.
198216 >>> kb = to(
199217 ... congruence_kind.twosided, # knd
200218 ... S, # tc
201- ... rtype= (KnuthBendix, list[int ], ' RewriteFromLeft ' )
219+ ... rtype= (KnuthBendix, list[int ], ' Set ' , Order.recursive )
202220 ... )
203221 >>> kb.run()
204222
0 commit comments