Skip to content

Commit

Permalink
gren: add methods for partial order of L/R-classes
Browse files Browse the repository at this point in the history
  • Loading branch information
wilfwilson committed Oct 1, 2018
1 parent c282b1e commit 89d8503
Show file tree
Hide file tree
Showing 9 changed files with 164 additions and 17 deletions.
12 changes: 8 additions & 4 deletions doc/attr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,17 @@ gap> MinimalDClass(S);
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="MaximalDClasses">
<#GAPDoc Label="MaximalXClasses">
<ManSection>
<Heading>MaximalXClasses</Heading>
<Attr Name="MaximalDClasses" Arg="S"/>
<Returns>The maximal &D;-classes of a semigroup.</Returns>
<Attr Name="MaximalLClasses" Arg="S"/>
<Attr Name="MaximalRClasses" Arg="S"/>
<Returns>The maximal &D;, &L;, or &R;-classes of a semigroup.</Returns>
<Description>
<C>MaximalDClasses</C> returns the maximal &D;-classes with respect to
the partial order of &D;-classes. <P/>
Let <C>X</C> be one of Green's &D;-, &L;-, or &R;-relations. Then
<C>MaximalXClasses</C> returns the maximal Green's <C>X</C>-classes with
respect to the partial order of <C>X</C>-classes. <P/>

See also <Ref Attr="PartialOrderOfDClasses"/>,
<Ref Oper="IsGreensLessThanOrEqual" BookName="ref"/>, and
Expand Down
43 changes: 32 additions & 11 deletions doc/gree.xml
Original file line number Diff line number Diff line change
Expand Up @@ -922,21 +922,42 @@ gap> AsSet(RegularDClasses(S));
</ManSection>
<#/GAPDoc>

<#GAPDoc Label="PartialOrderOfDClasses">
<#GAPDoc Label="PartialOrderOfXClasses">
<ManSection>
<Heading>PartialOrderOfXClasses</Heading>
<Attr Name = "PartialOrderOfDClasses" Arg = "S"/>
<Returns>The partial order of the &D;-classes of <A>S</A>.
<Attr Name = "PartialOrderOfLClasses" Arg = "S"/>
<Attr Name = "PartialOrderOfRClasses" Arg = "S"/>
<Returns>The partial order of the &D;, &L;, or &R;-classes of <A>S</A>.
</Returns>
<Description>
Returns a list <C>list</C> where <C>list[i]</C> contains every <C>j</C> such
that <C>GreensDClasses(S)[j]</C> is immediately less than
<C>GreensDClasses(S)[i]</C> in the partial order of &D;- classes of
<A>S</A>. There might be other indices in <C>list</C>, and it may or may not
include <C>i</C>. The reflexive transitive closure of the relation defined
by <C>list</C> is the partial order of &D;-classes of <A>S</A>. <P/>

The partial order on the &D;-classes is defined by <M>x\leq y</M> if and only
if <M>S ^ 1xS ^ 1</M> is a subset of <M>S ^ 1yS ^ 1</M>. <P/>
Let <C>X</C> be one of Green's &D;-, &L;-, or &R;-relations. Then
<C>PartialOrderOfXClasses</C> returns a list <C>list</C> where
<C>list[i]</C> contains every <C>j</C> such that <C>GreensXClasses(S)[j]</C>
is immediately less than <C>GreensXClasses(S)[i]</C> in the partial order of
<C>X</C>-classes of <A>S</A>. There might be other indices in <C>list</C>,
and it may or may not include <C>i</C>. The reflexive transitive closure of
the relation defined by <C>list</C> is the partial order of <C>X</C>-classes
of <A>S</A>. <P/>

The partial order on the <C>X</C>-classes is defined as follows.
<List>
<Mark>Green's &D;-relation:</Mark>
<Item>
<M>x\leq y</M> if and only if <M>S ^ 1xS ^ 1</M> is a subset of
<M>S ^ 1yS ^ 1</M>.
</Item>
<Mark>Green's &L;-relation:</Mark>
<Item>
<M>x\leq y</M> if and only if <M>S ^ 1x</M> is a subset of
<M>S ^ 1y</M>.
</Item>
<Mark>Green's &R;-relation:</Mark>
<Item>
<M>x\leq y</M> if and only if <M>xS ^ 1</M> is a subset of
<M>yS ^ 1</M>.
</Item>
</List>

