21#ifndef LIBSEMIGROUPS_KNUTH_BENDIX_HELPERS_HPP_
22#define LIBSEMIGROUPS_KNUTH_BENDIX_HELPERS_HPP_
32#include "cong-common-helpers.hpp"
33#include "constants.hpp"
35#include "exception.hpp"
36#include "knuth-bendix-class.hpp"
38#include "presentation.hpp"
41#include "word-graph-helpers.hpp"
42#include "word-graph.hpp"
43#include "word-range.hpp"
45#include "detail/fmt.hpp"
46#include "detail/knuth-bendix-nf.hpp"
47#include "detail/rewriters.hpp"
51 namespace congruence_common {
79 template <
typename Word,
typename Rewriter,
typename ReductionOrder>
81 normal_forms(KnuthBendix<Word, Rewriter, ReductionOrder>& kb) {
82 return detail::KnuthBendixNormalFormRange<Word, Rewriter, ReductionOrder>(
130 template <
typename Word,
typename Rewriter,
typename ReductionOrder>
131 [[nodiscard]] std::vector<std::vector<Word>>
133 KnuthBendix<Word, Rewriter, ReductionOrder>& kb2);
190 template <
typename Word,
typename Rewriter,
typename ReductionOrder>
211#ifndef LIBSEMIGROUPS_PARSED_BY_DOXYGEN
212 template <
typename Rewriter,
typename ReductionOrder>
214 is_reduced(detail::KnuthBendixImpl<Rewriter, ReductionOrder>& kb);
216 template <
typename Word,
typename Rewriter,
typename ReductionOrder>
250 using congruence_common::normal_forms;
299 template <
typename Word,
typename Time>
306#include "knuth-bendix-helpers.tpp"
For an implementation of presentations for semigroups or monoids.
Definition presentation.hpp:103
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 by_overlap_length(KnuthBendix< Word, Rewriter, ReductionOrder > &kb)
Run the Knuth-Bendix algorithm by considering all overlaps of a given length.
bool is_reduced(KnuthBendix< Word, Rewriter, ReductionOrder > &kb)
Check if the all rules are reduced with respect to each other.
std::vector< Word >::const_iterator redundant_rule(Presentation< Word > const &p, Time t)
Return an iterator pointing at the left hand side of a redundant rule.
Definition knuth-bendix-helpers.hpp:156
Namespace for everything in the libsemigroups library.
Definition action.hpp:44