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 Mar 16, 2023
1 parent 98ed44e commit 5732242
Show file tree
Hide file tree
Showing 22 changed files with 1,096 additions and 420 deletions.
26 changes: 14 additions & 12 deletions doc/cong.xml
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,9 @@ gap> congs[pos];
gap> S := Semigroup(Transformation([1, 3, 2]),
> Transformation([3, 1, 3]));;
gap> min := MinimalCongruencesOfSemigroup(S);
[ <2-sided semigroup congruence over <transformation semigroup of
degree 3 with 2 generators> with 1 generating pairs> ]
[ <2-sided semigroup congruence over <transformation semigroup
of size 13, degree 3 with 2 generators> with 1 generating pairs>
]
gap> minl := MinimalLeftCongruencesOfSemigroup(S);
[ <left semigroup congruence over <transformation semigroup
of size 13, degree 3 with 2 generators> with 1 generating pairs>,
Expand Down Expand Up @@ -391,16 +392,17 @@ gap> minl := MinimalLeftCongruencesOfSemigroup(S);
gap> S := Semigroup(Transformation([1, 3, 2]),
> Transformation([3, 1, 3]));;
gap> congs := PrincipalCongruencesOfSemigroup(S);
[ <2-sided semigroup congruence over <transformation semigroup of
degree 3 with 2 generators> with 1 generating pairs>,
<2-sided semigroup congruence over <transformation semigroup of
degree 3 with 2 generators> with 1 generating pairs>,
<2-sided semigroup congruence over <transformation semigroup of
degree 3 with 2 generators> with 1 generating pairs>,
<2-sided semigroup congruence over <transformation semigroup of
degree 3 with 2 generators> with 1 generating pairs>,
<2-sided semigroup congruence over <transformation semigroup of
degree 3 with 2 generators> with 1 generating pairs> ]
[ <universal semigroup congruence over <transformation semigroup
of size 13, degree 3 with 2 generators>>,
<2-sided semigroup congruence over <transformation semigroup
of size 13, degree 3 with 2 generators> with 1 generating pairs>,
<2-sided semigroup congruence over <transformation semigroup
of size 13, degree 3 with 2 generators> with 1 generating pairs>,
<2-sided semigroup congruence over <transformation semigroup
of size 13, degree 3 with 2 generators> with 1 generating pairs>,
<2-sided semigroup congruence over <transformation semigroup
of size 13, degree 3 with 2 generators> with 1 generating pairs>
]
]]></Example>
</Description>
</ManSection>
Expand Down
234 changes: 186 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 @@ -187,6 +187,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
25 changes: 17 additions & 8 deletions gap/congruences/conglatt.gd
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ DeclareCategory("IsCongruencePoset", IsDigraph);

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

DeclareAttribute("CongruencesOfPoset", IsCongruencePoset);

# Constructs the poset object consisting of the congruences given in the
# argument.
DeclareOperation("PosetOfCongruences", [IsListOrCollection]);
DeclareAttribute("JoinSemilatticeOfCongruences", IsListOrCollection);

DeclareAttribute("GeneratingPairsOfPrincipalCongruences", IsSemigroup);
DeclareAttribute("GeneratingPairsOfPrincipalLeftCongruences", IsSemigroup);
Expand All @@ -49,18 +49,25 @@ DeclareAttribute("LatticeOfCongruences", IsSemigroup);
DeclareAttribute("LatticeOfLeftCongruences", IsSemigroup);
DeclareAttribute("LatticeOfRightCongruences", IsSemigroup);

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

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

DeclareCategory("IsCayleyDigraphOfCongruences", IsCongruencePoset);

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

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

DeclareAttribute("GeneratingCongruencesOfJoinSemilattice", IsCongruencePoset);
Loading

0 comments on commit 5732242

Please sign in to comment.