See also <Ref Meth = "GreensDClasses"/>,
<Ref Meth = "GreensDClasses" BookName = "ref"/>,
Expand Down
4 changes: 2 additions & 2 deletions doc/z-chap13.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
<#Include Label = "GreensXClasses">
<#Include Label = "XClassReps">
<#Include Label = "MinimalDClass">
<#Include Label = "MaximalDClasses">
<#Include Label = "MaximalXClasses">
<#Include Label = "NrRegularDClasses">
<#Include Label = "NrXClasses">
<#Include Label = "PartialOrderOfDClasses">
<#Include Label = "PartialOrderOfXClasses">
<#Include Label = "LengthOfLongestDClassChain">
<#Include Label = "IsGreensDGreaterThanFunc">

Expand Down
2 changes: 2 additions & 0 deletions gap/attributes/attr.gd
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ DeclareAttribute("StructureDescription", IsGroupAsSemigroup);
DeclareAttribute("StructureDescriptionMaximalSubgroups",
IsSemigroup);
DeclareAttribute("MaximalDClasses", IsSemigroup);
DeclareAttribute("MaximalLClasses", IsSemigroup);
DeclareAttribute("MaximalRClasses", IsSemigroup);
DeclareAttribute("MinimalDClass", IsSemigroup);
DeclareAttribute("IsGreensDGreaterThanFunc", IsSemigroup);

Expand Down
26 changes: 26 additions & 0 deletions gap/attributes/attr.gi
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,32 @@ InstallMethod(MaximalDClasses, "for a finite monoid as semigroup",
[IsFinite and IsMonoidAsSemigroup],
S -> [DClass(S, MultiplicativeNeutralElement(S))]);

InstallMethod(MaximalLClasses, "for an enumerable semigroup",
[IsEnumerableSemigroupRep],
function(S)
local gr;

if NrLClasses(S) = 1 then
return LClasses(S);
fi;

gr := DigraphRemoveLoops(Digraph(PartialOrderOfLClasses(S)));
return LClasses(S){DigraphSources(gr)};
end);

InstallMethod(MaximalRClasses, "for an enumerable semigroup",
[IsEnumerableSemigroupRep],
function(S)
local gr;

if NrRClasses(S) = 1 then
return RClasses(S);
fi;

gr := DigraphRemoveLoops(Digraph(PartialOrderOfRClasses(S)));
return RClasses(S){DigraphSources(gr)};
end);

# same method for ideals

