Defined in present.hpp
and knuth-bendix.hpp
.
This page contains the documentation for various helper functions for manipulating :cppPresentation
objects. All such functions are contained in the namespace presentation
.
These functions are available in the present.hpp
file except :cppredundant_rule
which is in knuth-bendix.hpp
.
:cppadd_rule |
Add a rule to the presentation. |
:cppadd_rule_and_check |
Add a rule to the presentation and check. |
:cppadd_identity_rules |
Add rules for an identity element. |
:cppadd_inverse_rules |
Add rules for inverses. |
:cppadd_zero_rules |
Add rules for a zero element. |
:cppare_rules_sorted |
Check if the rules u1 = v1, …, un = vn satisfy u1v1 < ⋯ < unvn where < is the shortlex order. |
:cppchange_alphabet |
Change or re-order the alphabet. |
:cppcharacter |
Return a char by index (ordered for readability). |
:cppfirst_unused_letter |
Returns the first letter not in the alphabet of a presentation. |
:cppgreedy_reduce_length |
Greedily reduce the length of the presentation using :cpplongest_common_subword . |
:cppis_strongly_compressible |
Returns true if the 1-relation presentation can be strongly compressed. |
:cpplength |
Return the sum of the lengths of the rules. |
:cppletter |
Return a possible letter by index. |
:cpplongest_common_subword |
Returns the longest common subword of the rules. |
:cpplongest_rule |
Returns an iterator pointing at the left hand side of the first rule of maximal length. |
:cpplongest_rule_length |
Returns the maximum length of a rule. |
:cppmake_semigroup |
Convert a monoid presentation to a semigroup presentation. |
:cppnormalize_alphabet |
Modify the presentation so that the alphabet is {0, …, n − 1} (or equivalent) and rewrites the rules. |
:cppreduce_complements |
If there are rules u = v and v = w where |w| < |v|, then replace u = v by u = w. |
:cppreduce_to_2_generators |
Reduce the number of generators in a f$1f$-relation presentation to 2. |
:cppredundant_rule |
Return an iterator pointing at the left hand side of a redundant rule. |
:cppremove_duplicate_rules |
Remove duplicate rules. |
:cppremove_redundant_generators |
Remove any trivially redundant generators. |
:cppremove_trivial_rules |
Remove rules consisting of identical words. |
:cppreplace_subword |
Replace non-overlapping instances of a subword. |
:cppreplace_word |
Replace instances of a word occupying either side of a rule. |
:cppreverse |
Reverse every word in every rule. |
:cppshortest_rule |
Returns an iterator pointing at the left hand side of the first rule of minimal length. |
:cppshortest_rule_length |
Returns the minimum length of a rule. |
:cppsort_each_rule |
Sort each rule u = v so that the left hand side is shortlex greater than the right hand side. |
:cppsort_rules |
Sort the rules u1 = v1, …, un = vn so that u1v1 < ⋯ < unvn. |
:cppstrongly_compress |
Strongly compress a 1-relation presentation. |
libsemigroups::presentation