Skip to content

Commit

Permalink
Add some non-monoid semigroup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
reiniscirpons committed Dec 30, 2023
1 parent 88595e4 commit 36cc1b6
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions tests/test-sims2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ namespace libsemigroups {
p.alphabet("ab");
p.contains_empty_word(true);
Sims2 s(p);
s.number_of_threads(4); // FIXME fails if number of threads is >1
s.number_of_threads(4);
REQUIRE(s.number_of_congruences(1) == 1);
REQUIRE(s.number_of_congruences(2) == 7); // verified with GAP
REQUIRE(s.number_of_congruences(3) == 27); // verified with GAP
Expand All @@ -423,16 +423,6 @@ namespace libsemigroups {
REQUIRE(s.number_of_congruences(13) == 1'387'117);
}

LIBSEMIGROUPS_TEST_CASE("Sims2", "101", "todo", "[extreme][sims2]") {
auto p = symmetric_inverse_monoid(5, fpsemigroup::author::Gay);
presentation::remove_duplicate_rules(p);
presentation::sort_each_rule(p);
presentation::sort_rules(p);

Sims2 C(p);
REQUIRE(C.number_of_threads(1).number_of_congruences(1546) == 14);
}

LIBSEMIGROUPS_TEST_CASE("Sims2",
"097",
"2-sided congruence-free monoid n=3",
Expand Down Expand Up @@ -542,4 +532,25 @@ namespace libsemigroups {
REQUIRE(s.number_of_congruences(12) == 19'245);
REQUIRE(s.number_of_congruences(13) == 32'299);
}

LIBSEMIGROUPS_TEST_CASE("Sims2",
"101",
"2-sided 2-generated free semigroup",
"[extreme][sims2]") {
Presentation<std::string> p;
p.alphabet("ab");
p.contains_empty_word(false); // FIXME: Method fails for non-monoids
Sims2 s(p);
s.number_of_threads(4);
// Number of congruences with up to 7 classes given in:
// A. Bailey, M. Finn-Sell and R. Snocken
// "SUBSEMIGROUP, IDEAL AND CONGRUENCE GROWTH OF FREE SEMIGROUPS"
REQUIRE(s.number_of_congruences(1) == 1);
REQUIRE(s.number_of_congruences(2) == 11); // From Bailey et al
REQUIRE(s.number_of_congruences(3) == 51); // From Bailey et al
REQUIRE(s.number_of_congruences(4) == 200); // From Bailey et al
REQUIRE(s.number_of_congruences(5) == 657); // From Bailey et al
REQUIRE(s.number_of_congruences(6) == 2037); // From Bailey et al
REQUIRE(s.number_of_congruences(7) == 5977); // From Bailey et al
}
} // namespace libsemigroups

0 comments on commit 36cc1b6

Please sign in to comment.