Skip to content

Commit

Permalink
conglatt: improve congruence lattice code
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Oct 11, 2022
1 parent 94932da commit a95aefe
Show file tree
Hide file tree
Showing 20 changed files with 887 additions and 206 deletions.
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ GAPINSTALLLIB = $(abs_top_srcdir)/$(BINARCHDIR)/semigroups.so
lib_LTLIBRARIES = semigroups.la

semigroups_la_SOURCES = src/bipart.cpp
semigroups_la_SOURCES += src/conglatt.cpp
semigroups_la_SOURCES += src/cong.cpp
semigroups_la_SOURCES += src/froidure-pin-base.cpp
semigroups_la_SOURCES += src/froidure-pin-bipart.cpp
Expand Down
233 changes: 185 additions & 48 deletions doc/conglatt.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions doc/congsemigraph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ gap> AsCongruenceByWangPair(cong);

<#GAPDoc Label="GeneratingCongruencesOfLattice">
<ManSection>
<Oper Name = "GeneratingCongruencesOfLattice" Arg = "S"/>
<Attr Name = "GeneratingCongruencesOfLattice" Arg = "S"/>
<Returns>A semigroup.</Returns>
<Description>
This operation takes a finite graph inverse semigroup <A>S</A> and returns a
This attribute takes a finite graph inverse semigroup <A>S</A> and returns a
minimal generating set for the lattice of congruences of <A>S</A>, as described
in <Cite Key="Anagnostopoulou-Merkouri2021aa"/>. This operation works only if
the corresponding digraph of the graph inverse semigroup is simple. If there
Expand Down
23 changes: 23 additions & 0 deletions doc/conguniv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,26 @@ gap> UniversalSemigroupCongruence(S);
</Description>
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="TrivialCongruence">
<ManSection>
<Attr Name = "TrivialCongruence" Arg = "S"/>
<Returns>A trivial semigroup congruence.</Returns>
<Description>
This operation returns the trivial semigroup congruence for the
semigroup <A>S</A>. It can be used in the same way as any other
semigroup congruence object.
<Example><![CDATA[
gap> S := ReesZeroMatrixSemigroup(SymmetricGroup(3),
> [[(), (1, 3, 2)], [(1, 2), 0]]);;
gap> TrivialCongruence(S);
<semigroup congruence over <Rees 0-matrix semigroup 2x2 over
Sym( [ 1 .. 3 ] )> with linked triple (1,2,2)>
gap> S := PartitionMonoid(2);
<regular bipartition *-monoid of size 15, degree 2 with 3 generators>
gap> TrivialCongruence(S);
<2-sided semigroup congruence over <regular bipartition *-monoid
of size 15, degree 2 with 3 generators> with 0 generating pairs>]]></Example>
</Description>
</ManSection>
<#/GAPDoc>
5 changes: 4 additions & 1 deletion doc/z-chap13.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,13 @@
<#Include Label = "PrincipalCongruencesOfSemigroup">
<#Include Label = "IsCongruencePoset">
<#Include Label = "LatticeOfCongruences">
<#Include Label = "CayleyDigraphOfCongruences">
<#Include Label = "PosetOfPrincipalCongruences">
<#Include Label = "CongruencesOfPoset">
<#Include Label = "UnderlyingSemigroupOfCongruencePoset">
<#Include Label = "PosetOfCongruences">
<#Include Label = "JoinSemilatticeOfCongruences">
<#Include Label = "GeneratingCongruencesOfJoinSemilattice">
<#Include Label = "MinimalCongruences">
<#Include Label = "NumberOfRightCongruences">
<#Include Label = "IteratorOfRightCongruences">
Expand Down Expand Up @@ -310,7 +312,7 @@
</Section>

<Section>
<Heading>Universal congruences</Heading>
<Heading>Universal and trivial congruences</Heading>

The linked triples of a completely 0-simple Rees 0-matrix semigroup describe
only its non-universal congruences. In any one of these, the zero element
Expand All @@ -329,5 +331,6 @@
<#Include Label = "IsUniversalSemigroupCongruence">
<#Include Label = "IsUniversalSemigroupCongruenceClass">
<#Include Label = "UniversalSemigroupCongruence">
<#Include Label = "TrivialCongruence">
</Section>
</Chapter>
2 changes: 2 additions & 0 deletions gap/congruences/cong.gd
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ DeclareGlobalFunction("SemigroupCongruence");
DeclareGlobalFunction("LeftSemigroupCongruence");
DeclareGlobalFunction("RightSemigroupCongruence");

