libsemigroups  v3.0.0
C++ library for semigroups and monoids
Loading...
Searching...
No Matches
The Congruence class

Defined in cong-class.hpp.

On this page we describe the functionality relating to the class template Congruence in libsemigroups. This class can be used for computing a congruence over a semigroup or monoid by running every applicable algorithm from libsemigroups (and some variants of the same algorithm) in parallel. This class is provided for convenience, at present it is not very customisable, and lacks some of the fine grained control offered by the classes implementing individual algorithms, such as Kambites, KnuthBendix, and ToddCoxeter.

Template Parameters
Wordthe type of the words used in the presentation and generating_pairs.
See also
Common congruence helpers for information about helper functions for the Congruence class template.
Example
p.alphabet(2)
presentation::add_rule(p, {0, 1}, {});
Congruence cong(congruence_kind::twosided, p);
is_obviously_infinite(cong); // true
cong.number_of_classes(); // 3
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
bool is_obviously_infinite(Presentation< Word > const &p)
Function for checking if the finitely presented semigroup or monoid defined by a Presentation object ...
Definition obvinf.hpp:411
Presentation(Presentation< Word > const &) -> Presentation< Word >
Deduction guide.
@ twosided
Value representing a two-sided congruence.
Definition types.hpp:73
void add_rule(Presentation< Word > &p, Word const &lhop, Word const &rhop)
Add a rule to the presentation by reference and check.
Definition presentation.hpp:806

Topics

 Member Types
 Public member types.
 
 Constructors + initializers
 Construct or re-initialize a Congruence instance (public member function).
 
 Settings
 Settings that control the behaviour of a Congruence instance.
 
 Common member functions
 Documentation of common member functions of Congruence, Kambites, KnuthBendix, and ToddCoxeter.
 
 Accessors
 Member functions that can be used to access the state of a Congruence instance.
 

Functions

template<typename Word>
 Congruence (Congruence< Word > &&) -> Congruence< Word >
 Deduction guide.
 
template<typename Word>
 Congruence (Congruence< Word > const &) -> Congruence< Word >
 Deduction guide.
 
template<typename Word>
 Congruence (congruence_kind, Presentation< Word > &&) -> Congruence< Word >
 Deduction guide.
 
template<typename Word>
 Congruence (congruence_kind, Presentation< Word > const &) -> Congruence< Word >
 Deduction guide.
 

Function Documentation

◆ Congruence() [1/4]

template<typename Word>
Congruence ( Congruence< Word > && ) -> Congruence< Word >

Defined in cong-class.hpp.

Deduction guide to construct a Congruence<Word> from a Congruence<Word>.

◆ Congruence() [2/4]

template<typename Word>
Congruence ( Congruence< Word > const & ) -> Congruence< Word >

Defined in cong-class.hpp.

Deduction guide to construct a Congruence<Word> from a Congruence<Word>.

◆ Congruence() [3/4]

template<typename Word>
Congruence ( congruence_kind ,
Presentation< Word > &&  ) -> Congruence< Word >

Defined in cong-class.hpp.

Deduction guide to construct a Congruence<Word> from a congruence_kind and Presentation<Word> rvalue reference.

◆ Congruence() [4/4]

template<typename Word>
Congruence ( congruence_kind ,
Presentation< Word > const &  ) -> Congruence< Word >

Defined in cong-class.hpp.

Deduction guide to construct a Congruence<Word> from a congruence_kind and Presentation<Word> const reference.