libsemigroups  v3.0.0
C++ library for semigroups and monoids
Loading...
Searching...
No Matches
kambites-helpers.hpp
1//
2// libsemigroups - C++ library for semigroups and monoids
3// Copyright (C) 2024-2025 James D. Mitchell + Maria Tsalakou
4//
5// This program is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program. If not, see <http://www.gnu.org/licenses/>.
17//
18
19// This file contains the declaration of the Kambites class implementing the
20// algorithm described in:
21//
22// Kambites, M. (2009). Small overlap monoids. I. The word problem. J. Algebra,
23// 321(8), 2187–2205.
24//
25// for solving the word problem in small overlap monoids, and a novel algorithm
26// for computing normal forms in small overlap monoids, by Maria Tsalakou.
27
28#ifndef LIBSEMIGROUPS_KAMBITES_HELPERS_HPP_
29#define LIBSEMIGROUPS_KAMBITES_HELPERS_HPP_
30
31#include "cong-common-helpers.hpp" // for helper declarations in congruence_common namespace
32#include "kambites-class.hpp" // for Kambites
33
34#include "detail/kambites-nf.hpp" // for KambitesNormalFormRange
35
36namespace libsemigroups {
37
38 namespace congruence_common {
40 // Interface helpers - normal_forms
42
61 template <typename Word>
62 auto normal_forms(Kambites<Word>& k) {
64 return detail::KambitesNormalFormRange(k);
65 }
66 } // namespace congruence_common
67
83
89 namespace kambites {
92
94 // Interface helpers - contains
96
101
103 // Interface helpers - reduce
105
110
112 // Interface helpers - normal_forms
114
115 using congruence_common::normal_forms;
116
118 // Interface helpers - partition
120
122
124 // Interface helpers - non_trivial_classes
126
128
129 // There's no non_trivial_classes(Kambites k1, Kambites k2) because it's
130 // unclear how this could be computed (because they always define infinite
131 // semigroups/monoids), so we can't just do non_trivial_classes(k1,
132 // kambites::normal_forms(k2)) (as in ToddCoxeterImpl) because there are
133 // infinitely many normal_forms.
134
135 } // namespace kambites
136} // namespace libsemigroups
137#endif // LIBSEMIGROUPS_KAMBITES_HELPERS_HPP_
void add_generating_pair(Thing &thing, typename Thing::native_word_type const &u, typename Thing::native_word_type const &v)
Helper for adding a generating pair of words.
Definition cong-common-helpers.hpp:200
void add_generating_pair_no_checks(Thing &thing, typename Thing::native_word_type const &u, typename Thing::native_word_type const &v)
Helper for adding a generating pair of words.
Definition cong-common-helpers.hpp:112
bool contains_no_checks(Thing &thing, typename Thing::native_word_type const &u, typename Thing::native_word_type const &v)
Check containment of a pair of words.
Definition cong-common-helpers.hpp:513
bool contains(Thing &thing, typename Thing::native_word_type const &u, typename Thing::native_word_type const &v)
Check containment of a pair of words.
Definition cong-common-helpers.hpp:605
tril currently_contains(Thing const &thing, typename Thing::native_word_type const &u, typename Thing::native_word_type const &v)
Check containment of a pair of words.
Definition cong-common-helpers.hpp:425
tril currently_contains_no_checks(Thing const &thing, typename Thing::native_word_type const &u, typename Thing::native_word_type const &v)
Check containment of a pair of words.
Definition cong-common-helpers.hpp:322
std::vector< std::vector< typename Thing::native_word_type > > non_trivial_classes(Thing &thing, Range r)
Find the non-trivial classes in the partition of a range of words.
std::vector< std::vector< typename Thing::native_word_type > > partition(Thing &thing, Range r)
Partition a range of words.
Thing::native_word_type reduce(Thing const &thing, typename Thing::native_word_type const &w)
Reduce a word.
Thing::native_word_type reduce_no_run_no_checks(Thing const &thing, typename Thing::native_word_type const &w)
Reduce a word with no enumeration or checks.
Thing::native_word_type reduce_no_checks(Thing const &thing, typename Thing::native_word_type const &w)
Reduce a word with no checks.
Thing::native_word_type reduce_no_run(Thing const &thing, typename Thing::native_word_type const &w)
Reduce a word with no enumeration.
void throw_if_not_C4()
Throws if small_overlap_class isn't at least .
Definition kambites-helpers.hpp:89
auto normal_forms(Kambites< Word > &k)
Returns a range object containing normal forms.
Definition kambites-helpers.hpp:62
Namespace for everything in the libsemigroups library.
Definition action.hpp:44