libsemigroups  v3.0.0
C++ library for semigroups and monoids
Loading...
Searching...
No Matches
cong-helpers.hpp
1//
2// libsemigroups - C++ library for semigroups and monoids
3// Copyright (C) 2024-2025 James D. Mitchell
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 declarations related to the helper functions for the
20// Congruence class.
21
22#ifndef LIBSEMIGROUPS_CONG_HELPERS_HPP_
23#define LIBSEMIGROUPS_CONG_HELPERS_HPP_
24
25#include <memory> // for shared_ptr
26#include <string> // for string
27#include <vector> // for vector
28
29#include "cong-class.hpp" // for Congruence
30#include "cong-common-helpers.hpp" // for partition, add_gener...
31#include "exception.hpp" // for LIBSEMIGROUPS_EXCEPTION
32#include "kambites-class.hpp" // for Kambites
33#include "types.hpp" // for word_type
34
35#include "detail/knuth-bendix-impl.hpp" // for KnuthBendixImpl
36#include "detail/todd-coxeter-impl.hpp" // for ToddCoxeterImpl
37
38namespace libsemigroups {
39
40 // forward decl
41 template <typename Word>
42 class Presentation;
43
44 namespace congruence_common {
46 // Interface helpers - normal_forms
48
49 // TODO(1) implement (see tpp file)
50
52 // Interface helpers - partition
54
55 // The function template:
56 //
57 // template <typename Word,
58 // typename Range,
59 // typename = std::enable_if_t<rx::is_input_or_sink_v<Range>>>
60 // [[nodiscard]] std::vector<std::vector<Word>> partition(Congruence<Word>&
61 // ci, Range r);
62 //
63 // is forward declared in cong-common-helpers.hpp
64
65 } // namespace congruence_common
66
83
89 namespace congruence {
90
92 // Interface helpers - add_generating_pair
94
97
99 // Interface helpers - contains
101
106
108 // Interface helpers - reduce
110
115
117 // Interface helpers - partitioning
119
122
123 } // namespace congruence
124} // namespace libsemigroups
125
126#include "cong-helpers.tpp"
127#endif // LIBSEMIGROUPS_CONG_HELPERS_HPP_
For an implementation of presentations for semigroups or monoids.
Definition presentation.hpp:102
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.
Definition cong-helpers.hpp:89
Namespace for everything in the libsemigroups library.
Definition action.hpp:44