InstallMethod(StructureDescriptionMaximalSubgroups,
Expand Down
2 changes: 2 additions & 0 deletions gap/greens/gree.gd
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ DeclareOperation("GreensJClassOfElementNC",
DeclareAttribute("RegularDClasses", IsSemigroup);
DeclareAttribute("NrRegularDClasses", IsSemigroup);
DeclareAttribute("PartialOrderOfDClasses", IsSemigroup);
DeclareAttribute("PartialOrderOfLClasses", IsSemigroup);
DeclareAttribute("PartialOrderOfRClasses", IsSemigroup);

DeclareOperation("GreensLClassOfElement",
[IsGreensClass, IsMultiplicativeElement]);
Expand Down
42 changes: 42 additions & 0 deletions gap/greens/gren.gi
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,48 @@ function(S)
return List(OutNeighbours(gr), Set);
end);

InstallMethod(PartialOrderOfLClasses, "for a finite enumerable semigroup",
[IsEnumerableSemigroupRep and IsFinite],
function(S)
local gr, comps, enum, canon, actual, perm;

gr := LeftCayleyDigraph(S);
comps := DigraphStronglyConnectedComponents(gr).comps;
gr := QuotientDigraph(gr, comps);
if not IsBound(GreensLRelation(S)!.data) then
# Rectify the ordering of the Green's classes, if necessary
enum := EnumeratorCanonical(S);
canon := SortingPerm(List(comps, x -> LClass(S, enum[x[1]])));
actual := SortingPerm(GreensLClasses(S));
perm := canon / actual;
if not IsOne(perm) then
gr := OnDigraphs(gr, perm);
fi;
fi;
return List(OutNeighbours(gr), Set);
end);

InstallMethod(PartialOrderOfRClasses, "for a finite enumerable semigroup",
[IsEnumerableSemigroupRep and IsFinite],
function(S)
local gr, comps, enum, canon, actual, perm;

gr := RightCayleyDigraph(S);
comps := DigraphStronglyConnectedComponents(gr).comps;
gr := QuotientDigraph(gr, comps);
if not IsBound(GreensRRelation(S)!.data) then
# Rectify the ordering of the Green's classes, if necessary
enum := EnumeratorCanonical(S);
canon := SortingPerm(List(comps, x -> RClass(S, enum[x[1]])));
actual := SortingPerm(GreensRClasses(S));
perm := canon / actual;
if not IsOne(perm) then
gr := OnDigraphs(gr, perm);
fi;
fi;
return List(OutNeighbours(gr), Set);
end);

#############################################################################
## 6. Idempotents . . .
#############################################################################
Expand Down
24 changes: 24 additions & 0 deletions tst/standard/attr.tst
Original file line number Diff line number Diff line change
Expand Up @@ -1966,6 +1966,30 @@ gap> NambooripadLeqRegularSemigroup(S);
Error, Semigroups: NambooripadLeqRegularSemigroup: usage,
the argument is not a regular semigroup,

#T# MaximalL/RClasses
gap> S := LeftZeroSemigroup(3);
<transformation semigroup of degree 4 with 3 generators>
gap> MaximalLClasses(S);
[ <Green's L-class: Transformation( [ 1, 2, 1, 1 ] )> ]
gap> MaximalRClasses(S);
[ <Green's R-class: Transformation( [ 1, 2, 1, 1 ] )>,
<Green's R-class: Transformation( [ 1, 2, 1, 2 ] )>,
<Green's R-class: Transformation( [ 1, 2, 2, 1 ] )> ]
gap> S := RightZeroSemigroup(3);
<transformation semigroup of degree 3 with 3 generators>
gap> MaximalLClasses(S);
[ <Green's L-class: Transformation( [ 1, 1, 1 ] )>,
<Green's L-class: Transformation( [ 2, 2, 2 ] )>,
<Green's L-class: Transformation( [ 3, 3, 3 ] )> ]
gap> MaximalRClasses(S);
[ <Green's R-class: Transformation( [ 1, 1, 1 ] )> ]
gap> S := FullPBRMonoid(1);
<pbr monoid of degree 1 with 4 generators>
gap> MaximalLClasses(S);
[ <Green's L-class: PBR([ [ -1 ] ], [ [ 1 ] ])> ]
gap> MaximalRClasses(S);
[ <Green's R-class: PBR([ [ -1 ] ], [ [ 1 ] ])> ]

# SEMIGROUPS_UnbindVariables
gap> Unbind(D);
gap> Unbind(G);
Expand Down
26 changes: 26 additions & 0 deletions tst/standard/gren.tst
Original file line number Diff line number Diff line change
Expand Up @@ -1685,6 +1685,32 @@ gap> GreensJClasses(S);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `GreensJClasses' on 1 arguments
#T# PartialOrderOfL/RClasses: 1
gap> S := Semigroup([
> PBR([[-1], []], [[], [-2, -1, 1, 2]]),
> PBR([[-2, -1, 1, 2], [-2, -1, 2]], [[-2, -1], [-2, 1, 2]]),
> PBR([[-1], [1]], [[-1], [-2]])]);
<pbr semigroup of degree 2 with 3 generators>
gap> PartialOrderOfLClasses(S);
[ [ 1 ], [ 1, 2 ], [ 1, 2 ], [ 1, 3, 4 ], [ 5 ], [ 5, 6 ], [ 5, 6 ], [ 8 ] ]
gap> PartialOrderOfRClasses(S);
[ [ 1 ], [ 1, 2 ], [ 3 ], [ 2, 3, 4 ], [ 5 ], [ 5, 6 ], [ 7 ], [ 6, 7, 8 ],
[ 6, 7, 8 ], [ 10 ] ]
#T# PartialOrderOfL/RClasses: 1
gap> S := FullTransformationMonoid(3);
<full transformation monoid of degree 3>
gap> gr := PartialOrderOfLClasses(S);;
gap> gr := DigraphReflexiveTransitiveReduction(Digraph(gr));
<digraph with 7 vertices, 9 edges>
gap> IsIsomorphicDigraph(gr, DigraphFromDigraph6String("+F?OGC@OoK?"));
true
gap> gr := PartialOrderOfRClasses(S);;
gap> gr := DigraphReflexiveTransitiveReduction(Digraph(gr));
<digraph with 5 vertices, 6 edges>
gap> IsIsomorphicDigraph(gr, DigraphFromDigraph6String("+D[CGO?"));
true
# SEMIGROUPS_UnbindVariables
gap> Unbind(D);
gap> Unbind(DD);
Expand Down

0 comments on commit 89d8503

Please sign in to comment.