DeclareAttribute("TrivialCongruence", IsSemigroup);

# Properties of congruences
DeclareProperty("IsRightSemigroupCongruence", IsLeftSemigroupCongruence);
DeclareProperty("IsSemigroupCongruence", IsLeftSemigroupCongruence);
Expand Down
10 changes: 10 additions & 0 deletions gap/congruences/cong.gi
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,16 @@ function(arg)
return _LeftOrRightCong(RightSemigroupCongruenceByGeneratingPairs, arg);
end);

########################################################################
# Trivial congruence
########################################################################

InstallMethod(TrivialCongruence, "for a semigroup",
[IsSemigroup],
function(S)
return SemigroupCongruence(S, []);
end);

########################################################################
# Congruence operators
########################################################################
Expand Down
32 changes: 24 additions & 8 deletions gap/congruences/conglatt.gd
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ DeclareCategory("IsCongruencePoset", IsDigraph);

DeclareAttribute("UnderlyingSemigroupOfCongruencePoset", IsCongruencePoset);
DeclareAttribute("PosetOfPrincipalCongruences", IsCongruencePoset);
DeclareOperation("JoinSemilatticeOfCongruences",
[IsCongruencePoset, IsFunction]);
DeclareAttribute("JoinSemilatticeOfCongruences", IsCongruencePoset);
DeclareAttribute("MinimalCongruences", IsCongruencePoset);

DeclareAttribute("CongruencesOfPoset", IsCongruencePoset);
Expand Down Expand Up @@ -49,17 +48,32 @@ DeclareAttribute("LatticeOfCongruences", IsSemigroup);
DeclareAttribute("LatticeOfLeftCongruences", IsSemigroup);
DeclareAttribute("LatticeOfRightCongruences", IsSemigroup);

DeclareOperation("LatticeOfCongruences",
DeclareAttribute("CayleyDigraphOfCongruences", IsSemigroup);
DeclareAttribute("CayleyDigraphOfLeftCongruences", IsSemigroup);
DeclareAttribute("CayleyDigraphOfRightCongruences", IsSemigroup);

DeclareOperation("CayleyDigraphOfCongruencesNC",
[IsSemigroup, IsListOrCollection]);
DeclareOperation("LatticeOfCongruencesNC",
DeclareOperation("CayleyDigraphOfCongruences",
[IsSemigroup, IsListOrCollection]);
DeclareOperation("LatticeOfLeftCongruences",

DeclareOperation("CayleyDigraphOfLeftCongruencesNC",
[IsSemigroup, IsListOrCollection]);
DeclareOperation("LatticeOfLeftCongruencesNC",
DeclareOperation("CayleyDigraphOfLeftCongruences",
[IsSemigroup, IsListOrCollection]);
DeclareOperation("LatticeOfRightCongruences",

DeclareOperation("CayleyDigraphOfRightCongruencesNC",
[IsSemigroup, IsListOrCollection]);
DeclareOperation("LatticeOfRightCongruencesNC",
DeclareOperation("CayleyDigraphOfRightCongruences",
[IsSemigroup, IsListOrCollection]);

DeclareCategory("IsCayleyDigraphOfCongruences", IsCongruencePoset);

DeclareOperation("LatticeOfCongruences",
[IsSemigroup, IsListOrCollection]);
DeclareOperation("LatticeOfLeftCongruences",
[IsSemigroup, IsListOrCollection]);
DeclareOperation("LatticeOfRightCongruences",
[IsSemigroup, IsListOrCollection]);

DeclareAttribute("CongruencesOfSemigroup", IsSemigroup);
Expand Down Expand Up @@ -90,3 +104,5 @@ DeclareOperation("PrincipalLeftCongruencesOfSemigroup",
[IsSemigroup, IsListOrCollection]);
DeclareOperation("PrincipalRightCongruencesOfSemigroup",
[IsSemigroup, IsListOrCollection]);

DeclareAttribute("GeneratingCongruencesOfJoinSemilattice", IsCongruencePoset);
Loading

0 comments on commit a95aefe

Please sign in to comment.