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.hpp"
42#include "word-range.hpp"
44#include "detail/fmt.hpp"
45#include "detail/knuth-bendix-nf.hpp"
46#include "detail/rewriters.hpp"
50 namespace congruence_common {
78 template <
typename Word,
typename Rewriter,
typename ReductionOrder>
80 normal_forms(KnuthBendix<Word, Rewriter, ReductionOrder>& kb) {
81 return detail::KnuthBendixNormalFormRange<Word, Rewriter, ReductionOrder>(
129 template <
typename Word,
typename Rewriter,
typename ReductionOrder>
130 [[nodiscard]] std::vector<std::vector<Word>>
132 KnuthBendix<Word, Rewriter, ReductionOrder>& kb2);
189 template <
typename Word,
typename Rewriter,
typename ReductionOrder>
210#ifndef LIBSEMIGROUPS_PARSED_BY_DOXYGEN
211 template <
typename Rewriter,
typename ReductionOrder>
213 is_reduced(detail::KnuthBendixImpl<Rewriter, ReductionOrder>& kb);
215 template <
typename Word,
typename Rewriter,
typename ReductionOrder>
249 using congruence_common::normal_forms;
298 template <
typename Word,
typename Time>
305#include "knuth-bendix-helpers.tpp"
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.
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:155
Namespace for everything in the libsemigroups library.
Definition action.hpp:44