From b085ff9cbb0f685c71e29061482252ce887298d0 Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Fri, 20 May 2022 10:59:06 +0100 Subject: [PATCH] conglatt: fix ordering issue --- doc/conglatt.xml | 4 ++-- gap/congruences/conglatt.gi | 3 ++- tst/standard/congruences/conglatt.tst | 22 ++++++++++++++++------ 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/doc/conglatt.xml b/doc/conglatt.xml index 4afd2fcf0..fbb71c2c8 100644 --- a/doc/conglatt.xml +++ b/doc/conglatt.xml @@ -193,13 +193,13 @@ gap> CongruencesOfPoset(latt); [ with 0 generating pairs>, with 1 generating pairs>, + of size 3, degree 2 with 2 generators> with 2 generating pairs>, with 1 generating pairs>, with 1 generating pairs>, with 2 generating pairs> ] + of size 3, degree 2 with 2 generators> with 1 generating pairs> ] ]]> diff --git a/gap/congruences/conglatt.gi b/gap/congruences/conglatt.gi index e93c33fee..f1b6704d8 100644 --- a/gap/congruences/conglatt.gi +++ b/gap/congruences/conglatt.gi @@ -300,7 +300,8 @@ function(gen_congs, WrappedXCongruence) poset := DigraphReflexiveTransitiveClosure(PartialOrderOfDClasses(S)); Info(InfoSemigroups, 1, StringFormatted("Found {} congruences in total!", Size(S))); - all_congs := List(AsList(S), x -> x![1]); + all_congs := List(DClasses(S), x -> Representative(x)![1]); + SetCongruencesOfPoset(poset, all_congs); SetDigraphVertexLabels(poset, all_congs); SetUnderlyingSemigroupOfCongruencePoset(poset, U); diff --git a/tst/standard/congruences/conglatt.tst b/tst/standard/congruences/conglatt.tst index f3d73547f..b27981b85 100644 --- a/tst/standard/congruences/conglatt.tst +++ b/tst/standard/congruences/conglatt.tst @@ -353,17 +353,17 @@ gap> Print(l, "\n"); PosetOfCongruences( [ RightSemigroupCongruence( InverseMonoid( [ PartialPerm( [ 1, 2 ], [ 2, 1 ] ), PartialPerm( [ 1 ], [ 1 ] ) ] ), - [ [ PartialPerm( [ 1 ], [ 1 ] ), PartialPerm( [ 2 ], [ 1 ] ) ] ] ), - RightSemigroupCongruence( InverseMonoid( - [ PartialPerm( [ 1, 2 ], [ 2, 1 ] ), PartialPerm( [ 1 ], [ 1 ] ) ] ), - [ [ PartialPerm( [ 1 ], [ 1 ] ), PartialPerm( [ 1, 2 ], [ 1, 2 ] ) ] ] ), + [ [ PartialPerm( [ 1 ], [ 1 ] ), PartialPerm( [ 2 ], [ 1 ] ) ], + [ PartialPerm( [ 1 ], [ 1 ] ), PartialPerm( [ 1, 2 ], [ 1, 2 ] ) ] ] ), RightSemigroupCongruence( InverseMonoid( [ PartialPerm( [ 1, 2 ], [ 2, 1 ] ), PartialPerm( [ 1 ], [ 1 ] ) ] ), [ [ PartialPerm( [ 1, 2 ], [ 1, 2 ] ), PartialPerm( [ 1, 2 ], [ 2, 1 ] ) ] ] ), RightSemigroupCongruence( InverseMonoid( [ PartialPerm( [ 1, 2 ], [ 2, 1 ] ), PartialPerm( [ 1 ], [ 1 ] ) ] ), - [ [ PartialPerm( [ 1 ], [ 1 ] ), PartialPerm( [ 2 ], [ 1 ] ) ], - [ PartialPerm( [ 1 ], [ 1 ] ), PartialPerm( [ 1, 2 ], [ 1, 2 ] ) ] ] ) + [ [ PartialPerm( [ 1 ], [ 1 ] ), PartialPerm( [ 2 ], [ 1 ] ) ] ] ), + RightSemigroupCongruence( InverseMonoid( + [ PartialPerm( [ 1, 2 ], [ 2, 1 ] ), PartialPerm( [ 1 ], [ 1 ] ) ] ), + [ [ PartialPerm( [ 1 ], [ 1 ] ), PartialPerm( [ 1, 2 ], [ 1, 2 ] ) ] ] ) ] ) gap> MinimalCongruences(poset); [ <2-sided semigroup congruence over wi\ @@ -406,6 +406,16 @@ gap> IsIsomorphicDigraph(l, DigraphByInNeighbours( > [1, 2, 3, 4, 6]])); true +# Test for correct ordering of congruences and lattice nodes +gap> S := InverseSemigroup(PartialPerm([1, 3], [2, 4]), +> PartialPerm([1], [1]));; +gap> D := DigraphReflexiveTransitiveReduction(LatticeOfRightCongruences(S)); + +gap> x := DigraphSinks(D)[1]; +2 +gap> NrEquivalenceClasses(RightCongruencesOfSemigroup(S)[x]); +1 + # SEMIGROUPS_UnbindVariables gap> Unbind(S); gap> Unbind(coll);