From a27303ed8d3d478ef24cda577c82ec0ab2fd583b Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Tue, 9 Jan 2024 09:49:11 +0000 Subject: [PATCH] Linting --- PackageInfo.g | 2 +- gap/attributes/acting.gi | 4 +- gap/attributes/attr.gi | 14 +- gap/attributes/dual.gi | 43 +- gap/attributes/homomorph.gi | 27 +- gap/attributes/inverse.gi | 8 +- gap/attributes/isomorph.gi | 12 +- gap/attributes/isorms.gd | 19 +- gap/attributes/isorms.gi | 66 +- gap/attributes/maximal.gi | 6 +- gap/attributes/properties.gi | 21 +- gap/attributes/rms-translat.gi | 56 +- gap/attributes/translat.gi | 105 +- gap/congruences/cong.gi | 21 +- gap/congruences/conginv.gi | 8 +- gap/congruences/conglatt.gi | 68 +- gap/congruences/congpairs.gi | 22 +- gap/congruences/congpart.gi | 4 +- gap/congruences/congrees.gi | 2 +- gap/congruences/congrms.gd | 13 +- gap/congruences/congrms.gi | 127 +- gap/congruences/congsemigraph.gi | 22 +- gap/congruences/congsimple.gi | 28 +- gap/congruences/conguniv.gi | 24 +- gap/elements/bipart.gi | 61 +- gap/elements/blocks.gi | 5 +- gap/elements/boolmat.gi | 22 +- gap/elements/ffmat.gi | 19 +- gap/elements/maxplusmat.gi | 96 +- gap/elements/pbr.gi | 54 +- gap/elements/pperm.gi | 4 +- gap/elements/semiringmat.gi | 26 +- gap/elements/star.gi | 4 +- gap/elements/trans.gi | 5 +- gap/fp/freeband.gi | 12 +- gap/fp/freeinverse.gi | 52 +- gap/fp/tietze.gi | 26 +- gap/fp/word.gi | 6 +- gap/greens/acting-inverse.gi | 11 +- gap/greens/acting-regular.gi | 4 +- gap/greens/acting.gi | 48 +- gap/greens/froidure-pin.gi | 16 +- gap/greens/generic.gi | 40 +- gap/ideals/acting.gi | 16 +- gap/ideals/froidure-pin.gi | 22 +- gap/ideals/ideals.gi | 18 +- gap/ideals/lambda-rho.gi | 71 +- gap/libsemigroups/cong.gi | 22 +- gap/libsemigroups/froidure-pin.gi | 41 +- gap/libsemigroups/sims1.gi | 4 +- gap/main/acting.gi | 38 +- gap/main/froidure-pin.gi | 41 +- gap/main/graded.gi | 66 +- gap/main/lambda-rho.gi | 9 +- gap/main/orbits.gi | 18 +- gap/main/setup.gi | 355 +-- gap/semigroups/grpperm.gi | 8 +- gap/semigroups/semibipart.gi | 179 +- gap/semigroups/semiboolmat.gi | 27 +- gap/semigroups/semicons.gi | 88 +- gap/semigroups/semidp.gi | 22 +- gap/semigroups/semieunit.gi | 127 +- gap/semigroups/semiex.gi | 14 +- gap/semigroups/semiffmat.gi | 48 +- gap/semigroups/semifp.gi | 118 +- gap/semigroups/semigraph.gi | 21 +- gap/semigroups/semigrp.gi | 134 +- gap/semigroups/semimaxplus.gi | 129 +- gap/semigroups/semintmat.gi | 4 +- gap/semigroups/semipbr.gi | 38 +- gap/semigroups/semipperm.gd | 2 + gap/semigroups/semipperm.gi | 55 +- gap/semigroups/semiquo.gi | 8 +- gap/semigroups/semiringmat.gi | 20 +- gap/semigroups/semirms.gi | 63 +- gap/semigroups/semitrans.gi | 88 +- gap/tools/display.gi | 42 +- gap/tools/io.gi | 17 +- gap/tools/iterators.gi | 2 +- gap/tools/utils.gi | 24 +- makedoc.g | 3 +- tst/extreme/bipart.tst | 3960 ++++++++++++------------ tst/extreme/greens-acting.tst | 776 ++--- tst/extreme/monoid_pkg.tst | 886 +++--- tst/extreme/semieunit.tst | 2 +- tst/standard/attributes/translat.tst | 45 +- tst/standard/congruences/congpairs.tst | 26 +- tst/standard/elements/bipart.tst | 6 +- tst/standard/fp/word.tst | 6 +- tst/standard/semigroups/semigraph.tst | 2 +- tst/standard/semigroups/semitrans.tst | 136 +- tst/standard/tools/display.tst | 817 +++-- tst/testinstall.tst | 18 +- 93 files changed, 4344 insertions(+), 5571 deletions(-) diff --git a/PackageInfo.g b/PackageInfo.g index a9d7424fa..9e1048ee7 100644 --- a/PackageInfo.g +++ b/PackageInfo.g @@ -10,7 +10,7 @@ BindGlobal("_RecogsFunnyNameFormatterFunction", function(st) - if Length(st) = 0 then + if IsEmpty(st) then return st; else return Concatenation(" (", st, ")"); diff --git a/gap/attributes/acting.gi b/gap/attributes/acting.gi index 85a0ff245..1f8bb6095 100644 --- a/gap/attributes/acting.gi +++ b/gap/attributes/acting.gi @@ -17,9 +17,7 @@ InstallMethod(IsMultiplicativeZero, "for an acting semigroup and element", [IsActingSemigroup, IsMultiplicativeElement], -function(S, x) - return MultiplicativeZero(S) <> fail and x = MultiplicativeZero(S); -end); +{S, x} -> MultiplicativeZero(S) <> fail and x = MultiplicativeZero(S)); # same method for ideals diff --git a/gap/attributes/attr.gi b/gap/attributes/attr.gi index d23e9af7f..dfd63b69d 100644 --- a/gap/attributes/attr.gi +++ b/gap/attributes/attr.gi @@ -156,9 +156,7 @@ function(S) end); InstallMethod(NrIdempotents, "for a semigroup", [IsSemigroup], -function(S) - return Length(Idempotents(S)); -end); +S -> Length(Idempotents(S))); InstallMethod(GroupOfUnits, "for a semigroup", [IsSemigroup], function(S) @@ -225,9 +223,7 @@ function(coll) elif IsGeneratorsOfActingSemigroup(coll) then deg := ActionDegree(coll); Shuffle(coll); - Sort(coll, function(x, y) - return ActionRank(x, deg) > ActionRank(y, deg); - end); + Sort(coll, {x, y} -> ActionRank(x, deg) > ActionRank(y, deg)); fi; out := EmptyPlist(Length(coll)); @@ -717,7 +713,7 @@ function(S) D := MaximalDClasses(S)[1]; - if not NrHClasses(D) = 1 or not IsRegularDClass(D) then + if NrHClasses(D) <> 1 or not IsRegularDClass(D) then return fail; fi; @@ -1124,9 +1120,7 @@ end); InstallMethod(TransposedMultiplicationTableWithCanonicalPositions, "for a semigroup with CanUseFroidurePin", [IsSemigroup and CanUseFroidurePin], -function(S) - return TransposedMat(MultiplicationTableWithCanonicalPositions(S)); -end); +S -> TransposedMat(MultiplicationTableWithCanonicalPositions(S))); InstallMethod(MinimalFaithfulTransformationDegree, "for a right zero semigroup", [IsRightZeroSemigroup], diff --git a/gap/attributes/dual.gi b/gap/attributes/dual.gi index 1591633e3..160077b49 100644 --- a/gap/attributes/dual.gi +++ b/gap/attributes/dual.gi @@ -23,7 +23,7 @@ function(S) if IsDualSemigroupRep(S) then if HasGeneratorsOfSemigroup(S) then return Semigroup(List(GeneratorsOfSemigroup(S), - x -> UnderlyingElementOfDualSemigroupElement(x))); + UnderlyingElementOfDualSemigroupElement)); fi; ErrorNoReturn("this dual semigroup cannot be constructed ", "without knowing generators"); @@ -91,13 +91,8 @@ function(S) local dual, inv, iso; dual := DualSemigroup(S); - iso := function(x) - return SEMIGROUPS.DualSemigroupElementNC(dual, x); - end; - - inv := function(x) - return SEMIGROUPS.DualSemigroupElementNC(S, x); - end; + iso := x -> SEMIGROUPS.DualSemigroupElementNC(dual, x); + inv := x -> SEMIGROUPS.DualSemigroupElementNC(S, x); return MappingByFunction(S, dual, iso, inv); end); @@ -147,37 +142,27 @@ end); InstallMethod(Size, "for a dual semigroup", [IsDualSemigroupRep], 10, # add rank to beat enumeration methods -function(S) - return Size(DualSemigroup(S)); -end); +S -> Size(DualSemigroup(S))); InstallMethod(AsList, "for a dual semigroup", [IsDualSemigroupRep], 10, # add rank to beat enumeration methods -function(S) - return List(DualSemigroup(S), s -> SEMIGROUPS.DualSemigroupElementNC(S, s)); -end); +S -> List(DualSemigroup(S), s -> SEMIGROUPS.DualSemigroupElementNC(S, s))); InstallMethod(\*, "for dual semigroup elements", IsIdenticalObj, [IsDualSemigroupElement, IsDualSemigroupElement], -function(x, y) - return Objectify(FamilyObj(x)!.type, [y![1] * x![1]]); -end); +{x, y} -> Objectify(FamilyObj(x)!.type, [y![1] * x![1]])); InstallMethod(\=, "for dual semigroup elements", IsIdenticalObj, [IsDualSemigroupElement, IsDualSemigroupElement], -function(x, y) - return x![1] = y![1]; -end); +{x, y} -> x![1] = y![1]); InstallMethod(\<, "for dual semigroup elements", IsIdenticalObj, [IsDualSemigroupElement, IsDualSemigroupElement], -function(x, y) - return x![1] < y![1]; -end); +{x, y} -> x![1] < y![1]); InstallMethod(ViewObj, "for dual semigroup elements", [IsDualSemigroupElement], PrintObj); @@ -204,18 +189,14 @@ end); # # InstallMethod(PrintString, "for dual semigroup elements", # [IsDualSemigroupElement], -# function(x) -# return StringFormatted("<{!v} in the dual semigroup>", x![1]); -# end); +# x -> StringFormatted("<{!v} in the dual semigroup>", x![1]); # # InstallMethod(ViewString, "for a dual semigroup", # [IsDualSemigroupRep], PrintString); # # InstallMethod(PrintString, "for a dual semigroup", # [IsDualSemigroupRep], -# function(S) -# return StringFormatted("", DualSemigroup(S)); -# end); +# S -> StringFormatted("", DualSemigroup(S)); InstallMethod(ChooseHashFunction, "for a dual semigroup element and int", [IsDualSemigroupElement, IsInt], @@ -223,8 +204,6 @@ function(x, data) local H, hashfunc; H := ChooseHashFunction(x![1], data); - hashfunc := function(a, b) - return H.func(a![1], b); - end; + hashfunc := {a, b} -> H.func(a![1], b); return rec(func := hashfunc, data := H.data); end); diff --git a/gap/attributes/homomorph.gi b/gap/attributes/homomorph.gi index bfcf79e63..9cfdc1dd2 100644 --- a/gap/attributes/homomorph.gi +++ b/gap/attributes/homomorph.gi @@ -131,9 +131,8 @@ end); InstallMethod(SemigroupHomomorphismByImages, "for two semigroups and one list", [IsSemigroup, IsSemigroup, IsList], -function(S, T, imgs) - return SemigroupHomomorphismByImages(S, T, GeneratorsOfSemigroup(S), imgs); -end); +{S, T, imgs} +-> SemigroupHomomorphismByImages(S, T, GeneratorsOfSemigroup(S), imgs)); InstallMethod(SemigroupHomomorphismByImages, "for two semigroups", [IsSemigroup, IsSemigroup], @@ -146,9 +145,8 @@ end); InstallMethod(SemigroupHomomorphismByImages, "for a semigroup and two lists", [IsSemigroup, IsList, IsList], -function(S, gens, imgs) - return SemigroupHomomorphismByImages(S, Semigroup(imgs), gens, imgs); -end); +{S, gens, imgs} +-> SemigroupHomomorphismByImages(S, Semigroup(imgs), gens, imgs)); InstallMethod(SemigroupIsomorphismByImages, "for two semigroup and two lists", [IsSemigroup, IsSemigroup, IsList, IsList], @@ -180,9 +178,8 @@ end); InstallMethod(SemigroupIsomorphismByImages, "for two semigroups and one list", [IsSemigroup, IsSemigroup, IsList], -function(S, T, imgs) - return SemigroupIsomorphismByImages(S, T, GeneratorsOfSemigroup(S), imgs); -end); +{S, T, imgs} +-> SemigroupIsomorphismByImages(S, T, GeneratorsOfSemigroup(S), imgs)); InstallMethod(SemigroupIsomorphismByImages, "for two semigroups", [IsSemigroup, IsSemigroup], @@ -195,9 +192,7 @@ end); InstallMethod(SemigroupIsomorphismByImages, "for a semigroup and two lists", [IsSemigroup, IsList, IsList], -function(S, gens, imgs) - return SemigroupIsomorphismByImages(S, Semigroup(imgs), gens, imgs); -end); +{S, gens, imgs} -> SemigroupIsomorphismByImages(S, Semigroup(imgs), gens, imgs)); InstallMethod(SemigroupHomomorphismByImages_NC, "for two semigroups and two lists", @@ -337,15 +332,11 @@ hom -> SemigroupIsomorphismByFunctionNC(Source(hom), # Methods for SHBI/SIBI/SHBF InstallMethod(IsSurjective, "for a semigroup homomorphism", [IsSemigroupHomomorphismByImagesOrFunction], -function(hom) - return Size(ImagesSource(hom)) = Size(Range(hom)); -end); +{hom} -> Size(ImagesSource(hom)) = Size(Range(hom))); InstallMethod(IsInjective, "for a semigroup homomorphism", [IsSemigroupHomomorphismByImagesOrFunction], -function(hom) - return Size(Source(hom)) = Size(ImagesSource(hom)); -end); +{hom} -> Size(Source(hom)) = Size(ImagesSource(hom))); InstallMethod(ImagesSet, "for a semigroup homom. and list of elements", [IsSemigroupHomomorphismByImagesOrFunction, IsList], diff --git a/gap/attributes/inverse.gi b/gap/attributes/inverse.gi index 3a7110bc7..58e78fc62 100644 --- a/gap/attributes/inverse.gi +++ b/gap/attributes/inverse.gi @@ -531,9 +531,7 @@ function(S, f) rank := ActionRank(S); SortBy(elts, rank); else - rank := function(x, y) - return IsGreensDGreaterThanFunc(S)(y, x); - end; + rank := {x, y} -> IsGreensDGreaterThanFunc(S)(y, x); Sort(elts, rank); fi; @@ -707,6 +705,4 @@ InstallMethod(InversesOfSemigroupElementNC, "for an inverse semigroup and a multiplicative element", [IsInverseSemigroup and IsGeneratorsOfInverseSemigroup, IsMultiplicativeElement], SUM_FLAGS, -function(S, elm) - return [elm ^ -1]; -end); +{_, elm} -> [elm ^ -1]); diff --git a/gap/attributes/isomorph.gi b/gap/attributes/isomorph.gi index 30feec17b..5d28954a8 100644 --- a/gap/attributes/isomorph.gi +++ b/gap/attributes/isomorph.gi @@ -59,9 +59,7 @@ function(S) return (lit[1] - 1) * n ^ 2 + (lit[2] - 1) * n + lit[3]; end; - DiagonalToLits := function(diag, n) - return List([1 .. n], i -> NumLit([i, i, diag[i]], n)); - end; + DiagonalToLits := {diag, n} -> List([1 .. n], i -> NumLit([i, i, diag[i]], n)); TableToLits := function(table, n) local literals, val, i, j; @@ -87,9 +85,7 @@ function(S) return table; end; - OnLiterals := n -> function(ln, pi) - return NumLit(OnTuples(LitNum(ln, n), pi), n); - end; + OnLiterals := n -> {ln, pi} -> NumLit(OnTuples(LitNum(ln, n), pi), n); # for not too big semigroups... n := Size(S); @@ -109,9 +105,7 @@ end); InstallMethod(IsIsomorphicSemigroup, "for semigroups", [IsSemigroup, IsSemigroup], -function(S, T) - return IsomorphismSemigroups(S, T) <> fail; -end); +{S, T} -> IsomorphismSemigroups(S, T) <> fail); InstallMethod(IsomorphismSemigroups, "for finite simple semigroups", [IsSimpleSemigroup and IsFinite, IsSimpleSemigroup and IsFinite], diff --git a/gap/attributes/isorms.gd b/gap/attributes/isorms.gd index cf2edcff5..011e46bf3 100644 --- a/gap/attributes/isorms.gd +++ b/gap/attributes/isorms.gd @@ -8,14 +8,17 @@ ############################################################################# ## -DeclareCategory("IsRMSIsoByTriple", IsGeneralMapping and IsSPGeneralMapping - and IsTotal and IsSingleValued and - IsInjective and IsSurjective and - IsAttributeStoringRep); -DeclareCategory("IsRZMSIsoByTriple", IsGeneralMapping and IsSPGeneralMapping - and IsTotal and IsSingleValued and - IsInjective and IsSurjective and - IsAttributeStoringRep); +DeclareCategory("IsRMSOrRZMSIsoByTriple", + IsGeneralMapping + and IsSPGeneralMapping + and IsTotal + and IsSingleValued + and IsInjective + and IsSurjective + and IsAttributeStoringRep); + +DeclareCategory("IsRMSIsoByTriple", IsRMSOrRZMSIsoByTriple); +DeclareCategory("IsRZMSIsoByTriple", IsRMSOrRZMSIsoByTriple); DeclareOperation("RMSIsoByTriple", [IsReesMatrixSemigroup, IsReesMatrixSemigroup, diff --git a/gap/attributes/isorms.gi b/gap/attributes/isorms.gi index e5fc13524..e94a8238c 100644 --- a/gap/attributes/isorms.gi +++ b/gap/attributes/isorms.gi @@ -50,9 +50,7 @@ SEMIGROUPS.StabOfRMSMatrix := function(G, R) OnMatrix := function(mat, x) local rows; mat := StructuralCopy(mat); - rows := Permutation(x, [1 .. n], function(i, p) - return (i + m) ^ p - m; - end); + rows := Permutation(x, [1 .. n], {i, p} -> (i + m) ^ p - m); return List(Permuted(mat, rows), y -> Permuted(y, x)); end; @@ -205,7 +203,7 @@ SEMIGROUPS.RZMStoRZMSInducedFunction := function(rms1, rms2, l, g, groupelts) j := j + 1; Last := orb[j]; involved := Filtered(edges, x -> x[1] = Last and not x in defined); - if not involved = [] then + if not IsEmpty(involved) then verts := List(involved, x -> x[2]); Append(orb, Filtered(verts, x -> not x in orb)); @@ -938,19 +936,13 @@ function(R1, R2, triple) end); InstallMethod(ELM_LIST, "for objects in `IsRMSIsoByTriple'", -[IsRMSIsoByTriple, IsPosInt], -function(x, i) - return x!.triple[i]; -end); +[IsRMSIsoByTriple, IsPosInt], {x, i} -> x!.triple[i]); InstallMethod(ELM_LIST, "for objects in `IsRZMSIsoByTriple'", -[IsRZMSIsoByTriple, IsPosInt], -function(x, i) - return x!.triple[i]; -end); +[IsRZMSIsoByTriple, IsPosInt], {x, i} -> x!.triple[i]); -InstallMethod(\=, "for objects in `IsRMSIsoByTriple'", -[IsRMSIsoByTriple, IsRMSIsoByTriple], +InstallMethod(\=, "for isomorphisms of Rees (0-)matrix semigroups", +[IsRMSOrRZMSIsoByTriple, IsRMSOrRZMSIsoByTriple], function(x, y) if Source(x) <> Source(y) or Range(x) <> Range(y) then @@ -963,20 +955,6 @@ function(x, y) = OnTuples(GeneratorsOfSemigroup(Source(x)), y); end); -InstallMethod(\=, "for objects in `IsRZMSIsoByTriple'", -[IsRZMSIsoByTriple, IsRZMSIsoByTriple], -function(x, y) - - if Source(x) <> Source(y) or Range(x) <> Range(y) then - return false; - elif x[1] = y[1] and x[2] = y[2] and x[3] = y[3] then - return true; - fi; - - return OnTuples(GeneratorsOfSemigroup(Source(x)), x) - = OnTuples(GeneratorsOfSemigroup(Source(x)), y); -end); - InstallMethod(\<, "for objects in `IsRMSIsoByTriple'", IsIdenticalObj, [IsRMSIsoByTriple, IsRMSIsoByTriple], @@ -1023,15 +1001,11 @@ end); InstallMethod(ImagesElm, "for an RMS element under a mapping by a triple", FamSourceEqFamElm, [IsRMSIsoByTriple, IsReesMatrixSemigroupElement], -function(triple, x) - return [ImagesRepresentative(triple, x)]; -end); +{triple, x} -> [ImagesRepresentative(triple, x)]); InstallMethod(ImagesElm, "for an RZMS element under a mapping by a triple", FamSourceEqFamElm, [IsRZMSIsoByTriple, IsReesZeroMatrixSemigroupElement], -function(triple, x) - return [ImagesRepresentative(triple, x)]; -end); +{triple, x} -> [ImagesRepresentative(triple, x)]); InstallMethod(ImagesRepresentative, "for an RMS element under a mapping by a triple", @@ -1096,29 +1070,21 @@ end); InstallMethod(IsOne, "for objects in `IsRMSIsoByTriple'", [IsRMSIsoByTriple], -function(map) - return IsOne(map[1]) and IsOne(map[2]) and ForAll(map[3], IsOne); -end); +{map} -> IsOne(map[1]) and IsOne(map[2]) and ForAll(map[3], IsOne)); InstallMethod(IsOne, "for objects in `IsRZMSIsoByTriple'", [IsEndoGeneralMapping and IsRZMSIsoByTriple], -function(map) - return IsOne(map[1]) and IsOne(map[2]) and ForAll(map[3], IsOne); -end); +{map} -> IsOne(map[1]) and IsOne(map[2]) and ForAll(map[3], IsOne)); InstallMethod(PreImagesRepresentative, "for an RMS element under a mapping by a triple", FamRangeEqFamElm, [IsRMSIsoByTriple, IsReesMatrixSemigroupElement], -function(map, x) - return ImagesRepresentative(InverseGeneralMapping(map), x); -end); +{map, x} -> ImagesRepresentative(InverseGeneralMapping(map), x)); InstallMethod(PreImagesRepresentative, "for an RZMS element under a mapping by a triple", FamRangeEqFamElm, [IsRZMSIsoByTriple, IsReesZeroMatrixSemigroupElement], -function(map, x) - return ImagesRepresentative(InverseGeneralMapping(map), x); -end); +{map, x} -> ImagesRepresentative(InverseGeneralMapping(map), x)); InstallMethod(PrintObj, "for an object in `IsRMSIsoByTriple'", [IsRMSIsoByTriple], @@ -1172,15 +1138,11 @@ end); # InstallMethod(ViewString, "for an object in `IsRMSIsoByTriple'", # [IsRMSIsoByTriple], -# function(map) -# return StringFormatted("({!v}, {!v}, {!v})", map[1], map[2], map[3]); -# end); +# {map} -> StringFormatted("({!v}, {!v}, {!v})", map[1], map[2], map[3]); # # InstallMethod(ViewString, "for object in `IsRZMSIsoByTriple'", # [IsRZMSIsoByTriple], -# function(map) -# return StringFormatted("({!v}, {!v}, {!v})", map[1], map[2], map[3]); -# end); +# {map} -> StringFormatted("({!v}, {!v}, {!v})", map[1], map[2], map[3]); InstallMethod(IsomorphismReesMatrixSemigroupOverPermGroup, "for a semigroup", diff --git a/gap/attributes/maximal.gi b/gap/attributes/maximal.gi index fb650185b..e55ae3038 100644 --- a/gap/attributes/maximal.gi +++ b/gap/attributes/maximal.gi @@ -491,7 +491,7 @@ function(R, opts) # All other maximal subsemigroups contain 0, so remove it from . pos := Position(contain, zero); - if not pos = fail then + if pos <> fail then Remove(contain, pos); fi; @@ -1384,7 +1384,7 @@ function(S, opts) for k in [1 .. m] do y := L[k] * x; y := First([1 .. m], z -> y in LL[z]); - if not y = fail then + if y <> fail then Add(gamma_L[k], y); fi; od; @@ -1393,7 +1393,7 @@ function(S, opts) for k in [1 .. n] do y := x * R[k]; y := First([1 .. n], z -> y in RR[z]); - if not y = fail then + if y <> fail then Add(gamma_R[k], y); fi; od; diff --git a/gap/attributes/properties.gi b/gap/attributes/properties.gi index d5934ab49..e8e9ce22b 100644 --- a/gap/attributes/properties.gi +++ b/gap/attributes/properties.gi @@ -503,9 +503,7 @@ InstallMethod(IsRTrivial, "for an inverse semigroup", InstallMethod(IsRTrivial, "for a transformation semigroup with generators", [IsTransformationSemigroup and HasGeneratorsOfSemigroup], 2, # to beat the method for acting semigroups -function(S) - return IsAcyclicDigraph(DigraphRemoveLoops(DigraphOfActionOnPoints(S))); -end); +S -> IsAcyclicDigraph(DigraphRemoveLoops(DigraphOfActionOnPoints(S)))); # different method for ideals @@ -640,7 +638,7 @@ function(S) Append(new, Idempotents(S, i)); od; fi; - if new = [] then + if IsEmpty(new) then return false; fi; T := Semigroup(new, rec(acting := true)); @@ -738,7 +736,7 @@ function(S) val := lambda(gens[1]); for x in gens do - if not lambda(x) = val then + if lambda(x) <> val then return false; fi; od; @@ -1051,10 +1049,7 @@ end); # same method for ideals InstallMethod(IsMonoidAsSemigroup, "for a semigroup", -[IsSemigroup], -function(S) - return MultiplicativeNeutralElement(S) <> fail; -end); +[IsSemigroup], S -> MultiplicativeNeutralElement(S) <> fail); # same method for ideals @@ -1252,9 +1247,7 @@ InstallMethod(IsRegularSemigroupElementNC, InstallMethod(IsRegularSemigroupElement, "for semigroup", IsCollsElms, [IsSemigroup, IsMultiplicativeElement], -function(S, x) - return x in S and IsRegularGreensClass(RClass(S, x)); -end); +{S, x} -> x in S and IsRegularGreensClass(RClass(S, x))); # same method for ideals @@ -1396,9 +1389,7 @@ function(S) for f in gens do o := Orb(S, LambdaFunc(S)(f), LambdaAct(S), opts); - pos := LookForInOrb(o, function(o, x) - return LambdaRank(S)(x) < rank; - end, 1); + pos := LookForInOrb(o, {o, x} -> LambdaRank(S)(x) < rank, 1); if pos <> false then return false; fi; diff --git a/gap/attributes/rms-translat.gi b/gap/attributes/rms-translat.gi index b0f35c193..42d29980a 100644 --- a/gap/attributes/rms-translat.gi +++ b/gap/attributes/rms-translat.gi @@ -41,15 +41,13 @@ SEMIGROUPS.RZMSTupleToLeftTranslation := function(S, idx_list, gp_list) foo := function(x) if x = zero then return zero; - fi; - if idx_list[x[1]] <> 0 then + elif idx_list[x[1]] <> 0 then return RMSElement(S, idx_list[x[1]], gp_list[x[1]] * x[2], x[3]); - else - return zero; fi; + return zero; end; return LeftTranslationNC(L, MappingByFunction(S, S, foo)); end; @@ -173,9 +171,8 @@ SEMIGROUPS.IsNormalRMSOverGroup := function(S) end; # Hash translations by their underlying transformations -SEMIGROUPS.HashFunctionForRMSTranslations := function(x, data) - return ORB_HashFunctionForTransformations(x![2], data); -end; +SEMIGROUPS.HashFunctionForRMSTranslations := +{x, data} -> ORB_HashFunctionForTransformations(x![2], data); # Hash linked pairs as sum of hashes SEMIGROUPS.HashFunctionForRMSBitranslations := function(x, data) @@ -204,7 +201,7 @@ SEMIGROUPS.RZMSLinkedIndexFuncs := function(S) if j <> 0 then for mu in Li[j] do sigma[k + 1][mu] := Intersection(sigma[k][mu], Li[k]); - if Length(sigma[k][mu]) = 0 then + if IsEmpty(sigma[k][mu]) then failed := true; break; fi; @@ -352,7 +349,7 @@ SEMIGROUPS.RZMSLinkedGroupFunctions := function(S, tau, sigma) fi; od; vals := keep; - if Length(vals) = 0 then + if IsEmpty(vals) then break; fi; od; @@ -429,8 +426,8 @@ SEMIGROUPS.BitranslationsRZMS := function(H, opt...) return out; end; -SEMIGROUPS.NormalRMSInitialisedLinkedFuncs := function(S, G, mat, mat_inv_rows, - c, d_inv, a, x, y) +SEMIGROUPS.NormalRMSInitialisedLinkedFuncs := +function(S, G, mat, mat_inv_rows, c, d_inv, x, y) local I, M, tau, sigma, g_pos, bt, out, mu; I := Rows(S); @@ -518,7 +515,6 @@ SEMIGROUPS.NormalRMSLinkedTriples := function(S, opt...) inv_rows, c, d_inv, - a, x, y); if nr_only then @@ -749,7 +745,7 @@ function(T) if L then if IsNRMS then Add(gens, LeftTranslationNC(T, - List([1 .. n], i -> fa(i)), + List([1 .. n], fa), IdentityTransformation)); else f := function(x) @@ -763,7 +759,7 @@ function(T) else if IsNRMS then Add(gens, RightTranslationNC(T, - List([1 .. n], i -> fa(i)), + List([1 .. n], fa), IdentityTransformation)); else f := function(x) @@ -1010,16 +1006,12 @@ end); InstallMethod(\=, "for left translations of a normalised RMS", IsIdenticalObj, [_IsLeftTranslationOfNormalRMS, _IsLeftTranslationOfNormalRMS], -function(x, y) - return x![1] = y![1] and x![2] = y![2]; -end); +{x, y} -> x![1] = y![1] and x![2] = y![2]); InstallMethod(\<, "for left translations of a normalised RMS", IsIdenticalObj, [_IsLeftTranslationOfNormalRMS, _IsLeftTranslationOfNormalRMS], -function(x, y) - return x![2] < y![2] or (x![2] = y![2] and x![1] < y![1]); -end); +{x, y} -> x![2] < y![2] or (x![2] = y![2] and x![1] < y![1])); InstallMethod(\*, "for right translations of a normalised RMS", IsIdenticalObj, @@ -1033,37 +1025,27 @@ end); InstallMethod(\=, "for right translations of a normalised RMS", IsIdenticalObj, [_IsRightTranslationOfNormalRMS, _IsRightTranslationOfNormalRMS], -function(x, y) - return x![1] = y![1] and x![2] = y![2]; -end); +{x, y} -> x![1] = y![1] and x![2] = y![2]); InstallMethod(\<, "for right translations of a normalised RMS", IsIdenticalObj, [_IsRightTranslationOfNormalRMS, _IsRightTranslationOfNormalRMS], -function(x, y) - return x![2] < y![2] or (x![2] = y![2] and x![1] < y![1]); -end); +{x, y} -> x![2] < y![2] or (x![2] = y![2] and x![1] < y![1])); InstallMethod(\*, "for bitranslations of a normalised RMS", IsIdenticalObj, [_IsBitranslationOfNormalRMS, _IsBitranslationOfNormalRMS], -function(x, y) - return Objectify(FamilyObj(x)!.type, [x![1] * y![1], x![2] * y![2]]); -end); +{x, y} -> Objectify(FamilyObj(x)!.type, [x![1] * y![1], x![2] * y![2]])); InstallMethod(\=, "for bitranslations of a normalised RMS", IsIdenticalObj, [_IsBitranslationOfNormalRMS, _IsBitranslationOfNormalRMS], -function(x, y) - return x![1] = y![1] and x![2] = y![2]; -end); +{x, y} -> x![1] = y![1] and x![2] = y![2]); InstallMethod(\<, "for bitranslations of a normalised RMS", IsIdenticalObj, [_IsBitranslationOfNormalRMS, _IsBitranslationOfNormalRMS], -function(x, y) - return x![1] < y![1] or (x![1] = y![1] and x![2] < y![2]); -end); +{x, y} -> x![1] < y![1] or (x![1] = y![1] and x![2] < y![2])); InstallMethod(\^, "for a semigroup element and a translation", [IsReesMatrixSemigroupElement, _IsTranslationOfNormalRMS], @@ -1083,14 +1065,14 @@ end); InstallMethod(ChooseHashFunction, "for a left or right translation and int", [_IsTranslationOfNormalRMS, IsInt], -function(x, hashlen) +function(_, hashlen) return rec(func := SEMIGROUPS.HashFunctionForRMSTranslations, data := hashlen); end); InstallMethod(ChooseHashFunction, "for a bitranslation and int", [_IsBitranslationOfNormalRMS, IsInt], -function(x, hashlen) +function(_, hashlen) return rec(func := SEMIGROUPS.HashFunctionForRMSBitranslations, data := hashlen); end); diff --git a/gap/attributes/translat.gi b/gap/attributes/translat.gi index a19d61cd4..253fc0979 100644 --- a/gap/attributes/translat.gi +++ b/gap/attributes/translat.gi @@ -55,9 +55,8 @@ SEMIGROUPS.HasEasyBitranslationsGenerators := function(T) end; # Hash translations by their underlying transformations -SEMIGROUPS.HashFunctionForTranslations := function(x, data) - return ORB_HashFunctionForPlainFlatList(x![1], data); -end; +SEMIGROUPS.HashFunctionForTranslations := +{x, data} -> ORB_HashFunctionForPlainFlatList(x![1], data); # Hash bitranslations as sum of underlying transformation hashes SEMIGROUPS.HashFunctionForBitranslations := function(x, data) @@ -131,7 +130,7 @@ SEMIGROUPS.LeftTranslationsBacktrackData := function(S) # for each t in the left inverses of some a in max_R_intersects[i][j] by # reps[j], compute the right inverses of each s in S under t right_inverses := List([1 .. n], x -> ListWithIdenticalEntries(n + 1, fail)); - seen := List([1 .. id], x -> false); + seen := List([1 .. id], ReturnFalse); for i in [1 .. m] do for j in [1 .. m] do if i = j then @@ -303,7 +302,7 @@ SEMIGROUPS.RightTranslationsBacktrackData := function(S) # for each t in the right inverses of some a in max_L_intersects[i][j] by # reps[j], compute the left inverses of each s in S under t left_inverses := List([1 .. n], x -> ListWithIdenticalEntries(n + 1, fail)); - seen := List([1 .. id], x -> false); + seen := List([1 .. id], ReturnFalse); for i in [1 .. m] do for j in [1 .. m] do if i = j then @@ -853,11 +852,10 @@ function(L, map) S := UnderlyingSemigroup(L); reps := UnderlyingRepresentatives(L); - if not (S = Source(map) and Source(map) = Range(map)) then + if S <> Source(map) or Source(map) <> Range(map) then ErrorNoReturn("the domain and range of the second argument must be ", "the underlying semigroup of the first"); - fi; - if ForAny(reps, s -> ForAny(S, t -> (s ^ map) * t <> (s * t) ^ map)) then + elif ForAny(reps, s -> ForAny(S, t -> (s ^ map) * t <> (s * t) ^ map)) then ErrorNoReturn("the mapping given must define a left translation"); fi; @@ -873,12 +871,11 @@ function(L, l) S := UnderlyingSemigroup(L); reps := UnderlyingRepresentatives(L); - if not Length(l) = Length(reps) then + if Length(l) <> Length(reps) then ErrorNoReturn("the second argument must map indices of representatives ", "to indices of elements of the semigroup of the first ", "argument"); - fi; - if not ForAll(l, y -> IsPosInt(y) and y <= Size(S)) then + elif not ForAll(l, y -> IsPosInt(y) and y <= Size(S)) then ErrorNoReturn("the second argument must map indices of representatives ", "to indices of elements of the semigroup of the first ", "argument"); @@ -941,11 +938,10 @@ function(R, map) S := UnderlyingSemigroup(R); reps := UnderlyingRepresentatives(R); - if not (S = Source(map) and Source(map) = Range(map)) then + if S <> Source(map) or Source(map) <> Range(map) then ErrorNoReturn("the domain and range of the second argument must be ", "the underlying semigroup of the first"); - fi; - if ForAny(reps, s -> ForAny(S, t -> s * (t ^ map) <> (s * t) ^ map)) then + elif ForAny(reps, s -> ForAny(S, t -> s * (t ^ map) <> (s * t) ^ map)) then ErrorNoReturn("the mapping given must define a right translation"); fi; @@ -961,12 +957,11 @@ function(R, r) S := UnderlyingSemigroup(R); reps := UnderlyingRepresentatives(R); - if not Length(r) = Length(reps) then + if Length(r) <> Length(reps) then ErrorNoReturn("the second argument must map indices of representatives ", "to indices of elements of the semigroup of the first ", "argument"); - fi; - if not ForAll(r, y -> IsPosInt(y) and y <= Size(S)) then + elif not ForAll(r, y -> IsPosInt(y) and y <= Size(S)) then ErrorNoReturn("the second argument must map indices of representatives ", "to indices of elements of the semigroup of the first ", "argument"); @@ -1053,8 +1048,8 @@ function(H, l, r) L := LeftTranslationsSemigroupOfFamily(FamilyObj(l)); R := RightTranslationsSemigroupOfFamily(FamilyObj(r)); - if not (UnderlyingSemigroup(L) = S and UnderlyingSemigroup(R) = S) then - ErrorNoReturn("each argument must have the same underlying semigroup"); + if UnderlyingSemigroup(L) <> S or UnderlyingSemigroup(R) <> S then + ErrorNoReturn("each argument must have the same underlying semigroup"); fi; l_reps := UnderlyingRepresentatives(L); @@ -1069,9 +1064,7 @@ function(H, l, r) end); InstallGlobalFunction(BitranslationNC, -function(H, l, r) - return Objectify(TypeBitranslations(H), [l, r]); -end); +{H, l, r} -> Objectify(TypeBitranslations(H), [l, r])); ############################################################################# # 3. Methods for rectangular bands @@ -1088,8 +1081,7 @@ function(T) S := UnderlyingSemigroup(T); if not IsRectangularBand(S) then TryNextMethod(); - fi; - if IsLeftTranslationsSemigroup(T) then + elif IsLeftTranslationsSemigroup(T) then n := NrRClasses(S); else n := NrLClasses(S); @@ -1363,9 +1355,7 @@ function(T) # Just use the AsList for semigroups if generators are known if SEMIGROUPS.HasEasyTranslationsGenerators(T) then TryNextMethod(); - fi; - - if IsLeftTranslationsSemigroup(T) then + elif IsLeftTranslationsSemigroup(T) then return SEMIGROUPS.LeftTranslationsBacktrack(T); else return SEMIGROUPS.RightTranslationsBacktrack(T); @@ -1391,15 +1381,11 @@ end); InstallMethod(Size, "for a semigroups of left or right translations", [IsTranslationsSemigroup and IsWholeFamily], -function(T) - return Size(AsList(T)); -end); +T -> Size(AsList(T))); InstallMethod(Size, "for a translational hull", [IsBitranslationsSemigroup and IsWholeFamily], -function(H) - return Size(AsList(H)); -end); +H -> Size(AsList(H))); InstallMethod(NrLeftTranslations, "for a semigroup", [IsSemigroup and CanUseFroidurePin and IsFinite], @@ -1563,18 +1549,12 @@ function(x, y) end); InstallMethod(\=, "for left translations of a semigroup", -IsIdenticalObj, -[IsLeftTranslation, IsLeftTranslation], -function(x, y) - return x![1] = y![1]; -end); +IsIdenticalObj, [IsLeftTranslation, IsLeftTranslation], +{x, y} -> x![1] = y![1]); InstallMethod(\<, "for left translations of a semigroup", -IsIdenticalObj, -[IsLeftTranslation, IsLeftTranslation], -function(x, y) - return x![1] < y![1]; -end); +IsIdenticalObj, [IsLeftTranslation, IsLeftTranslation], +{x, y} -> x![1] < y![1]); # Different order of multiplication InstallMethod(\*, "for right translations of a semigroup", @@ -1592,18 +1572,12 @@ function(x, y) end); InstallMethod(\=, "for right translations of a semigroup", -IsIdenticalObj, -[IsRightTranslation, IsRightTranslation], -function(x, y) - return x![1] = y![1]; -end); +IsIdenticalObj, [IsRightTranslation, IsRightTranslation], +{x, y} -> x![1] = y![1]); InstallMethod(\<, "for right translations of a semigroup", -IsIdenticalObj, -[IsRightTranslation, IsRightTranslation], -function(x, y) - return x![1] < y![1]; -end); +IsIdenticalObj, [IsRightTranslation, IsRightTranslation], +{x, y} -> x![1] < y![1]); InstallMethod(\^, "for a semigroup element and a translation", [IsAssociativeElement, IsSemigroupTranslation], @@ -1667,25 +1641,16 @@ function(x) end); InstallMethod(\*, "for bitranslations", -IsIdenticalObj, -[IsBitranslation, IsBitranslation], -function(x, y) - return Objectify(FamilyObj(x)!.type, [x![1] * y![1], x![2] * y![2]]); -end); +IsIdenticalObj, [IsBitranslation, IsBitranslation], +{x, y} -> Objectify(FamilyObj(x)!.type, [x![1] * y![1], x![2] * y![2]])); InstallMethod(\=, "for bitranslations", -IsIdenticalObj, -[IsBitranslation, IsBitranslation], -function(x, y) - return x![1] = y![1] and x![2] = y![2]; -end); +IsIdenticalObj, [IsBitranslation, IsBitranslation], +{x, y} -> x![1] = y![1] and x![2] = y![2]); -InstallMethod(\<, "for bitranslations", -IsIdenticalObj, +InstallMethod(\<, "for bitranslations", IsIdenticalObj, [IsBitranslation, IsBitranslation], -function(x, y) - return x![1] < y![1] or (x![1] = y![1] and x![2] < y![2]); -end); +{x, y} -> x![1] < y![1] or (x![1] = y![1] and x![2] < y![2])); InstallMethod(UnderlyingSemigroup, "for a semigroup of left or right translations", @@ -1712,14 +1677,14 @@ end); InstallMethod(ChooseHashFunction, "for a left or right translation and int", [IsSemigroupTranslation, IsInt], -function(x, hashlen) +function(_, hashlen) return rec(func := SEMIGROUPS.HashFunctionForTranslations, data := hashlen); end); InstallMethod(ChooseHashFunction, "for a bitranslation and int", [IsBitranslation, IsInt], -function(x, hashlen) +function(_, hashlen) return rec(func := SEMIGROUPS.HashFunctionForBitranslations, data := hashlen); end); diff --git a/gap/congruences/cong.gi b/gap/congruences/cong.gi index fe4ec70a6..dfc94852a 100644 --- a/gap/congruences/cong.gi +++ b/gap/congruences/cong.gi @@ -40,16 +40,14 @@ InstallMethod(CongruenceHandednessString, "for a 2-sided congruence", # This is required for QuotientSemigroups and their subsemigroups. InstallImmediateMethod(CanEasilyCompareElements, IsCongruenceClass and HasEquivalenceClassRelation, 0, -function(C) - return CanUseLibsemigroupsCongruence(EquivalenceClassRelation(C)); -end); +C -> CanUseLibsemigroupsCongruence(EquivalenceClassRelation(C))); ######################################################################## # Flexible functions for creating congruences ######################################################################## InstallGlobalFunction(SemigroupCongruence, -function(arg) +function(arg...) local S, opts, s_opts, x, pairs, cong; if not Length(arg) >= 2 then ErrorNoReturn("at least 2 arguments are required"); @@ -59,8 +57,8 @@ function(arg) S := arg[1]; # Set up any options - if IsRecord(arg[Length(arg)]) then - opts := arg[Length(arg)]; + if IsRecord(Last(arg)) then + opts := Last(arg); arg := arg{[1 .. Length(arg) - 1]}; else opts := rec(); @@ -178,12 +176,14 @@ function(CongruenceConstructor, arg) end); InstallGlobalFunction(LeftSemigroupCongruence, -function(arg) +# Can't be a lambda because arg has a special meaning here +function(arg...) return _LeftOrRightCong(LeftSemigroupCongruenceByGeneratingPairs, arg); end); InstallGlobalFunction(RightSemigroupCongruence, -function(arg) +# Can't be a lambda because arg has a special meaning here +function(arg...) return _LeftOrRightCong(RightSemigroupCongruenceByGeneratingPairs, arg); end); @@ -192,10 +192,7 @@ end); ######################################################################## InstallMethod(TrivialCongruence, "for a semigroup", -[IsSemigroup], -function(S) - return SemigroupCongruence(S, []); -end); +[IsSemigroup], S -> SemigroupCongruence(S, [])); ######################################################################## # Congruence operators diff --git a/gap/congruences/conginv.gi b/gap/congruences/conginv.gi index 76aa1ee13..6d6fac65d 100644 --- a/gap/congruences/conginv.gi +++ b/gap/congruences/conginv.gi @@ -412,12 +412,8 @@ SEMIGROUPS.KernelTraceClosure := function(S, kernel, traceBlocks, pairstoapply) while K <> T do K := T; opts := rec(); - opts.gradingfunc := function(o, x) - return x in K; - end; - opts.onlygrades := function(x, data) - return x = false; - end; + opts.gradingfunc := {o, x} -> x in K; + opts.onlygrades := {x, data} -> x = false; opts.onlygradesdata := fail; for x in K do list := Enumerate(Orb(GeneratorsOfSemigroup(S), x, OnPoints, opts)); diff --git a/gap/congruences/conglatt.gi b/gap/congruences/conglatt.gi index 2742e4b2b..ceb8133ab 100644 --- a/gap/congruences/conglatt.gi +++ b/gap/congruences/conglatt.gi @@ -169,26 +169,18 @@ BindGlobal("WrappedTwoSidedCongruenceType", IsWrappedTwoSidedCongruence and IsPositionalObjectRep)); BindGlobal("WrappedLeftCongruence", -function(x) - return Objectify(WrappedLeftCongruenceType, [x]); -end); +x -> Objectify(WrappedLeftCongruenceType, [x])); BindGlobal("WrappedRightCongruence", -function(x) - return Objectify(WrappedRightCongruenceType, [x]); -end); +x -> Objectify(WrappedRightCongruenceType, [x])); BindGlobal("WrappedTwoSidedCongruence", -function(x) - return Objectify(WrappedTwoSidedCongruenceType, [x]); -end); +x -> Objectify(WrappedTwoSidedCongruenceType, [x])); InstallMethod(\=, "for wrapped left, right, or 2-sided congruences", [IsWrappedLeftRightOrTwoSidedCongruence, IsWrappedLeftRightOrTwoSidedCongruence], -function(x, y) - return x![1] = y![1]; -end); +{x, y} -> x![1] = y![1]); InstallMethod(\<, "for wrapped left, right, or 2-sided congruences", [IsWrappedLeftRightOrTwoSidedCongruence, @@ -240,7 +232,7 @@ function(S, gen_congs, WrappedXCongruence) local gens, poset, all_congs, old_value, U; # Trivial case - if Length(gen_congs) = 0 then + if IsEmpty(gen_congs) then return SEMIGROUPS.MakeCongruencePoset(Digraph([[1]]), [TrivialCongruence(S)]); fi; @@ -592,38 +584,26 @@ end; InstallMethod(LatticeOfCongruences, "for a semigroup and a list or collection", [IsSemigroup, IsListOrCollection], -function(S, pairs) - return SEMIGROUPS.MakeLattice(CayleyDigraphOfCongruences(S, pairs)); -end); +{S, pairs} -> SEMIGROUPS.MakeLattice(CayleyDigraphOfCongruences(S, pairs))); InstallMethod(LatticeOfCongruences, "for a semigroup", [IsSemigroup], -function(S) - return SEMIGROUPS.MakeLattice(CayleyDigraphOfCongruences(S)); -end); +S -> SEMIGROUPS.MakeLattice(CayleyDigraphOfCongruences(S))); InstallMethod(LatticeOfRightCongruences, "for a semigroup and a list or collection", [IsSemigroup, IsListOrCollection], -function(S, pairs) - return SEMIGROUPS.MakeLattice(CayleyDigraphOfRightCongruences(S, pairs)); -end); +{S, pairs} -> SEMIGROUPS.MakeLattice(CayleyDigraphOfRightCongruences(S, pairs))); InstallMethod(LatticeOfRightCongruences, "for a semigroup", [IsSemigroup], -function(S) - return SEMIGROUPS.MakeLattice(CayleyDigraphOfRightCongruences(S)); -end); +S -> SEMIGROUPS.MakeLattice(CayleyDigraphOfRightCongruences(S))); InstallMethod(LatticeOfLeftCongruences, "for a semigroup and a list or collection", [IsSemigroup, IsListOrCollection], -function(S, pairs) - return SEMIGROUPS.MakeLattice(CayleyDigraphOfLeftCongruences(S, pairs)); -end); +{S, pairs} -> SEMIGROUPS.MakeLattice(CayleyDigraphOfLeftCongruences(S, pairs))); InstallMethod(LatticeOfLeftCongruences, "for a semigroup", [IsSemigroup], -function(S) - return SEMIGROUPS.MakeLattice(CayleyDigraphOfLeftCongruences(S)); -end); +S -> SEMIGROUPS.MakeLattice(CayleyDigraphOfLeftCongruences(S))); ######################################################################## # Left/Right/CongruencesOfSemigroup @@ -742,23 +722,17 @@ end); InstallMethod(MinimalCongruencesOfSemigroup, "for a semigroup and list or collection", [IsSemigroup, IsListOrCollection], -function(S, pairs) - return MinimalCongruences(PosetOfPrincipalCongruences(S, pairs)); -end); +{S, pairs} -> MinimalCongruences(PosetOfPrincipalCongruences(S, pairs))); InstallMethod(MinimalRightCongruencesOfSemigroup, "for a semigroup and list or collection", [IsSemigroup, IsListOrCollection], -function(S, pairs) - return MinimalCongruences(PosetOfPrincipalRightCongruences(S, pairs)); -end); +{S, pairs} -> MinimalCongruences(PosetOfPrincipalRightCongruences(S, pairs))); InstallMethod(MinimalLeftCongruencesOfSemigroup, "for a semigroup and list or collection", [IsSemigroup, IsListOrCollection], -function(S, pairs) - return MinimalCongruences(PosetOfPrincipalLeftCongruences(S, pairs)); -end); +{S, pairs} -> MinimalCongruences(PosetOfPrincipalLeftCongruences(S, pairs))); ######################################################################## # PosetOfPrincipalRight/LeftCongruences @@ -793,23 +767,18 @@ end); InstallMethod(PosetOfPrincipalCongruences, "for a semigroup and list or collection", [IsSemigroup, IsListOrCollection], -function(S, pairs) - return PosetOfCongruences(PrincipalCongruencesOfSemigroup(S, pairs)); -end); +{S, pairs} -> PosetOfCongruences(PrincipalCongruencesOfSemigroup(S, pairs))); InstallMethod(PosetOfPrincipalRightCongruences, "for a semigroup and list or collection", [IsSemigroup, IsListOrCollection], -function(S, pairs) - return PosetOfCongruences(PrincipalRightCongruencesOfSemigroup(S, pairs)); -end); +{S, pairs} +-> PosetOfCongruences(PrincipalRightCongruencesOfSemigroup(S, pairs))); InstallMethod(PosetOfPrincipalLeftCongruences, "for a semigroup and list or collection", [IsSemigroup, IsListOrCollection], -function(S, pairs) - return PosetOfCongruences(PrincipalLeftCongruencesOfSemigroup(S, pairs)); -end); +{S, pairs} -> PosetOfCongruences(PrincipalLeftCongruencesOfSemigroup(S, pairs))); ######################################################################## # Printing, viewing, dot strings etc @@ -915,4 +884,3 @@ function(poset, opts) return str; end); - diff --git a/gap/congruences/congpairs.gi b/gap/congruences/congpairs.gi index bb97cdef4..35af97792 100644 --- a/gap/congruences/congpairs.gi +++ b/gap/congruences/congpairs.gi @@ -30,27 +30,25 @@ InstallImmediateMethod(GeneratingPairsOfLeftRightOrTwoSidedCongruence, 0, GeneratingPairsOfRightMagmaCongruence); +BindGlobal("SEMIGROUPS_ImmediateNoGeneratingPairs", +function(C) + if IsEmpty(GeneratingPairsOfMagmaCongruence(C)) then + return []; + fi; + TryNextMethod(); +end); + InstallImmediateMethod(GeneratingPairsOfLeftMagmaCongruence, IsMagmaCongruence and IsSemigroupCongruence and HasGeneratingPairsOfMagmaCongruence, 0, - function(C) - if IsEmpty(GeneratingPairsOfMagmaCongruence(C)) then - return []; - fi; - TryNextMethod(); - end); + SEMIGROUPS_ImmediateNoGeneratingPairs); InstallImmediateMethod(GeneratingPairsOfRightMagmaCongruence, IsMagmaCongruence and IsSemigroupCongruence and HasGeneratingPairsOfMagmaCongruence, 0, - function(C) - if IsEmpty(GeneratingPairsOfMagmaCongruence(C)) then - return []; - fi; - TryNextMethod(); - end); + SEMIGROUPS_ImmediateNoGeneratingPairs); # Some types of congruences (such as CongruenceByKernelAndTrace) do not know # their generating pairs by default, and hence we require the following methods diff --git a/gap/congruences/congpart.gi b/gap/congruences/congpart.gi index 761798177..220788d64 100644 --- a/gap/congruences/congpart.gi +++ b/gap/congruences/congpart.gi @@ -237,9 +237,7 @@ end); InstallMethod(NrEquivalenceClasses, "for a left, right, or 2-sided congruence that can compute partition", [CanComputeEquivalenceRelationPartition], -function(C) - return Length(EquivalenceClasses(C)); -end); +C -> Length(EquivalenceClasses(C))); BindGlobal("_GeneratingPairsOfLeftRight2SidedCongDefault", function(XCongruenceByGeneratingPairs, C) diff --git a/gap/congruences/congrees.gi b/gap/congruences/congrees.gi index 92d0e756f..e5ec3a708 100644 --- a/gap/congruences/congrees.gi +++ b/gap/congruences/congrees.gi @@ -278,7 +278,7 @@ end); InstallMethod(\*, "for two Rees congruence classes", [IsReesCongruenceClass, IsReesCongruenceClass], function(lhop, rhop) - if not EquivalenceClassRelation(lhop) = EquivalenceClassRelation(rhop) then + if EquivalenceClassRelation(lhop) <> EquivalenceClassRelation(rhop) then ErrorNoReturn("the arguments (cong. classes) are not classes of the same ", "congruence"); elif Size(lhop) > 1 then diff --git a/gap/congruences/congrms.gd b/gap/congruences/congrms.gd index e943004f2..a2551442c 100644 --- a/gap/congruences/congrms.gd +++ b/gap/congruences/congrms.gd @@ -13,19 +13,18 @@ ## and MSc thesis "Computing with Semigroup Congruences" chapter 3. ## -# Congruences by linked triple -DeclareCategory("IsRMSCongruenceByLinkedTriple", +DeclareCategory("IsRMSOrRZMSCongruenceByLinkedTriple", IsSemigroupCongruence and IsMagmaCongruence and CanComputeEquivalenceRelationPartition and IsAttributeStoringRep and IsFinite); + +# Congruences by linked triple +DeclareCategory("IsRMSCongruenceByLinkedTriple", + IsRMSOrRZMSCongruenceByLinkedTriple); DeclareCategory("IsRZMSCongruenceByLinkedTriple", - IsSemigroupCongruence - and IsMagmaCongruence - and CanComputeEquivalenceRelationPartition - and IsAttributeStoringRep - and IsFinite); + IsRMSOrRZMSCongruenceByLinkedTriple); DeclareOperation("IsLinkedTriple", [IsSemigroup, IsGroup, IsDenseList, IsDenseList]); diff --git a/gap/congruences/congrms.gi b/gap/congruences/congrms.gi index afdace00d..de2f75ffa 100644 --- a/gap/congruences/congrms.gi +++ b/gap/congruences/congrms.gi @@ -605,20 +605,8 @@ end); ############################################################################# InstallMethod(ViewObj, -"for Rees matrix semigroup congruence by linked triple", -[IsRMSCongruenceByLinkedTriple], -function(C) - Print(""); -end); - -InstallMethod(ViewObj, -"for Rees zero-matrix semigroup congruence by linked triple", -[IsRZMSCongruenceByLinkedTriple], +"for Rees (0-)matrix semigroup congruence by linked triple", +[IsRMSOrRZMSCongruenceByLinkedTriple], function(C) Print(" C!.colLookup[j] or + C!.rowLookup[u] <> C!.rowLookup[v] then return false; fi; @@ -804,8 +781,8 @@ function(C, lhop, rhop) v := rhop[3]; # First, the columns and rows must be related - if not (C!.colLookup[i] = C!.colLookup[j] and - C!.rowLookup[u] = C!.rowLookup[v]) then + if C!.colLookup[i] <> C!.colLookup[j] or + C!.rowLookup[u] <> C!.rowLookup[v] then return false; fi; @@ -830,8 +807,8 @@ end); # Comparison operators InstallMethod(\=, -"for two Rees matrix semigroup congruences by linked triple", -[IsRMSCongruenceByLinkedTriple, IsRMSCongruenceByLinkedTriple], +"for Rees (0-)matrix semigroup congruences by linked triple", +[IsRMSOrRZMSCongruenceByLinkedTriple, IsRMSOrRZMSCongruenceByLinkedTriple], function(lhop, rhop) return(Range(lhop) = Range(rhop) and lhop!.n = rhop!.n and @@ -839,35 +816,9 @@ function(lhop, rhop) lhop!.rowBlocks = rhop!.rowBlocks); end); -InstallMethod(\=, -"for two Rees 0-matrix semigroup congruences by linked triple", -[IsRZMSCongruenceByLinkedTriple, IsRZMSCongruenceByLinkedTriple], -function(lhop, rhop) - return(Range(lhop) = Range(rhop) and - lhop!.n = rhop!.n and - lhop!.colBlocks = rhop!.colBlocks and - lhop!.rowBlocks = rhop!.rowBlocks); -end); - -InstallMethod(IsSubrelation, -"for two Rees matrix semigroup congruences by linked triple", -[IsRMSCongruenceByLinkedTriple, IsRMSCongruenceByLinkedTriple], -function(lhop, rhop) - # Tests whether rhop is a subcongruence of lhop - if Range(lhop) <> Range(rhop) then - Error("the 1st and 2nd arguments are congruences over different", - " semigroups"); - fi; - return IsSubgroup(lhop!.n, rhop!.n) - and ForAll(rhop!.colBlocks, - b2 -> ForAny(lhop!.colBlocks, b1 -> IsSubset(b1, b2))) - and ForAll(rhop!.rowBlocks, - b2 -> ForAny(lhop!.rowBlocks, b1 -> IsSubset(b1, b2))); -end); - InstallMethod(IsSubrelation, -"for two Rees 0-matrix semigroup congruences by linked triple", -[IsRZMSCongruenceByLinkedTriple, IsRZMSCongruenceByLinkedTriple], +"for Rees (0-)matrix semigroup congruences by linked triple", +[IsRMSOrRZMSCongruenceByLinkedTriple, IsRMSOrRZMSCongruenceByLinkedTriple], function(lhop, rhop) # Tests whether rhop is a subcongruence of lhop if Range(lhop) <> Range(rhop) then @@ -1001,8 +952,8 @@ function(lhop, rhop) od; rowBlocks := Compacted(rowBlocks); od; - colBlocks := SortedList(List(colBlocks, block -> SortedList(block))); - rowBlocks := SortedList(List(rowBlocks, block -> SortedList(block))); + colBlocks := SortedList(List(colBlocks, SortedList)); + rowBlocks := SortedList(List(rowBlocks, SortedList)); # Make the congruence and return it return RMSCongruenceByLinkedTripleNC(Range(lhop), n, colBlocks, rowBlocks); end); @@ -1046,8 +997,8 @@ function(lhop, rhop) od; rowBlocks := Compacted(rowBlocks); od; - colBlocks := SortedList(List(colBlocks, block -> SortedList(block))); - rowBlocks := SortedList(List(rowBlocks, block -> SortedList(block))); + colBlocks := SortedList(List(colBlocks, SortedList)); + rowBlocks := SortedList(List(rowBlocks, SortedList)); # Make the congruence and return it return RZMSCongruenceByLinkedTriple(Range(lhop), n, colBlocks, rowBlocks); end); @@ -1147,7 +1098,7 @@ InstallMethod(RMSCongruenceClassByLinkedTriple, function(C, nCoset, colClass, rowClass) local g; g := UnderlyingSemigroup(Range(C)); - if not (ActingDomain(nCoset) = C!.n and IsSubset(g, nCoset)) then + if ActingDomain(nCoset) <> C!.n or not IsSubset(g, nCoset) then ErrorNoReturn("the 2nd argument (a right coset) is not a coset of the", " normal subgroup of defining the 1st argument (a ", "congruence)"); @@ -1165,7 +1116,7 @@ InstallMethod(RZMSCongruenceClassByLinkedTriple, function(C, nCoset, colClass, rowClass) local g; g := UnderlyingSemigroup(Range(C)); - if not (ActingDomain(nCoset) = C!.n and IsSubset(g, nCoset)) then + if ActingDomain(nCoset) <> C!.n or not IsSubset(g, nCoset) then ErrorNoReturn("the 2nd argument (a right coset) is not a coset of the", " normal subgroup of defining the 1st argument (a ", "congruence)"); @@ -1400,6 +1351,19 @@ end); # 9. Congruence lattice ############################################################################### +# Function to compute all subsets of a relation given by partitions +SEMIGROUPS.Subpartitions := function(part) + local l; + # Replace each class with a list of all partitions of that class + l := List(part, PartitionsSet); + # Produce all the combinations of partitions of classes + l := Cartesian(l); + # Concatenate these lists to produce complete partitions of the set + l := List(l, Concatenation); + # Finally sort each of these into the canonical order of its new classes + return List(l, SSortedList); +end; + InstallMethod(CongruencesOfSemigroup, "for finite simple Rees matrix semigroup", [IsReesMatrixSemigroup and IsSimpleSemigroup and IsFinite], @@ -1407,18 +1371,7 @@ function(S) local subpartitions, congs, mat, g, colBlocksList, rowBlocksList, n, colBlocks, rowBlocks; - # Function to compute all subsets of a relation given by partitions - subpartitions := function(part) - local l; - # Replace each class with a list of all partitions of that class - l := List(part, PartitionsSet); - # Produce all the combinations of partitions of classes - l := Cartesian(l); - # Concatenate these lists to produce complete partitions of the set - l := List(l, Concatenation); - # Finally sort each of these into the canonical order of its new classes - return List(l, SSortedList); - end; + subpartitions := SEMIGROUPS.Subpartitions; congs := []; mat := Matrix(S); @@ -1453,19 +1406,7 @@ function(S) i, j, u, v, n, colBlocks, rowBlocks, colBlocksList, rowBlocksList, subpartitions; - # Function to compute all subsets of a relation given by partitions - subpartitions := function(part) - local l; - # Replace each class with a list of all partitions of that class - l := List(part, PartitionsSet); - # Produce all the combinations of partitions of classes - l := Cartesian(l); - # Concatenate these lists to produce complete partitions of the set - l := List(l, Concatenation); - # Finally sort each of these into the canonical order of its new classes - return List(l, SSortedList); - end; - + subpartitions := SEMIGROUPS.Subpartitions; congs := []; mat := Matrix(S); g := UnderlyingSemigroup(S); diff --git a/gap/congruences/congsemigraph.gi b/gap/congruences/congsemigraph.gi index 458d21410..f1a9b4a79 100644 --- a/gap/congruences/congsemigraph.gi +++ b/gap/congruences/congsemigraph.gi @@ -13,7 +13,7 @@ function(S, H) local out, h, v, D, BlistH; D := GraphOfGraphInverseSemigroup(S); out := OutNeighbours(D); - if H = [] or H = DigraphVertices(D) then + if IsEmpty(H) or H = DigraphVertices(D) then return true; fi; BlistH := BlistList(DigraphVertices(D), H); @@ -160,7 +160,7 @@ function(S) congs := []; out := OutNeighbours(D); for v in DigraphVertices(D) do - if Length(out[v]) = 0 then + if IsEmpty(out[v]) then Add(congs, CongruenceByWangPair(S, [v], [])); elif Length(out[v]) = 1 then Add(congs, CongruenceByWangPair(S, [], [v])); @@ -261,22 +261,18 @@ end); InstallMethod(IsSubrelation, "for two congruences by Wang pair", [IsCongruenceByWangPair, IsCongruenceByWangPair], -function(cong1, cong2) - return IsSubset(Union(cong1!.H, cong1!.W), Union(cong2!.H, cong2!.W)); -end); +{cong1, cong2} +-> IsSubset(Union(cong1!.H, cong1!.W), Union(cong2!.H, cong2!.W))); InstallMethod(IsSuperrelation, "for two congruences by Wang pair", [IsCongruenceByWangPair, IsCongruenceByWangPair], -function(cong1, cong2) - return IsSubset(Union(cong2!.H, cong2!.W), Union(cong1!.H, cong1!.W)); -end); +{cong1, cong2} +-> IsSubset(Union(cong2!.H, cong2!.W), Union(cong1!.H, cong1!.W))); InstallMethod(\=, "for two congruences by Wang pair", [IsCongruenceByWangPair, IsCongruenceByWangPair], -function(cong1, cong2) - return cong1!.H = cong2!.H and cong1!.W = cong2!.W; -end); +{cong1, cong2} -> cong1!.H = cong2!.H and cong1!.W = cong2!.W); InstallMethod(CayleyDigraphOfCongruences, "for a graph inverse semigroup", @@ -290,6 +286,4 @@ end); InstallMethod(TrivialCongruence, "for a graph inverse semigroup", [IsGraphInverseSemigroup], -function(S) - return AsCongruenceByWangPair(SemigroupCongruence(S, [])); -end); +S -> AsCongruenceByWangPair(SemigroupCongruence(S, []))); diff --git a/gap/congruences/congsimple.gi b/gap/congruences/congsimple.gi index 3b66e8227..12632f2f5 100644 --- a/gap/congruences/congsimple.gi +++ b/gap/congruences/congsimple.gi @@ -125,9 +125,7 @@ end); InstallMethod(\=, "for two (0-)simple semigroup congruences", [IsSimpleSemigroupCongruence, IsSimpleSemigroupCongruence], -function(lhop, rhop) - return lhop!.rmscong = rhop!.rmscong; -end); +{lhop, rhop} -> lhop!.rmscong = rhop!.rmscong); InstallMethod(JoinSemigroupCongruences, "for two (0-)simple semigroup congruences", @@ -152,9 +150,7 @@ InstallMethod(CongruenceTestMembershipNC, [IsSimpleSemigroupCongruence, IsMultiplicativeElement, IsMultiplicativeElement], -function(C, x, y) - return [x ^ C!.iso, y ^ C!.iso] in C!.rmscong; -end); +{C, x, y} -> [x ^ C!.iso, y ^ C!.iso] in C!.rmscong); InstallMethod(ImagesElm, "for a (0-)simple semigroup congruence and a multiplicative element", @@ -197,30 +193,22 @@ end); InstallMethod(NrEquivalenceClasses, "for a (0-)simple semigroup congruence", [IsSimpleSemigroupCongruence], -function(C) - return NrEquivalenceClasses(C!.rmscong); -end); +C -> NrEquivalenceClasses(C!.rmscong)); InstallMethod(\in, "for a multiplicative element and a (0-)simple semigroup congruence class", [IsMultiplicativeElement, IsSimpleSemigroupCongruenceClass], -function(x, class) - return (x ^ EquivalenceClassRelation(class)!.iso in class!.rmsclass); -end); +{x, class} -> x ^ EquivalenceClassRelation(class)!.iso in class!.rmsclass); InstallMethod(Size, "for a (0-)simple semigroup congruence class", [IsSimpleSemigroupCongruenceClass], -function(class) - return Size(class!.rmsclass); -end); +{class} -> Size(class!.rmsclass)); InstallMethod(\=, "for two (0-)simple semigroup congruence classes", [IsSimpleSemigroupCongruenceClass, IsSimpleSemigroupCongruenceClass], -function(lhop, rhop) - return lhop!.rmsclass = rhop!.rmsclass; -end); +{lhop, rhop} -> lhop!.rmsclass = rhop!.rmsclass); InstallMethod(GeneratingPairsOfSemigroupCongruence, "for a (0-)simple semigroup congruence", @@ -235,9 +223,7 @@ end); InstallMethod(IsSubrelation, "for two (0-)simple semigroup congruences", [IsSimpleSemigroupCongruence, IsSimpleSemigroupCongruence], -function(lhop, rhop) - return IsSubrelation(lhop!.rmscong, rhop!.rmscong); -end); +{lhop, rhop} -> IsSubrelation(lhop!.rmscong, rhop!.rmscong)); InstallMethod(EquivalenceRelationPartition, "for a (0-)simple semigroup congruence", diff --git a/gap/congruences/conguniv.gi b/gap/congruences/conguniv.gi index e0f403317..298cfc0d6 100644 --- a/gap/congruences/conguniv.gi +++ b/gap/congruences/conguniv.gi @@ -58,9 +58,7 @@ end); InstallMethod(\=, "for two universal semigroup congruences", [IsUniversalSemigroupCongruence, IsUniversalSemigroupCongruence], -function(lhop, rhop) - return Range(lhop) = Range(rhop); -end); +{lhop, rhop} -> Range(lhop) = Range(rhop)); InstallMethod(\=, "for universal congruence and RZMS congruence by linked triple", @@ -76,17 +74,13 @@ InstallMethod(\=, "for universal congruence and semigroup congruence with generating pairs", [IsUniversalSemigroupCongruence, IsSemigroupCongruence and HasGeneratingPairsOfMagmaCongruence], -function(U, C) - return Range(U) = Range(C) and NrEquivalenceClasses(C) = 1; -end); +{U, C} -> Range(U) = Range(C) and NrEquivalenceClasses(C) = 1); InstallMethod(\=, "for universal congruence and semigroup congruence with generating pairs", [IsSemigroupCongruence and HasGeneratingPairsOfMagmaCongruence, IsUniversalSemigroupCongruence], -function(C, U) - return U = C; -end); +{C, U} -> U = C); InstallMethod(CongruenceTestMembershipNC, "for universal semigroup congruence and two multiplicative elements", @@ -178,9 +172,7 @@ end); InstallMethod(EquivalenceClasses, "for universal semigroup congruence", [IsUniversalSemigroupCongruence], -function(C) - return [EquivalenceClassOfElement(C, Representative(Range(C)))]; -end); +C -> [EquivalenceClassOfElement(C, Representative(Range(C)))]); InstallMethod(EquivalenceClassOfElementNC, "for universal semigroup congruence and associative element", @@ -203,9 +195,7 @@ end); InstallMethod(\in, "for associative element and universal semigroup congruence class", [IsMultiplicativeElement, IsUniversalSemigroupCongruenceClass], -function(x, class) - return x in Parent(class); -end); +{x, class} -> x in Parent(class)); # TODO(later) more \* methods for universal and non-universal congruences?? InstallMethod(\*, @@ -227,9 +217,7 @@ C -> Size(Range(EquivalenceClassRelation(C)))); InstallMethod(\=, "for two universal semigroup congruence classes", [IsUniversalSemigroupCongruenceClass, IsUniversalSemigroupCongruenceClass], -function(lhop, rhop) - return EquivalenceClassRelation(lhop) = EquivalenceClassRelation(rhop); -end); +{lhop, rhop} -> EquivalenceClassRelation(lhop) = EquivalenceClassRelation(rhop)); InstallMethod(GeneratingPairsOfMagmaCongruence, "for universal semigroup congruence", diff --git a/gap/elements/bipart.gi b/gap/elements/bipart.gi index 52f775f4d..c53ba5f30 100644 --- a/gap/elements/bipart.gi +++ b/gap/elements/bipart.gi @@ -169,9 +169,7 @@ function(blocks) end); InstallMethod(IdentityBipartition, "for zero", [IsZeroCyc], -function(n) - return Bipartition([]); -end); +_ -> Bipartition([])); InstallMethod(IdentityBipartition, "for a positive integer", [IsPosInt], function(n) @@ -215,9 +213,7 @@ function(rs, n) end); InstallMethod(RandomBipartition, "for a pos int", [IsPosInt], -function(n) - return RandomBipartition(GlobalMersenneTwister, n); -end); +n -> RandomBipartition(GlobalMersenneTwister, n)); InstallMethod(RandomBlockBijection, "for a random source and pos int", [IsRandomSource, IsPosInt], @@ -255,9 +251,7 @@ function(rs, n) end); InstallMethod(RandomBlockBijection, "for a pos int", [IsPosInt], -function(n) - return RandomBlockBijection(GlobalMersenneTwister, n); -end); +n -> RandomBlockBijection(GlobalMersenneTwister, n)); # Operators @@ -318,10 +312,7 @@ InstallMethod(StarOp, "for a bipartition", [IsBipartition], BIPART_STAR); InstallMethod(ChooseHashFunction, "for a bipartition", [IsBipartition, IsInt], - function(x, hashlen) - return rec(func := BIPART_HASH, - data := hashlen); -end); +{_, hashlen} -> rec(func := BIPART_HASH, data := hashlen)); ############################################################################# # GAP level @@ -358,9 +349,7 @@ end); InstallMethod(IsBlockBijection, "for a bipartition", [IsBipartition], -function(x) - return NrBlocks(x) = NrLeftBlocks(x) and NrRightBlocks(x) = NrLeftBlocks(x); -end); +x -> NrBlocks(x) = NrLeftBlocks(x) and NrRightBlocks(x) = NrLeftBlocks(x)); InstallMethod(IsPartialPermBipartition, "for a bipartition", [IsBipartition], @@ -464,9 +453,7 @@ end); InstallMethod(\^, "for a bipartition and permutation", [IsBipartition, IsPerm], -function(f, p) - return p ^ -1 * f * p; -end); +{f, p} -> p ^ -1 * f * p); # Other operators @@ -485,9 +472,7 @@ end); InstallMethod(AsBipartition, "for a permutation and zero", [IsPerm, IsZeroCyc], -function(f, n) - return Bipartition([]); -end); +{f, n} -> Bipartition([])); InstallMethod(AsBipartition, "for a permutation", [IsPerm], x -> AsBipartition(x, LargestMovedPoint(x))); @@ -501,31 +486,23 @@ end); InstallMethod(AsBipartition, "for a partial perm and zero", [IsPartialPerm, IsZeroCyc], -function(f, n) - return Bipartition([]); -end); +{f, n} -> Bipartition([])); InstallMethod(AsBipartition, "for a transformation", [IsTransformation], x -> AsBipartition(x, DegreeOfTransformation(x))); InstallMethod(AsBipartition, "for a transformation and zero", [IsTransformation, IsZeroCyc], -function(f, n) - return Bipartition([]); -end); +{f, n} -> Bipartition([])); InstallMethod(AsBipartition, "for a bipartition", [IsBipartition], IdFunc); InstallMethod(AsBipartition, "for a bipartition", [IsBipartition, IsZeroCyc], -function(f, n) - return Bipartition([]); -end); +{f, n} -> Bipartition([])); InstallMethod(AsBipartition, "for a pbr and pos int", [IsPBR, IsZeroCyc], -function(x, deg) - return Bipartition([]); -end); +{x, deg} -> Bipartition([])); InstallMethod(AsBipartition, "for a pbr and pos int", [IsPBR, IsPosInt], @@ -584,9 +561,7 @@ function(x) end); InstallMethod(String, "for a bipartition", [IsBipartition], -function(x) - return Concatenation("Bipartition(", String(ExtRepOfObj(x)), ")"); -end); +x -> Concatenation("Bipartition(", String(ExtRepOfObj(x)), ")")); InstallMethod(PrintString, "for a bipartition", [IsBipartition], @@ -617,12 +592,12 @@ function(coll) str := "\>[ "; for i in [1 .. Length(coll)] do - if not i = 1 then + if i <> 1 then Append(str, " "); fi; Append(str, "\>"); Append(str, PrintString(coll[i])); - if not i = Length(coll) then + if i <> Length(coll) then Append(str, ",\<\n"); else Append(str, " ]\<\n"); @@ -638,9 +613,7 @@ InstallMethod(DegreeOfBipartitionCollection, "for a bipartition semigroup", InstallMethod(DegreeOfBipartitionCollection, "for a bipartition collection", [IsBipartitionCollection], -function(coll) - return DegreeOfBipartition(coll[1]); -end); +{coll} -> DegreeOfBipartition(coll[1])); ############################################################################# # All of the methods in this section could be done in C/C++ @@ -1019,6 +992,4 @@ end); InstallMethod(IndexPeriodOfSemigroupElement, "for a bipartition", [IsBipartition], -function(x) - return SEMIGROUPS.IndexPeriodByRank(x, RankOfBipartition); -end); +x -> SEMIGROUPS.IndexPeriodByRank(x, RankOfBipartition)); diff --git a/gap/elements/blocks.gi b/gap/elements/blocks.gi index fc611fbc8..e28410d69 100644 --- a/gap/elements/blocks.gi +++ b/gap/elements/blocks.gi @@ -32,10 +32,7 @@ InstallMethod(ExtRepOfObj, "for blocks", [IsBlocks], BLOCKS_EXT_REP); InstallMethod(ChooseHashFunction, "for blocks", [IsBlocks, IsInt], -function(x, hashlen) - return rec(func := BLOCKS_HASH, - data := hashlen); -end); +{_, hashlen} -> rec(func := BLOCKS_HASH, data := hashlen)); InstallMethod(DegreeOfBlocks, "for blocks", [IsBlocks], BLOCKS_DEGREE); InstallMethod(RankOfBlocks, "for blocks", [IsBlocks], BLOCKS_RANK); diff --git a/gap/elements/boolmat.gi b/gap/elements/boolmat.gi index b9aa2d5f6..7aa91a038 100644 --- a/gap/elements/boolmat.gi +++ b/gap/elements/boolmat.gi @@ -175,9 +175,9 @@ function(x) return MatrixNC(x, id); end); -InstallMethod(RandomMatrixCons, "for boolean matrices and a pos int", +InstallMethod(RandomMatrixCons, "for IsBooleanMat and a pos int", [IsBooleanMat, IsPosInt], -function(filter, n) +function(_, n) local x, i, j; x := List([1 .. n], x -> BlistList([1 .. n], [])); @@ -383,9 +383,7 @@ end); InstallMethod(AsDigraph, "for a boolean matrix", [IsBooleanMat], -function(mat) - return DigraphByAdjacencyMatrix(AsList(mat)); -end); +{mat} -> DigraphByAdjacencyMatrix(AsList(mat))); InstallMethod(AsBooleanMat, "for a digraph", [IsDigraph], @@ -477,9 +475,7 @@ InstallMethod(AsBooleanMat, "for a perm", InstallMethod(AsBooleanMat, "for a perm", [IsPerm, IsPosInt], -function(x, n) - return AsBooleanMat(AsTransformation(x), n); -end); +{x, n} -> AsBooleanMat(AsTransformation(x), n)); InstallMethod(AsBooleanMat, "for a partial perm", [IsPartialPerm], @@ -532,10 +528,7 @@ end); InstallMethod(ChooseHashFunction, "for a boolean matrix", [IsBooleanMat, IsInt], - function(x, hashlen) - return rec(func := SEMIGROUPS.HashFunctionBooleanMat, - data := hashlen); -end); +{_, hashlen} -> rec(func := SEMIGROUPS.HashFunctionBooleanMat, data := hashlen)); InstallMethod(CanonicalBooleanMat, "for boolean mat", [IsBooleanMat], @@ -716,10 +709,7 @@ function(x) end); InstallMethod(IsOntoBooleanMat, "for a boolean matrix", -[IsBooleanMat], -function(x) - return IsTotalBooleanMat(TransposedMat(x)); -end); +[IsBooleanMat], x -> IsTotalBooleanMat(TransposedMat(x))); InstallMethod(IsTransformationBooleanMat, "for a boolean matrix", [IsBooleanMat], diff --git a/gap/elements/ffmat.gi b/gap/elements/ffmat.gi index 24f8733d8..9cce0db61 100644 --- a/gap/elements/ffmat.gi +++ b/gap/elements/ffmat.gi @@ -104,9 +104,7 @@ end); InstallMethod(RandomMatrixOp, "for a finite field, dimension, and pos int", [IsField and IsFinite, IsPosInt, IsPosInt], -function(R, n, rank) - return RandomMatrixOp(R, n, [rank]); -end); +{R, n, rank} -> RandomMatrixOp(R, n, [rank])); ############################################################################# # 2. Rows bases etc @@ -115,7 +113,7 @@ end); InstallMethod(NewRowBasisOverFiniteField, "for IsPlistRowBasisOverFiniteFieldRep, a ring, and a list", [IsPlistRowBasisOverFiniteFieldRep, IsRing, IsList], -function(filter, basedomain, l) +function(_, basedomain, l) local b; b := Objectify(PlistRowBasisOverFiniteFieldType, rec(rows := l)); SetBaseDomain(b, basedomain); @@ -124,22 +122,15 @@ end); InstallMethod(Rank, "for a plist rowbasis", [IsPlistRowBasisOverFiniteFieldRep], -function(v) - return Length(v!.rows); -end); +v -> Length(v!.rows)); InstallMethod(\=, "for an rowbasis", [IsPlistRowBasisOverFiniteFieldRep, IsPlistRowBasisOverFiniteFieldRep], -function(x, y) - return BaseDomain(x) = BaseDomain(y) and x!.rows = y!.rows; -end); +{x, y} -> BaseDomain(x) = BaseDomain(y) and x!.rows = y!.rows); InstallMethod(\<, "for an rowbasis", [IsPlistRowBasisOverFiniteFieldRep, IsPlistRowBasisOverFiniteFieldRep], -function(x, y) - return Rank(x) < Rank(y) - or (Rank(x) = Rank(y) and (x!.rows < y!.rows)); -end); +{x, y} -> Rank(x) < Rank(y) or (Rank(x) = Rank(y) and (x!.rows < y!.rows))); InstallMethod(ViewString, "for a plist rowbasis", [IsPlistRowBasisOverFiniteFieldRep], diff --git a/gap/elements/maxplusmat.gi b/gap/elements/maxplusmat.gi index 6f1832635..58da95e61 100644 --- a/gap/elements/maxplusmat.gi +++ b/gap/elements/maxplusmat.gi @@ -86,9 +86,7 @@ InstallMethod(SEMIGROUPS_TypeOfMatrixOverSemiringCons, "for IsMaxPlusMatrix", InstallMethod(SEMIGROUPS_MatrixOverSemiringEntryCheckerCons, "for IsMaxPlusMatrix", [IsMaxPlusMatrix], -function(filter) - return x -> IsInt(x) or x = -infinity; -end); +{_} -> x -> IsInt(x) or x = -infinity); InstallMethod(\*, "for max-plus matrices", [IsMaxPlusMatrix, IsMaxPlusMatrix], function(x, y) @@ -125,30 +123,23 @@ end); InstallMethod(AsMatrix, "for IsMaxPlusMatrix and a tropical max-plus matrix", [IsMaxPlusMatrix, IsTropicalMaxPlusMatrix], -function(filter, mat) - return MatrixNC(filter, AsList(mat)); -end); +{filter, mat} -> MatrixNC(filter, AsList(mat))); InstallMethod(AsMatrix, "for IsMaxPlusMatrix and a projective max-plus matrix", [IsMaxPlusMatrix, IsProjectiveMaxPlusMatrix], -function(filter, mat) - return MatrixNC(filter, AsList(mat)); -end); +{filter, mat} -> MatrixNC(filter, AsList(mat))); InstallMethod(AsMatrix, "for IsMaxPlusMatrix, transformation", [IsMaxPlusMatrix, IsTransformation], -function(filter, x) - return AsMatrix(filter, x, DegreeOfTransformation(x)); -end); +{filter, x} -> AsMatrix(filter, x, DegreeOfTransformation(x))); InstallMethod(AsMatrix, "for IsMaxPlusMatrix, transformation, pos int", [IsMaxPlusMatrix, IsTransformation, IsPosInt], -function(filter, x, dim) - return MatrixNC(filter, SEMIGROUPS.MatrixTrans(x, dim, -infinity, 0)); -end); +{filter, x, dim} +-> MatrixNC(filter, SEMIGROUPS.MatrixTrans(x, dim, -infinity, 0))); ## Method based on theorem 2, page 19, of: ## K.G. Farlow, Max-plus Algebra, Thesis. @@ -185,7 +176,7 @@ InstallMethod(SpectralRadius, "for a max-plus matrix", [IsMaxPlusMatrix], function(mat) local dim, cm, mk, k, max; # Check for -infinity case - if DigraphAllSimpleCircuits(UnweightedPrecedenceDigraph(mat)) = [] then + if IsEmpty(DigraphAllSimpleCircuits(UnweightedPrecedenceDigraph(mat))) then return -infinity; fi; # Calculate the maximum cycle mean. @@ -278,9 +269,7 @@ InstallMethod(SEMIGROUPS_TypeOfMatrixOverSemiringCons, "for IsMinPlusMatrix", InstallMethod(SEMIGROUPS_MatrixOverSemiringEntryCheckerCons, "for IsMinPlusMatrix", [IsMinPlusMatrix], -function(filter) - return x -> IsInt(x) or x = infinity; -end); +{filter} -> x -> IsInt(x) or x = infinity); InstallMethod(\*, "for min-plus matrices", [IsMinPlusMatrix, IsMinPlusMatrix], function(x, y) @@ -317,23 +306,18 @@ end); InstallMethod(AsMatrix, "for IsMinPlusMatrix and a tropical min-plus matrix", [IsMinPlusMatrix, IsTropicalMinPlusMatrix], -function(filter, mat) - return MatrixNC(filter, AsList(mat)); -end); +{filter, mat} -> MatrixNC(filter, AsList(mat))); InstallMethod(AsMatrix, "for IsMinPlusMatrix, transformation", [IsMinPlusMatrix, IsTransformation], -function(filter, x) - return AsMatrix(filter, x, DegreeOfTransformation(x)); -end); +{filter, x} -> AsMatrix(filter, x, DegreeOfTransformation(x))); InstallMethod(AsMatrix, "for IsMinPlusMatrix, transformation, pos int", [IsMinPlusMatrix, IsTransformation, IsPosInt], -function(filter, x, dim) - return MatrixNC(filter, SEMIGROUPS.MatrixTrans(x, dim, infinity, 0)); -end); +{filter, x, dim} +-> MatrixNC(filter, SEMIGROUPS.MatrixTrans(x, dim, infinity, 0))); ############################################################################# ## 3. Tropical matrices @@ -361,9 +345,8 @@ InstallMethod(SEMIGROUPS_TypeOfMatrixOverSemiringCons, InstallMethod(SEMIGROUPS_MatrixOverSemiringEntryCheckerCons, "for IsTropicalMaxPlusMatrix and pos int", [IsTropicalMaxPlusMatrix, IsPosInt], -function(filter, threshold) - return x -> (IsInt(x) and x >= 0 and x <= threshold) or x = -infinity; -end); +{filter, threshold} +-> x -> (IsInt(x) and x >= 0 and x <= threshold) or x = -infinity); InstallMethod(\*, "for tropical max-plus matrices", [IsTropicalMaxPlusMatrix, IsTropicalMaxPlusMatrix], @@ -437,9 +420,8 @@ end); InstallMethod(AsMatrix, "for IsTropicalMaxPlusMatrix, transformation, IsPosInt", [IsTropicalMaxPlusMatrix, IsTransformation, IsPosInt], -function(filter, x, threshold) - return AsMatrix(filter, x, DegreeOfTransformation(x), threshold); -end); +{filter, x, threshold} +-> AsMatrix(filter, x, DegreeOfTransformation(x), threshold)); InstallMethod(AsMatrix, "for IsTropicalMaxPlusMatrix, transformation, pos int, pos int", @@ -470,9 +452,8 @@ InstallMethod(SEMIGROUPS_TypeOfMatrixOverSemiringCons, InstallMethod(SEMIGROUPS_MatrixOverSemiringEntryCheckerCons, "for IsTropicalMinPlusMatrix and pos int", [IsTropicalMinPlusMatrix, IsPosInt], -function(filter, threshold) - return x -> (IsInt(x) and x >= 0 and x <= threshold) or x = infinity; -end); +{filter, threshold} +-> x -> (IsInt(x) and x >= 0 and x <= threshold) or x = infinity); InstallMethod(\*, "for tropical min-plus matrices", [IsTropicalMinPlusMatrix, IsTropicalMinPlusMatrix], @@ -539,9 +520,8 @@ end); InstallMethod(AsMatrix, "for IsTropicalMinPlusMatrix, transformation, IsPosInt", [IsTropicalMinPlusMatrix, IsTransformation, IsPosInt], -function(filter, x, threshold) - return AsMatrix(filter, x, DegreeOfTransformation(x), threshold); -end); +{filter, x, threshold} +-> AsMatrix(filter, x, DegreeOfTransformation(x), threshold)); InstallMethod(AsMatrix, "for IsTropicalMinPlusMatrix, transformation, pos int, pos int", @@ -572,9 +552,7 @@ InstallMethod(SEMIGROUPS_TypeOfMatrixOverSemiringCons, InstallMethod(SEMIGROUPS_MatrixOverSemiringEntryCheckerCons, "for IsProjectiveMaxPlusMatrix", [IsProjectiveMaxPlusMatrix], -function(filter) - return x -> IsInt(x) or x = -infinity; -end); +{filter} -> x -> IsInt(x) or x = -infinity); InstallMethod(\*, "for projective max-plus matrices", [IsProjectiveMaxPlusMatrix, IsProjectiveMaxPlusMatrix], @@ -623,30 +601,23 @@ end); InstallMethod(AsMatrix, "for IsProjectiveMaxPlusMatrix, max-plus matrix", [IsProjectiveMaxPlusMatrix, IsMaxPlusMatrix], -function(filter, mat) - return MatrixNC(filter, AsList(mat)); -end); +{filter, mat} -> MatrixNC(filter, AsList(mat))); InstallMethod(AsMatrix, "for IsProjectiveMaxPlusMatrix, tropical max-plus matrix", [IsProjectiveMaxPlusMatrix, IsTropicalMaxPlusMatrix], -function(filter, mat) - return MatrixNC(filter, AsList(mat)); -end); +{filter, mat} -> MatrixNC(filter, AsList(mat))); InstallMethod(AsMatrix, "for IsProjectiveMaxPlusMatrix, transformation", [IsProjectiveMaxPlusMatrix, IsTransformation], -function(filter, x) - return AsMatrix(filter, x, DegreeOfTransformation(x)); -end); +{filter, x} -> AsMatrix(filter, x, DegreeOfTransformation(x))); InstallMethod(AsMatrix, "for IsProjectiveMaxPlusMatrix, transformation, pos int", [IsProjectiveMaxPlusMatrix, IsTransformation, IsPosInt], -function(filter, x, dim) - return MatrixNC(filter, SEMIGROUPS.MatrixTrans(x, dim, -infinity, 0)); -end); +{filter, x, dim} +-> MatrixNC(filter, SEMIGROUPS.MatrixTrans(x, dim, -infinity, 0))); ############################################################################# ## 7. NTP matrices @@ -671,7 +642,7 @@ InstallMethod(SEMIGROUPS_TypeOfMatrixOverSemiringCons, "for IsNTPMatrix", InstallMethod(SEMIGROUPS_MatrixOverSemiringEntryCheckerCons, "for IsNTPMatrix, pos int, pos int", [IsNTPMatrix, IsInt, IsInt], -function(filter, threshold, period) +function(_, threshold, period) if threshold < 0 then ErrorNoReturn("the 2nd argument (a pos. int.) is not >= 0"); elif period <= 0 then @@ -747,9 +718,8 @@ end); InstallMethod(AsMatrix, "for IsNTPMatrix, transformation, pos int, pos int", [IsNTPMatrix, IsTransformation, IsPosInt, IsPosInt], -function(filter, x, threshold, period) - return AsMatrix(filter, x, DegreeOfTransformation(x), threshold, period); -end); +{filter, x, threshold, period} +-> AsMatrix(filter, x, DegreeOfTransformation(x), threshold, period)); InstallMethod(AsMatrix, "for IsNTPMatrix, transformation, pos int, pos int, pos int", @@ -786,9 +756,7 @@ end); InstallMethod(RandomMatrixOp, "for Integers and pos int", [IsIntegers, IsPosInt], -function(semiring, n) - return Matrix(semiring, SEMIGROUPS.RandomIntegerMatrix(n, false)); -end); +{semiring, n} -> Matrix(semiring, SEMIGROUPS.RandomIntegerMatrix(n, false))); # TODO(MatrixObj-later) this method should be in the GAP library InstallMethod(Order, "for an integer matrix obj", @@ -812,9 +780,7 @@ end); InstallMethod(Matrix, "for Integers and transformation", [IsIntegers, IsTransformation], -function(semiring, x) - return Matrix(semiring, x, DegreeOfTransformation(x)); -end); +{semiring, x} -> Matrix(semiring, x, DegreeOfTransformation(x))); InstallMethod(Matrix, "for Integers, transformation, pos int", diff --git a/gap/elements/pbr.gi b/gap/elements/pbr.gi index 7172b566e..367fff103 100644 --- a/gap/elements/pbr.gi +++ b/gap/elements/pbr.gi @@ -99,7 +99,7 @@ end); InstallMethod(InverseMonoidByGenerators, [IsPBRCollection], -function(coll) +function(_) ErrorNoReturn("not yet implemented"); end); @@ -146,9 +146,7 @@ end); InstallMethod(IsBipartitionPBR, "for a pbr", [IsPBR], -function(x) - return IsEquivalenceBooleanMat(AsBooleanMat(x)); -end); +x -> IsEquivalenceBooleanMat(AsBooleanMat(x))); InstallMethod(IsTransformationPBR, "for a pbr", [IsPBR], @@ -173,39 +171,27 @@ end); InstallMethod(IsBlockBijectionPBR, "for a pbr", [IsPBR], -function(x) - return IsBipartitionPBR(x) and IsBlockBijection(AsBipartition(x)); -end); +x -> IsBipartitionPBR(x) and IsBlockBijection(AsBipartition(x))); InstallMethod(IsPartialPermPBR, "for a pbr", [IsPBR], -function(x) - return IsBipartitionPBR(x) and IsPartialPermBipartition(AsBipartition(x)); -end); +x -> IsBipartitionPBR(x) and IsPartialPermBipartition(AsBipartition(x))); InstallMethod(IsPermPBR, "for a pbr", [IsPBR], -function(x) - return IsBipartitionPBR(x) and IsPermBipartition(AsBipartition(x)); -end); +x -> IsBipartitionPBR(x) and IsPermBipartition(AsBipartition(x))); InstallMethod(IsDualTransformationPBR, "for a pbr", [IsPBR], -function(x) - return IsBipartitionPBR(x) and IsDualTransBipartition(AsBipartition(x)); -end); +x -> IsBipartitionPBR(x) and IsDualTransBipartition(AsBipartition(x))); InstallMethod(NumberPBR, "for a pbr", [IsPBR], -function(x) - return NumberBooleanMat(AsBooleanMat(x)); -end); +x -> NumberBooleanMat(AsBooleanMat(x))); InstallMethod(PBRNumber, "for pos int and pos int", [IsPosInt, IsPosInt], -function(nr, deg) - return AsPBR(BooleanMatNumber(nr, 2 * deg)); -end); +{nr, deg} -> AsPBR(BooleanMatNumber(nr, 2 * deg))); InstallMethod(IsEmptyPBR, "for a partition binary relation", [IsPBR], @@ -273,11 +259,8 @@ function(x, deg) return PBR(left, right); end); -InstallMethod(AsPBR, "for a partial perm", -[IsPartialPerm], -function(x) - return AsPBR(x, Maximum(DegreeOfPartialPerm(x), CoDegreeOfPartialPerm(x))); -end); +InstallMethod(AsPBR, "for a partial perm", [IsPartialPerm], +x -> AsPBR(x, Maximum(DegreeOfPartialPerm(x), CoDegreeOfPartialPerm(x)))); InstallMethod(AsPBR, "for a transformation and pos int", [IsTransformation, IsPosInt], @@ -295,21 +278,14 @@ function(x, deg) return PBR(left, right); end); -InstallMethod(AsPBR, "for a transformation", -[IsTransformation], -function(x) - return AsPBR(x, DegreeOfTransformation(x)); -end); +InstallMethod(AsPBR, "for a transformation", [IsTransformation], +x -> AsPBR(x, DegreeOfTransformation(x))); InstallMethod(AsPBR, "for a multiplicative element", [IsMultiplicativeElement], x -> AsPBR(AsBipartition(x))); -InstallMethod(AsPBR, -"for a multiplicative element and pos int", -[IsMultiplicativeElement, IsPosInt], -function(x, n) - return AsPBR(AsBipartition(x, n)); -end); +InstallMethod(AsPBR, "for a multiplicative element and pos int", +[IsMultiplicativeElement, IsPosInt], {x, n} -> AsPBR(AsBipartition(x, n))); # TODO(later) The following doesn't define a monoid embedding of P_n into # PBR_n. What is a monoid embedding from P_n to PBR_n? @@ -512,7 +488,7 @@ function(left, right) end); InstallGlobalFunction(PBRNC, -function(arg) +function(arg...) local left, right, n, i, j; arg := StructuralCopy(arg); diff --git a/gap/elements/pperm.gi b/gap/elements/pperm.gi index 3a9ee6347..f1b8715d6 100644 --- a/gap/elements/pperm.gi +++ b/gap/elements/pperm.gi @@ -11,6 +11,4 @@ InstallMethod(IndexPeriodOfSemigroupElement, "for a partial perm", [IsPartialPerm], IndexPeriodOfPartialPerm); InstallMethod(CyclesOfPartialPerm, "for a partial perm", [IsPartialPerm], -function(f) - return DigraphAllSimpleCircuits(AsDigraph(f)); -end); +f -> DigraphAllSimpleCircuits(AsDigraph(f))); diff --git a/gap/elements/semiringmat.gi b/gap/elements/semiringmat.gi index 77d6e5085..b556e5da5 100644 --- a/gap/elements/semiringmat.gi +++ b/gap/elements/semiringmat.gi @@ -165,9 +165,7 @@ end); InstallMethod(MatrixNC, "for a filter and list", [IsOperation, IsList], -function(filter, mat) - return MatrixNC(SEMIGROUPS_TypeOfMatrixOverSemiringCons(filter), mat); -end); +{filter, mat} -> MatrixNC(SEMIGROUPS_TypeOfMatrixOverSemiringCons(filter), mat)); InstallMethod(MatrixNC, "for a filter, list, function", [IsOperation, IsList, IsFunction], @@ -372,9 +370,7 @@ function(mat) return false; end; - iter.ShallowCopy := function(iter) - return rec(pos := 0); - end; + iter.ShallowCopy := iter -> rec(pos := 0); return IteratorByFunctions(iter); end); @@ -405,9 +401,7 @@ end); InstallMethod(IsBound\[\], "for a plist matrix over semiring positional rep and pos int", [IsPlistMatrixOverSemiringPositionalRep, IsPosInt], -function(mat, pos) - return IsBound(mat![pos]) and pos <= Length(mat![1]); -end); +{mat, pos} -> IsBound(mat![pos]) and pos <= Length(mat![1])); InstallMethod(TransposedMatImmutable, "for a matrix over semiring", [IsPlistMatrixOverSemiringPositionalRep], @@ -442,16 +436,10 @@ function(coll) end); InstallMethod(InverseMutable, "for a matrix over semiring", -[IsMatrixOverSemiring], -function(mat) - return fail; -end); +[IsMatrixOverSemiring], ReturnFail); InstallMethod(InverseImmutable, "for a matrix over semiring", -[IsMatrixOverSemiring], -function(mat) - return fail; -end); +[IsMatrixOverSemiring], ReturnFail); InstallMethod(IsGeneratorsOfInverseSemigroup, "for a matrix over semiring coll", @@ -670,7 +658,7 @@ InstallMethod(\=, "for matrices over a semiring", IsPlistMatrixOverSemiringPositionalRep], function(x, y) local n, i; - if not SEMIGROUPS_FilterOfMatrixOverSemiring(x) = + if SEMIGROUPS_FilterOfMatrixOverSemiring(x) <> SEMIGROUPS_FilterOfMatrixOverSemiring(y) then return false; fi; @@ -722,7 +710,7 @@ end); InstallMethod(ChooseHashFunction, "for a matrix over semiring", [IsMatrixOverSemiring, IsInt], - function(x, hashlen) + function(_, hashlen) return rec(func := SEMIGROUPS.HashFunctionMatrixOverSemiring, data := hashlen); end); diff --git a/gap/elements/star.gi b/gap/elements/star.gi index 485b814a3..85bab1af4 100644 --- a/gap/elements/star.gi +++ b/gap/elements/star.gi @@ -18,6 +18,4 @@ end); InstallMethod(IsStarSemigroup, "for a semigroup of elements with star", [IsSemigroup and IsAssociativeElementWithStarCollection], -function(S) - return ForAll(GeneratorsOfSemigroup(S), x -> Star(x) in S); -end); +S -> ForAll(GeneratorsOfSemigroup(S), x -> Star(x) in S)); diff --git a/gap/elements/trans.gi b/gap/elements/trans.gi index f12158aea..296fb2830 100644 --- a/gap/elements/trans.gi +++ b/gap/elements/trans.gi @@ -8,10 +8,7 @@ ############################################################################# InstallMethod(CanonicalTransformation, "for a transformation", -[IsTransformation], -function(f) - return CanonicalTransformation(f, DegreeOfTransformation(f)); -end); +[IsTransformation], f -> CanonicalTransformation(f, DegreeOfTransformation(f))); InstallMethod(CanonicalTransformation, "for a transformation", [IsTransformation, IsInt], diff --git a/gap/fp/freeband.gi b/gap/fp/freeband.gi index ebe0e5f70..b47de2793 100644 --- a/gap/fp/freeband.gi +++ b/gap/fp/freeband.gi @@ -14,9 +14,7 @@ InstallMethod(ContentOfFreeBandElement, "for a free band element", [IsFreeBandElement], -function(w) - return ListBlist([1 .. Length(w!.cont)], w!.cont); -end); +w -> ListBlist([1 .. Length(w!.cont)], w!.cont)); InstallMethod(ContentOfFreeBandElementCollection, "for a free band element collection", @@ -86,7 +84,7 @@ InstallMethod(IsGeneratorsOfInverseSemigroup, "for a free band element coll", InstallTrueMethod(IsFinite, IsFreeBandSubsemigroup); InstallGlobalFunction(FreeBand, -function(arg) +function(arg...) local names, F, type, ngens, gens, filts, S, m; # Get and check the argument list, and construct names if necessary. @@ -369,9 +367,7 @@ end); InstallMethod(EqualInFreeBand, "for two lists of positive integers", [IsHomogeneousList, IsHomogeneousList], -function(w1_in, w2_in) - return libsemigroups.freeband_equal_to(w1_in, w2_in); -end); +{w1_in, w2_in} -> libsemigroups.freeband_equal_to(w1_in, w2_in)); # TODO(later) Is there a more efficient way to compare elements? JJ @@ -500,7 +496,7 @@ end); InstallMethod(ChooseHashFunction, "for a free band element and int", [IsFreeBandElement, IsInt], -function(x, hashlen) +function(_, hashlen) return rec(func := SEMIGROUPS.HashFunctionForFreeBandElements, data := hashlen); end); diff --git a/gap/fp/freeinverse.gi b/gap/fp/freeinverse.gi index 1050439af..7872d45e1 100644 --- a/gap/fp/freeinverse.gi +++ b/gap/fp/freeinverse.gi @@ -39,7 +39,7 @@ InstallImmediateMethod(IsFinite, IsFreeInverseSemigroup, 0, ReturnFalse); ## InstallGlobalFunction(FreeInverseSemigroup, -function(arg) +function(arg...) local names, F, type, gens, opts, S, m; # Get and check the argument list, and construct names if necessary. @@ -102,7 +102,7 @@ function(arg) F!.semigroup := S; SetIsWholeFamily(S, true); - SetIsTrivial(S, Length(names) = 0); + SetIsTrivial(S, IsEmpty(names)); return S; end); @@ -148,18 +148,20 @@ end); ## MinimalWord ## +SEMIGROUPS.InvertGenerator := function(n) + if n mod 2 = 0 then + return n - 1; + fi; + return n + 1; +end; + InstallMethod(MinimalWord, "for a free inverse semigroup element", [IsFreeInverseSemigroupElement], function(x) local InvertGenerator, is_a_child_of, gen, stop_start, i, j, path, words, pos, part, temp_word, out, names; - InvertGenerator := function(n) - if n mod 2 = 0 then - return n - 1; - fi; - return n + 1; - end; + InvertGenerator := SEMIGROUPS.InvertGenerator; is_a_child_of := x![4]; gen := x![5]; @@ -216,9 +218,9 @@ function(x) fi; od; - out := Concatenation (out); - if out[Length(out)] = '*' then - Unbind(out[Length(out)]); + out := Concatenation(out); + if Last(out) = '*' then + Remove(out); fi; return out; @@ -233,15 +235,10 @@ end); InstallMethod(CanonicalForm, "for a free inverse semigroup element", [IsFreeInverseSemigroupElement], function(tree) - local InvertGenerator, children, fork, tail, maxleftreducedpath, + local InvertGenerator, children, fork, maxleftreducedpath, maxleftreduced, groupelem, i, mlr, output, pivot; - InvertGenerator := function(n) - if n mod 2 = 0 then - return n - 1; - fi; - return n + 1; - end; + InvertGenerator := SEMIGROUPS.InvertGenerator; children := function(n) local list, i; @@ -265,13 +262,11 @@ function(tree) return result; end; - tail := list -> list[Length(list)]; - maxleftreducedpath := fork([], children(1)); for pivot in maxleftreducedpath do - while children(tail(pivot)) <> [] do - maxleftreducedpath := fork(pivot, children(tail(pivot))); - Add(pivot, tail(children(tail(pivot)))); + while children(Last(pivot)) <> [] do + maxleftreducedpath := fork(pivot, children(Last(pivot))); + Add(pivot, Last(children(Last(pivot)))); od; od; @@ -332,9 +327,7 @@ end); InstallMethod(\<, "for elements of a free inverse semigroup", IsIdenticalObj, [IsFreeInverseSemigroupElement, IsFreeInverseSemigroupElement], -function(tree1, tree2) - return CanonicalForm(tree1) < CanonicalForm(tree2); -end); +{tree1, tree2} -> CanonicalForm(tree1) < CanonicalForm(tree2)); InstallMethod(ChooseHashFunction, "for a free inverse semigroup element", [IsFreeInverseSemigroupElement, IsInt], @@ -357,12 +350,7 @@ IsIdenticalObj, function(tree1, tree2) local new_names, product, i, parent, InvertGenerator; - InvertGenerator := function(n) - if n mod 2 = 0 then - return n - 1; - fi; - return n + 1; - end; + InvertGenerator := SEMIGROUPS.InvertGenerator; new_names := []; new_names[1] := tree1![3]; diff --git a/gap/fp/tietze.gi b/gap/fp/tietze.gi index e04a13dac..eb48b409d 100644 --- a/gap/fp/tietze.gi +++ b/gap/fp/tietze.gi @@ -36,7 +36,7 @@ function(S) rels := List(RelationsOfFpSemigroup(S), x -> [LetterRepAssocWord(x[1]), LetterRepAssocWord(x[2])]); - gens := List(GeneratorsOfSemigroup(S), x -> ViewString(x)); + gens := List(GeneratorsOfSemigroup(S), ViewString); out := rec(GeneratorsOfStzPresentation := gens, RelationsOfStzPresentation := rels, @@ -208,7 +208,7 @@ function(stz, list) local i; # This function displays the current relations in terms of the current # generators for a semigroup Tietze presentation. - if RelationsOfStzPresentation(stz) = [] then + if IsEmpty(RelationsOfStzPresentation(stz)) then Info(InfoFpSemigroup, 1, "There are no relations in the presentation "); fi; @@ -242,7 +242,7 @@ function(stz, list) # of each # warn if there are no generators in the list (not sure this could happen) - if GeneratorsOfStzPresentation(stz) = [] then + if IsEmpty(GeneratorsOfStzPresentation(stz)) then Info(InfoFpSemigroup, 1, "There are no generators in the presentation "); fi; @@ -567,7 +567,7 @@ function(stz, pair) if not IsList(word) then TryNextMethod(); # pass this on to the case where the list may be a pair # of words in OG semigroup - elif Length(word) = 0 then + elif IsEmpty(word) then ErrorNoReturn("StzAddRelation: words in second argument should\n", "be non-empty"); else @@ -649,7 +649,7 @@ function(stz, pair) if not IsList(word) then TryNextMethod(); # pass this on to the case where the list may be a pair # of words in OG semigroup - elif Length(word) = 0 then + elif IsEmpty(word) then ErrorNoReturn("StzAddRelationNC: words in second argument \n", "should be non-empty"); else @@ -770,7 +770,7 @@ InstallMethod(StzAddGenerator, function(stz, word) local n, letter; # argument checks - if Length(word) = 0 then + if IsEmpty(word) then ErrorNoReturn("StzAddGenerator: cannot add generator equal to the empty\n", "word"); fi; @@ -817,7 +817,7 @@ InstallMethod(StzAddGenerator, function(stz, word, name) local n, letter; # argument check 0: new word is non-empty - if Length(word) = 0 then + if IsEmpty(word) then ErrorNoReturn("StzAddGenerator: cannot add generator equal to the empty\n", "word"); fi; @@ -946,10 +946,10 @@ function(stz, gen, index) fi; # third argument check: a reasonable relation number has been supplied - if not ((RelationsOfStzPresentation(stz)[index][1] = [gen] - and not gen in RelationsOfStzPresentation(stz)[index][2]) or - (RelationsOfStzPresentation(stz)[index][2] = [gen] - and not gen in RelationsOfStzPresentation(stz)[index][1])) then + if (RelationsOfStzPresentation(stz)[index][1] <> [gen] + or gen in RelationsOfStzPresentation(stz)[index][2]) + and (RelationsOfStzPresentation(stz)[index][2] <> [gen] + or gen in RelationsOfStzPresentation(stz)[index][1]) then ErrorNoReturn("StzRemoveGenerator: third argument does not point\n", "to a relation expressing second argument as a\n", "combination of other generators in first argument "); @@ -1083,7 +1083,7 @@ SEMIGROUPS.NewGeneratorName := function(names_immut) Alph := "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; # SPECIAL CASE 0: empty list - if Length(names) = 0 then + if IsEmpty(names) then return "a"; fi; @@ -1511,7 +1511,7 @@ InstallMethod(StzSimplifyOnce, function(stz) local rels, results, len, mins, result, func, args; rels := RelationsOfStzPresentation(stz); - if Length(rels) = 0 then + if IsEmpty(rels) then return false; else results := [[SEMIGROUPS.StzGensRedundantApply, diff --git a/gap/fp/word.gi b/gap/fp/word.gi index 586fe88f5..21e23b23a 100644 --- a/gap/fp/word.gi +++ b/gap/fp/word.gi @@ -11,14 +11,14 @@ InstallMethod(WordToString, "for a string and a homogeneous list", [IsString, IsHomogeneousList], function(alphabet, word) - if Length(word) = 0 then + if IsEmpty(word) then return ""; elif not ForAll(word, IsPosInt) then ErrorNoReturn("expected list of positive integers as 2nd argument"); elif Maximum(word) > Length(alphabet) then ErrorNoReturn("the 1st argument (a string) is too short, ", "expected at least ", Maximum(word), - "but found ", Length(alphabet)); + " but found ", Length(alphabet)); fi; return List(word, i -> alphabet[i]); end); @@ -42,7 +42,7 @@ InstallMethod(StandardiseWord, "for a homogeneous list", function(word) local distinct_chars, lookup, i; - if Length(word) = 0 then + if IsEmpty(word) then return word; elif not ForAll(word, IsPosInt) then ErrorNoReturn("expected a list of positive integers as 2nd argument"); diff --git a/gap/greens/acting-inverse.gi b/gap/greens/acting-inverse.gi index 2c31d157e..c5097aad8 100644 --- a/gap/greens/acting-inverse.gi +++ b/gap/greens/acting-inverse.gi @@ -350,15 +350,14 @@ end); InstallMethod(RClassReps, "for an acting inverse semigroup rep", [IsInverseActingSemigroupRep], -S -> List(LClassReps(S), x -> Inverse(x))); +S -> List(LClassReps(S), Inverse)); # same method for inverse ideals InstallMethod(RClassReps, "for a D-class of an inverse acting semigroup rep", -[IsInverseActingRepGreensClass - and IsGreensDClass], -D -> List(LClassReps(D), x -> Inverse(x))); +[IsInverseActingRepGreensClass and IsGreensDClass], +D -> List(LClassReps(D), Inverse)); # same method for inverse ideals @@ -444,9 +443,7 @@ InstallMethod(NrHClasses, InstallMethod(NrHClasses, "for an acting inverse semigroup rep", [IsInverseActingSemigroupRep], -function(S) - return Sum(List(OrbSCC(Enumerate(LambdaOrb(S))), x -> Length(x) ^ 2)) - 1; -end); +S -> Sum(List(OrbSCC(Enumerate(LambdaOrb(S))), x -> Length(x) ^ 2)) - 1); # same method for inverse ideals diff --git a/gap/greens/acting-regular.gi b/gap/greens/acting-regular.gi index e401d0be0..4e3e45a42 100644 --- a/gap/greens/acting-regular.gi +++ b/gap/greens/acting-regular.gi @@ -456,7 +456,7 @@ function(S) o := Enumerate(RhoOrb(S)); # TODO(later): shouldn't o be stored in iter!? - func := function(iter, i) + func := function(_, i) # has rho val corresponding to # has lambda val in position 1 of GradedLambdaOrb(S, rep, false). # We don't rectify the lambda val of in since we require to @@ -484,7 +484,7 @@ function(S) scc := OrbSCC(o); # TODO(later): shouldn't o and scc be stored in iter!? - func := function(iter, m) + func := function(_, m) # has rectified lambda val and rho val! return ConvertToExternalElement(S, EvaluateWord(o, TraceSchreierTreeForward(o, scc[m][1]))); diff --git a/gap/greens/acting.gi b/gap/greens/acting.gi index 01d2490d8..deb9ef4f5 100644 --- a/gap/greens/acting.gi +++ b/gap/greens/acting.gi @@ -124,25 +124,25 @@ end; # same method for regular/inverse -SEMIGROUPS.CreateDClass := function(arg) +SEMIGROUPS.CreateDClass := function(arg...) return SEMIGROUPS.CreateXClass(arg, DClassType, GreensDRelation); end; # same method for regular/inverse -SEMIGROUPS.CreateRClass := function(arg) +SEMIGROUPS.CreateRClass := function(arg...) return SEMIGROUPS.CreateXClass(arg, RClassType, GreensRRelation); end; # same method for regular/inverse -SEMIGROUPS.CreateLClass := function(arg) +SEMIGROUPS.CreateLClass := function(arg...) return SEMIGROUPS.CreateXClass(arg, LClassType, GreensLRelation); end; # same method for regular/inverse -SEMIGROUPS.CreateHClass := function(arg) +SEMIGROUPS.CreateHClass := function(arg...) return SEMIGROUPS.CreateXClass(arg, HClassType, GreensHRelation); end; @@ -482,9 +482,7 @@ end); InstallMethod(SemigroupDataIndex, "for an acting semigroup Green's class", [IsActingSemigroupGreensClass], -function(C) - return Position(SemigroupData(Parent(C)), Representative(C)); -end); +C -> Position(SemigroupData(Parent(C)), Representative(C))); # different method for regular/inverse/ideals @@ -770,9 +768,7 @@ end); InstallMethod(GreensDClassOfElementNC, "for an acting semigroup and element", [IsActingSemigroup, IsMultiplicativeElement], -function(S, x) - return GreensDClassOfElementNC(S, x, true); -end); +{S, x} -> GreensDClassOfElementNC(S, x, true)); # same method for regular/ideals, different method for inverse @@ -805,9 +801,7 @@ end); InstallMethod(GreensLClassOfElementNC, "for an acting semigroup and element", [IsActingSemigroup, IsMultiplicativeElement], -function(S, x) - return GreensLClassOfElementNC(S, x, true); -end); +{S, x} -> GreensLClassOfElementNC(S, x, true)); # same method for regular/ideals, different method for inverse @@ -839,9 +833,7 @@ end); InstallMethod(GreensLClassOfElementNC, "for D-class and multiplicative element", [IsGreensDClass and IsActingSemigroupGreensClass, IsMultiplicativeElement], -function(D, x) - return GreensLClassOfElementNC(D, x, true); -end); +{D, x} -> GreensLClassOfElementNC(D, x, true)); # same method for regular/ideals, different method for inverse @@ -881,9 +873,7 @@ end); InstallMethod(GreensRClassOfElementNC, "for an acting semigroup and element", [IsActingSemigroup, IsMultiplicativeElement], -function(S, x) - return GreensRClassOfElementNC(S, x, true); -end); +{S, x} -> GreensRClassOfElementNC(S, x, true)); # same method for regular/inverse/ideals @@ -915,9 +905,7 @@ end); InstallMethod(GreensRClassOfElementNC, "for D-class and multiplicative element", [IsGreensDClass and IsActingSemigroupGreensClass, IsMultiplicativeElement], -function(D, x) - return GreensRClassOfElementNC(D, x, true); -end); +{D, x} -> GreensRClassOfElementNC(D, x, true)); # same method for regular/inverse/ideals @@ -949,9 +937,7 @@ end); InstallMethod(GreensHClassOfElementNC, "for an acting semigroup and element", [IsActingSemigroup, IsMultiplicativeElement], -function(S, x) - return GreensHClassOfElementNC(S, x, true); -end); +{S, x} -> GreensHClassOfElementNC(S, x, true)); # same method for regular/ideals, different for inverse @@ -982,9 +968,7 @@ end); InstallMethod(GreensHClassOfElementNC, "for a D/H-class and element", [IsActingSemigroupGreensClass and IsGreensClass, IsMultiplicativeElement], -function(C, x) - return GreensHClassOfElementNC(C, x, true); -end); +{C, x} -> GreensHClassOfElementNC(C, x, true)); # same method for regular/ideals, different method for inverse @@ -1622,9 +1606,7 @@ D -> Length(RhoCosets(D)) * Length(RhoOrbSCC(D))); # same method for regular/inverse/ideals InstallMethod(NrHClasses, "for an acting semigroup", [IsActingSemigroup], -function(S) - return Sum(List(GreensDClasses(S), NrHClasses)); -end); +S -> Sum(List(GreensDClasses(S), NrHClasses))); # same method for regular/ideals, different method for inverse @@ -2163,9 +2145,7 @@ function(S) return D; end; - isnew := function(iter, x) - return x = fail or ForAll(iter!.classes, D -> not x in D); - end; + isnew := {iter, x} -> x = fail or ForAll(iter!.classes, D -> not x in D); return WrappedIterator(IteratorOfRClassReps(S), convert, diff --git a/gap/greens/froidure-pin.gi b/gap/greens/froidure-pin.gi index dacfdf2bb..7151d6353 100644 --- a/gap/greens/froidure-pin.gi +++ b/gap/greens/froidure-pin.gi @@ -346,33 +346,25 @@ InstallMethod(EquivalenceClassOfElement, "for a semigroup with CanUseFroidurePin Green's R-relation + a mult. elt.", [IsGreensRRelation and IsGreensRelationOfSemigroupThatCanUseFroidurePinRep, IsMultiplicativeElement], -function(rel, rep) - return SEMIGROUPS.EquivalenceClassOfElement(rel, rep, RClassType); -end); +{rel, rep} -> SEMIGROUPS.EquivalenceClassOfElement(rel, rep, RClassType)); InstallMethod(EquivalenceClassOfElement, "for a semigroup with CanUseFroidurePin Green's L-relation + a mult. elt.", [IsGreensLRelation and IsGreensRelationOfSemigroupThatCanUseFroidurePinRep, IsMultiplicativeElement], -function(rel, rep) - return SEMIGROUPS.EquivalenceClassOfElement(rel, rep, LClassType); -end); +{rel, rep} -> SEMIGROUPS.EquivalenceClassOfElement(rel, rep, LClassType)); InstallMethod(EquivalenceClassOfElement, "for a semigroup with CanUseFroidurePin Green's H-relation + a mult. elt.", [IsGreensHRelation and IsGreensRelationOfSemigroupThatCanUseFroidurePinRep, IsMultiplicativeElement], -function(rel, rep) - return SEMIGROUPS.EquivalenceClassOfElement(rel, rep, HClassType); -end); +{rel, rep} -> SEMIGROUPS.EquivalenceClassOfElement(rel, rep, HClassType)); InstallMethod(EquivalenceClassOfElement, "for a semigroup with CanUseFroidurePin Green's D-relation + a mult. elt.", [IsGreensDRelation and IsGreensRelationOfSemigroupThatCanUseFroidurePinRep, IsMultiplicativeElement], -function(rel, rep) - return SEMIGROUPS.EquivalenceClassOfElement(rel, rep, DClassType); -end); +{rel, rep} -> SEMIGROUPS.EquivalenceClassOfElement(rel, rep, DClassType)); # No check Green's classes of an element of a semigroup . . . diff --git a/gap/greens/generic.gi b/gap/greens/generic.gi index 34154f0bb..1fa6ccd05 100644 --- a/gap/greens/generic.gi +++ b/gap/greens/generic.gi @@ -188,51 +188,37 @@ InstallMethod(GreensJClassOfElementNC, InstallMethod(GreensRClassOfElement, "for a D-class and multiplicative element", [IsGreensDClass, IsMultiplicativeElement], -function(D, x) - return EquivalenceClassOfElement(GreensRRelation(Parent(D)), x); -end); +{D, x} -> EquivalenceClassOfElement(GreensRRelation(Parent(D)), x)); InstallMethod(GreensLClassOfElement, "for a D-class and multiplicative element", [IsGreensDClass, IsMultiplicativeElement], -function(D, x) - return EquivalenceClassOfElement(GreensLRelation(Parent(D)), x); -end); +{D, x} -> EquivalenceClassOfElement(GreensLRelation(Parent(D)), x)); InstallMethod(GreensHClassOfElement, "for a Green's class and multiplicative element", [IsGreensClass, IsMultiplicativeElement], -function(C, x) - return EquivalenceClassOfElement(GreensHRelation(Parent(C)), x); -end); +{C, x} -> EquivalenceClassOfElement(GreensHRelation(Parent(C)), x)); InstallMethod(GreensRClassOfElementNC, "for a finite semigroup and multiplicative element", [IsSemigroup and IsFinite, IsMultiplicativeElement], -function(S, x) - return EquivalenceClassOfElementNC(GreensRRelation(S), x); -end); +{S, x} -> EquivalenceClassOfElementNC(GreensRRelation(S), x)); InstallMethod(GreensLClassOfElementNC, "for a finite semigroup and multiplicative element", [IsSemigroup and IsFinite, IsMultiplicativeElement], -function(S, x) - return EquivalenceClassOfElementNC(GreensLRelation(S), x); -end); +{S, x} -> EquivalenceClassOfElementNC(GreensLRelation(S), x)); InstallMethod(GreensHClassOfElementNC, "for a finite semigroup and multiplicative element", [IsSemigroup and IsFinite, IsMultiplicativeElement], -function(S, x) - return EquivalenceClassOfElementNC(GreensHRelation(S), x); -end); +{S, x} -> EquivalenceClassOfElementNC(GreensHRelation(S), x)); InstallMethod(GreensDClassOfElementNC, "for a finite semigroup and multiplicative element", [IsSemigroup and IsFinite, IsMultiplicativeElement], -function(S, x) - return EquivalenceClassOfElementNC(GreensDRelation(S), x); -end); +{S, x} -> EquivalenceClassOfElementNC(GreensDRelation(S), x)); # Fallback methods @@ -497,7 +483,7 @@ InstallMethod(Idempotents, "for a Green's class", ############################################################################# InstallMethod(IsRegularGreensClass, "for a Green's class", -[IsGreensClass], C -> First(Enumerator(C), x -> IsIdempotent(x)) <> fail); +[IsGreensClass], C -> First(Enumerator(C), IsIdempotent) <> fail); ############################################################################# ## 7. Properties of Green's classes . . . @@ -517,16 +503,10 @@ InstallMethod(IsRTrivial, "for a Green's D-class", ############################################################################# InstallMethod(IteratorOfDClasses, "for a finite semigroup", -[IsSemigroup and IsFinite], -function(S) - return IteratorList(GreensDClasses(S)); -end); +[IsSemigroup and IsFinite], S -> IteratorList(GreensDClasses(S))); InstallMethod(IteratorOfRClasses, "for a finite semigroup", -[IsSemigroup and IsFinite], -function(S) - return IteratorList(GreensRClasses(S)); -end); +[IsSemigroup and IsFinite], S -> IteratorList(GreensRClasses(S))); ############################################################################# ## 9. Viewing, printing, etc . . . diff --git a/gap/ideals/acting.gi b/gap/ideals/acting.gi index d6443934b..7f00ed8b7 100644 --- a/gap/ideals/acting.gi +++ b/gap/ideals/acting.gi @@ -19,9 +19,7 @@ InstallMethod(NrDClasses, "for an inverse acting semigroup ideal rep", [IsInverseActingSemigroupRep and IsSemigroupIdeal], -function(I) - return Length(OrbSCC(LambdaOrb(I))) - 1; -end); +{I} -> Length(OrbSCC(LambdaOrb(I))) - 1); InstallMethod(NrDClasses, "for a regular acting semigroup ideal rep", [IsRegularActingSemigroupRep and IsSemigroupIdeal], @@ -353,9 +351,7 @@ end); InstallMethod(Enumerate, "for semigroup ideal data, limit, looking function", [IsSemigroupIdealData, IsCyclotomic, IsFunction], -function(data, limit, lookfunc) - return Enumerate(data, limit, rec(lookfunc := lookfunc)); -end); +{data, limit, lookfunc} -> Enumerate(data, limit, rec(lookfunc := lookfunc))); # We concentrate on the case when nothing is known about the parent of the # ideal. @@ -755,9 +751,7 @@ function(x, I) fi; # this function checks if has the same lambda-value as x - lookfunc := function(lambdao, pt) - return pt = xx; - end; + lookfunc := {lambdao, pt} -> pt = xx; Enumerate(data, infinity, rec(lambdalookfunc := lookfunc)); l := PositionOfFound(o); @@ -812,9 +806,7 @@ function(x, I) return false; fi; - lookfunc := function(data, x) - return IsBound(lambdarhoht[l]) and IsBound(lambdarhoht[l][m]); - end; + lookfunc := {d, x} -> IsBound(lambdarhoht[l]) and IsBound(lambdarhoht[l][m]); data := Enumerate(data, infinity, lookfunc); if not IsBound(lambdarhoht[l]) or not IsBound(lambdarhoht[l][m]) then return false; diff --git a/gap/ideals/froidure-pin.gi b/gap/ideals/froidure-pin.gi index 7d55cb36e..5a3c59e6a 100644 --- a/gap/ideals/froidure-pin.gi +++ b/gap/ideals/froidure-pin.gi @@ -54,17 +54,13 @@ function(I) en := EnumeratorCanonical(SupersemigroupOfIdeal(I)); record := rec(); - record.NumberElement := function(enum, elt) - return Position(PositionsInSupersemigroup(I), Position(en, elt)); - end; + # TODO store en in enum + record.NumberElement := + {enum, elt} -> Position(PositionsInSupersemigroup(I), Position(en, elt)); - record.ElementNumber := function(enum, nr) - return en[PositionsInSupersemigroup(I)[nr]]; - end; + record.ElementNumber := {enum, nr} -> en[PositionsInSupersemigroup(I)[nr]]; - record.IsBound\[\] := function(enum, nr) - return IsBound(PositionsInSupersemigroup(I)[nr]); - end; + record.IsBound\[\] := {enum, nr} -> IsBound(PositionsInSupersemigroup(I)[nr]); record.Length := enum -> Length(PositionsInSupersemigroup(I)); @@ -73,18 +69,14 @@ end); InstallMethod(Size, "for a semigroup ideal with generators", [IsSemigroupIdeal and HasGeneratorsOfSemigroupIdeal], -function(I) - return Length(Enumerator(I)); -end); +I -> Length(Enumerator(I))); InstallMethod(\in, "for a multiplicative element and semigroup ideal with generators", [IsMultiplicativeElement, IsSemigroup and CanUseFroidurePin and IsSemigroupIdeal and HasGeneratorsOfSemigroupIdeal], -function(x, I) - return Position(Enumerator(I), x) <> fail; -end); +{x, I} -> Position(Enumerator(I), x) <> fail); # The method for GeneratorsOfSemigroup for a semigroup ideal must # not rely in any way on the output of the Froidure-Pin algorithm when run on diff --git a/gap/ideals/ideals.gi b/gap/ideals/ideals.gi index bee93d5ef..7b47706e5 100644 --- a/gap/ideals/ideals.gi +++ b/gap/ideals/ideals.gi @@ -179,20 +179,16 @@ end); InstallMethod(\=, "for a semigroup with generators and a semigroup ideal", [IsSemigroup and HasGeneratorsOfSemigroup, IsSemigroupIdeal and HasGeneratorsOfMagmaIdeal], -function(S, I) - return I = S; -end); +{S, I} -> I = S); InstallMethod(Representative, "for a semigroup ideal", [IsSemigroupIdeal and HasGeneratorsOfSemigroupIdeal], -function(I) - return Representative(GeneratorsOfMagmaIdeal(I)); -end); +{I} -> Representative(GeneratorsOfMagmaIdeal(I))); # a convenience, similar to the functions , , etc InstallGlobalFunction(SemigroupIdeal, -function(arg) +function(arg...) local out, i; if Length(arg) <= 1 then @@ -244,9 +240,7 @@ end); InstallMethod(SemigroupIdealByGenerators, "for a semigroup and list or collections", [IsSemigroup, IsListOrCollection], -function(S, gens) - return SemigroupIdealByGenerators(S, gens, SEMIGROUPS.OptionsRec(S)); -end); +{S, gens} -> SemigroupIdealByGenerators(S, gens, SEMIGROUPS.OptionsRec(S))); InstallMethod(SemigroupIdealByGenerators, "for semigroup, list or collection, and record", @@ -365,9 +359,7 @@ end); InstallMethod(InversesOfSemigroupElementNC, "for a semigroup ideal and multiplicative element", [IsSemigroupIdeal, IsMultiplicativeElement], -function(I, x) - return InversesOfSemigroupElementNC(SupersemigroupOfIdeal(I), x); -end); +{I, x} -> InversesOfSemigroupElementNC(SupersemigroupOfIdeal(I), x)); InstallMethod(IsCommutativeSemigroup, "for a semigroup ideal", [IsSemigroupIdeal], diff --git a/gap/ideals/lambda-rho.gi b/gap/ideals/lambda-rho.gi index fed9bc097..b32e35d5b 100644 --- a/gap/ideals/lambda-rho.gi +++ b/gap/ideals/lambda-rho.gi @@ -9,9 +9,7 @@ ## InstallMethod(AsList, "for an ideal orb", [IsIdealOrb], -function(o) - return Concatenation(List(o!.orbits, AsList)); -end); +o -> Concatenation(List(o!.orbits, AsList))); InstallMethod(Enumerate, "for an ideal orb, and a number", [IsIdealOrb, IsCyclotomic], @@ -22,11 +20,8 @@ function(o, limit) return o; fi; - newlookfunc := function(data, x) - return IsClosedOrbit(o) or Length(o) >= limit; - end; + newlookfunc := {data, x} -> IsClosedOrbit(o) or Length(o) >= limit; Enumerate(SemigroupData(o!.parent), infinity, newlookfunc); - return o; end); @@ -35,9 +30,7 @@ InstallMethod(Enumerate, "for an ideal orb, a number, and a function", function(o, limit, lookfunc) local newlookfunc; - newlookfunc := function(data, x) - return IsClosedOrbit(o) or Length(o) >= limit; - end; + newlookfunc := {data, x} -> IsClosedOrbit(o) or Length(o) >= limit; if IsLambdaOrb(o) then Enumerate(SemigroupData(o!.parent), infinity, rec(lookfunc := newlookfunc, lambdalookfunc := lookfunc)); @@ -51,15 +44,11 @@ end); InstallMethod(Length, "for a ideal orb", [IsIdealOrb], -function(o) - return Sum(o!.lens); -end); +o -> Sum(o!.lens)); InstallMethod(Length, "for an ideal inverse orb", [IsIdealOrb and IsInverseOrb], -function(o) - return Length(o!.orbit); -end); +o -> Length(o!.orbit)); InstallMethod(IsBound\[\], "for an ideal orb and positive integer", [IsIdealOrb, IsPosInt], @@ -76,9 +65,7 @@ end); InstallMethod(IsBound\[\], "for an inverse ideal orb and positive integer", [IsIdealOrb and IsInverseOrb, IsPosInt], -function(o, i) - return IsBound(o!.orbit[i]); -end); +{o, i} -> IsBound(o!.orbit[i])); InstallMethod(ELM_LIST, "for an ideal orb and positive integer", [IsIdealOrb, IsPosInt], @@ -94,34 +81,22 @@ function(o, i) end); InstallMethod(ELM_LIST, "for an inverse ideal orb and positive integer", -[IsIdealOrb and IsInverseOrb, IsPosInt], -function(o, i) - return o!.orbit[i]; -end); +[IsIdealOrb and IsInverseOrb, IsPosInt], {o, i} -> o!.orbit[i]); # same method for inverse ideal orbs InstallMethod(\in, "for an object and ideal orb", -[IsObject, IsIdealOrb], -function(obj, o) - return HTValue(o!.ht, obj) <> fail; -end); +[IsObject, IsIdealOrb], {obj, o} -> HTValue(o!.ht, obj) <> fail); # same method for inverse ideal orbs InstallMethod(Position, "for an ideal orb, object, zero cyc", -[IsIdealOrb, IsObject, IsZeroCyc], -function(o, obj, n) - return HTValue(o!.ht, obj); -end); +[IsIdealOrb, IsObject, IsZeroCyc], {o, obj, n} -> HTValue(o!.ht, obj)); # same method for inverse ideal orbs InstallMethod(OrbitGraph, "for an ideal orb", -[IsIdealOrb], -function(o) - return o!.orbitgraph; -end); +[IsIdealOrb], o -> o!.orbitgraph); InstallMethod(ViewObj, "for a ideal orb", [IsIdealOrb], @@ -337,13 +312,8 @@ function(o, pt, x, pos, gen, ind, lookfunc) len := Length(o); if len <> 0 then - record.gradingfunc := function(new, x) - return HTValue(o!.ht, x) <> fail; - # return x in o; - end; - record.onlygrades := function(x, data); - return not x; - end; + record.gradingfunc := {new, x} -> HTValue(o!.ht, x) <> fail; + record.onlygrades := {x, data} -> not x; record.onlygradesdata := fail; fi; @@ -450,13 +420,8 @@ function(o, pt, x, pos, gen, ind, lookfunc) len := Length(o); if len <> 0 then - record.gradingfunc := function(new, x) - return HTValue(o!.ht, x) <> fail; - # return x in o; - end; - record.onlygrades := function(x, data); - return not x; - end; + record.gradingfunc := {new, x} -> HTValue(o!.ht, x) <> fail; + record.onlygrades := {x, data} -> not x; record.onlygradesdata := fail; fi; @@ -561,16 +526,12 @@ end); InstallMethod(EvaluateWord, "for a lambda orb and a word (Semigroups)", [IsLambdaOrb, IsList], 1, # to beat the methods for IsXCollection -function(o, w) - return EvaluateWord(o!.gens, w); -end); +{o, w} -> EvaluateWord(o!.gens, w)); InstallMethod(EvaluateWord, "for a rho orb and a word (Semigroups)", [IsRhoOrb, IsList], 1, # to beat the methods for IsXCollection -function(o, w) - return EvaluateWord(o!.gens, w); -end); +{o, w} -> EvaluateWord(o!.gens, w)); # returns a triple [leftword, nr, rightword] where , are # words in the generators of the supersemigroup of the ideal, and is the diff --git a/gap/libsemigroups/cong.gi b/gap/libsemigroups/cong.gi index 2f572489a..4f0f4e478 100644 --- a/gap/libsemigroups/cong.gi +++ b/gap/libsemigroups/cong.gi @@ -121,34 +121,26 @@ function(S) return libsemigroups.Congruence.make_from_froidurepin_bmat; end); +# Why does this work for types other than boolean matrices? InstallMethod(LibsemigroupsCongruenceConstructor, "for a matrix semigroup with CanUseLibsemigroupsCongruences", [IsMatrixOverSemiringSemigroup and CanUseLibsemigroupsCongruences], -function(S) - # Why does this work for types other than boolean matrices? - return libsemigroups.Congruence.make_from_froidurepin_bmat; -end); +_ -> libsemigroups.Congruence.make_from_froidurepin_bmat); InstallMethod(LibsemigroupsCongruenceConstructor, "for a bipartition semigroup with CanUseLibsemigroupsCongruences", [IsBipartitionSemigroup and CanUseLibsemigroupsCongruences], -function(S) - return libsemigroups.Congruence.make_from_froidurepin_bipartition; -end); +_ -> libsemigroups.Congruence.make_from_froidurepin_bipartition); InstallMethod(LibsemigroupsCongruenceConstructor, "for a PBR semigroup and CanUseLibsemigroupsCongruences", [IsPBRSemigroup and CanUseLibsemigroupsCongruences], -function(S) - return libsemigroups.Congruence.make_from_froidurepin_pbr; -end); +_ -> libsemigroups.Congruence.make_from_froidurepin_pbr); InstallMethod(LibsemigroupsCongruenceConstructor, "for a quotient semigroup and CanUseLibsemigroupsCongruences", [IsQuotientSemigroup and CanUseLibsemigroupsCongruences], -function(S) - return libsemigroups.Congruence.make_from_froidurepinbase; -end); +_ -> libsemigroups.Congruence.make_from_froidurepinbase); # Get the libsemigroups::Congruence object associated to a GAP object @@ -220,9 +212,7 @@ end); InstallMethod(CongruenceWordToClassIndex, "for CanUseLibsemigroupsCongruence and hom. list", [CanUseLibsemigroupsCongruence, IsMultiplicativeElement], -function(C, x) - return CongruenceWordToClassIndex(C, MinimalFactorization(Range(C), x)); -end); +{C, x} -> CongruenceWordToClassIndex(C, MinimalFactorization(Range(C), x))); ######################################################################## diff --git a/gap/libsemigroups/froidure-pin.gi b/gap/libsemigroups/froidure-pin.gi index 163b78b2b..34e45aee1 100644 --- a/gap/libsemigroups/froidure-pin.gi +++ b/gap/libsemigroups/froidure-pin.gi @@ -337,7 +337,7 @@ InstallMethod(PositionOp, [IsSemigroup and CanUseLibsemigroupsFroidurePin, IsMultiplicativeElement, IsZeroCyc], -function(S, x, n) +function(S, x, _) local pos; if IsPartialPermSemigroup(S) then if DegreeOfPartialPermSemigroup(S) < DegreeOfPartialPerm(x) @@ -566,9 +566,7 @@ end); InstallMethod(IsEnumerated, "for a semigroup with CanUseLibsemigroupsFroidurePin", [IsSemigroup and CanUseLibsemigroupsFroidurePin], -function(S) - return FroidurePinMemFnRec(S).finished(LibsemigroupsFroidurePin(S)); -end); +S -> FroidurePinMemFnRec(S).finished(LibsemigroupsFroidurePin(S))); ########################################################################### ## Cayley graphs etc @@ -652,23 +650,15 @@ function(S) enum := rec(); - enum.NumberElement := function(enum, x) - return PositionSortedOp(S, x); - end; + enum.NumberElement := {enum, x} -> PositionSortedOp(S, x); - enum.ElementNumber := function(enum, nr) - return sorted_at(T, nr - 1); - end; + enum.ElementNumber := {enum, nr} -> sorted_at(T, nr - 1); enum.Length := enum -> Size(S); - enum.Membership := function(x, enum) - return PositionCanonical(S, x) <> fail; - end; + enum.Membership := {x, enum} -> PositionCanonical(S, x) <> fail; - enum.IsBound\[\] := function(enum, nr) - return nr <= Size(S); - end; + enum.IsBound\[\] := {enum, nr} -> nr <= Size(S); enum := EnumeratorByFunctions(S, enum); SetIsSemigroupEnumerator(enum, true); @@ -695,9 +685,7 @@ function(S) enum := rec(); - enum.NumberElement := function(enum, x) - return PositionCanonical(S, x); - end; + enum.NumberElement := {enum, x} -> PositionCanonical(S, x); if IsFpSemigroup(S) or IsFpMonoid(S) or IsQuotientSemigroup(S) then factorisation := FroidurePinMemFnRec(S).minimal_factorisation; @@ -719,7 +707,8 @@ function(S) end; fi; - enum.Length := function(enum) + # TODO shouldn't S be stored in enum? + enum.Length := function(_) if not IsFinite(S) then return infinity; else @@ -727,13 +716,9 @@ function(S) fi; end; - enum.Membership := function(x, enum) - return PositionCanonical(S, x) <> fail; - end; + enum.Membership := {x, enum} -> PositionCanonical(S, x) <> fail; - enum.IsBound\[\] := function(enum, nr) - return nr <= Size(S); - end; + enum.IsBound\[\] := {enum, nr} -> nr <= Size(S); enum := EnumeratorByFunctions(S, enum); SetIsSemigroupEnumerator(enum, true); @@ -853,9 +838,7 @@ function(Constructor, S, coll, opts) coll := Shuffle(coll); if IsGeneratorsOfActingSemigroup(coll) then n := ActionDegree(coll); - Sort(coll, function(x, y) - return ActionRank(x, n) > ActionRank(y, n); - end); + Sort(coll, {x, y} -> ActionRank(x, n) > ActionRank(y, n)); elif Length(coll) < 120 then Sort(coll, IsGreensDGreaterThanFunc(Semigroup(coll))); fi; diff --git a/gap/libsemigroups/sims1.gi b/gap/libsemigroups/sims1.gi index 3b8afc87d..bc235a81f 100644 --- a/gap/libsemigroups/sims1.gi +++ b/gap/libsemigroups/sims1.gi @@ -302,7 +302,7 @@ InstallMethod(IteratorOfLeftCongruences, {S, n} -> IteratorOfLeftCongruences(S, n, [])); InstallMethod(IteratorOfRightCongruences, "for a semigroup", -[IsSemigroup], {S} -> IteratorOfRightCongruences(S, Size(S), [])); +[IsSemigroup], S -> IteratorOfRightCongruences(S, Size(S), [])); InstallMethod(IteratorOfLeftCongruences, "for a semigroup", -[IsSemigroup], {S} -> IteratorOfLeftCongruences(S, Size(S), [])); +[IsSemigroup], S -> IteratorOfLeftCongruences(S, Size(S), [])); diff --git a/gap/main/acting.gi b/gap/main/acting.gi index 5d95c01ec..7f6771665 100644 --- a/gap/main/acting.gi +++ b/gap/main/acting.gi @@ -55,10 +55,7 @@ function(S, lambda_orb) end); InstallMethod(SemigroupData, "for an acting semigroup", -[IsActingSemigroup], -function(S) - return SemigroupData(S, LambdaOrb(S)); -end); +[IsActingSemigroup], S -> SemigroupData(S, LambdaOrb(S))); # different method for regular ideals, regular/inverse semigroups, same method # for non-regular ideals @@ -141,9 +138,7 @@ function(x, S) return false; fi; - lookfunc := function(data, x) - return rhoo[rholookup[x[6]]] = rho; - end; + lookfunc := {_, x} -> rhoo[rholookup[x[6]]] = rho; data := Enumerate(data, infinity, lookfunc); l := PositionOfFound(data); @@ -163,9 +158,8 @@ function(x, S) return false; fi; - lookfunc := function(data, x) - return IsBound(lambdarhoht[l]) and IsBound(lambdarhoht[l][m]); - end; + lookfunc := + {data, x} -> IsBound(lambdarhoht[l]) and IsBound(lambdarhoht[l][m]); data := Enumerate(data, infinity, lookfunc); @@ -217,9 +211,7 @@ function(x, S) elif repslens[m][ind] < max then # enumerate until we find f or finish n := repslens[m][ind]; - lookfunc := function(data, x) - return repslens[m][ind] > n; - end; + lookfunc := {data, x} -> repslens[m][ind] > n; if schutz = false then repeat # look for more R-reps with same lambda-rho value @@ -284,17 +276,13 @@ end); InstallMethod(\in, "for a multiplicative element and semigroup data", [IsMultiplicativeElement, IsSemigroupData], -function(f, data) - return not Position(data, f) = fail; -end); +{f, data} -> not Position(data, f) = fail); # same method for ideals InstallMethod(ELM_LIST, "for semigroup data, and pos int", [IsSemigroupData, IsPosInt], -function(o, nr) - return o!.orbit[nr]; -end); +{o, nr} -> o!.orbit[nr]); # same method for ideals @@ -310,9 +298,7 @@ data -> Enumerate(data, infinity, ReturnFalse)); InstallMethod(Enumerate, "for semigroup data and limit", [IsSemigroupData, IsCyclotomic], -function(data, limit) - return Enumerate(data, limit, ReturnFalse); -end); +{data, limit} -> Enumerate(data, limit, ReturnFalse)); # different method for ideals... @@ -779,16 +765,12 @@ InstallMethod(String, "for the universal fake one", InstallMethod(\*, "for the universal fake one and a multiplicative element", [SEMIGROUPS_IsUniversalFakeOne, IsMultiplicativeElement], -function(x, y) - return y; -end); +{x, y} -> y); InstallMethod(\*, "for a multiplicative element and the universal fake one", [IsMultiplicativeElement, SEMIGROUPS_IsUniversalFakeOne], -function(x, y) - return x; -end); +ReturnFirst); InstallMethod(\<, "for the universal fake one and a multiplicative element", [SEMIGROUPS_IsUniversalFakeOne, IsMultiplicativeElement], ReturnTrue); diff --git a/gap/main/froidure-pin.gi b/gap/main/froidure-pin.gi index 6abe4c5c8..d798f5ef3 100644 --- a/gap/main/froidure-pin.gi +++ b/gap/main/froidure-pin.gi @@ -53,9 +53,7 @@ end); InstallImmediateMethod(CanUseGapFroidurePin, IsReesZeroMatrixSubsemigroup and HasGeneratorsOfSemigroup, 0, -function(R) - return CanUseFroidurePin(ParentAttr(R)); -end); +R -> CanUseFroidurePin(ParentAttr(R))); InstallImmediateMethod(CanUseGapFroidurePin, IsReesMatrixSubsemigroup and HasRowsOfReesMatrixSemigroup @@ -67,9 +65,7 @@ end); InstallImmediateMethod(CanUseGapFroidurePin, IsReesMatrixSubsemigroup and HasGeneratorsOfSemigroup, 0, -function(R) - return CanUseFroidurePin(ParentAttr(R)); -end); +R -> CanUseFroidurePin(ParentAttr(R))); # The next method is supposed to catch proper subsemigroups of quotient # semigroups @@ -168,9 +164,7 @@ end); # InstallMethod(IsFinite, # "for a semigroup with CanUseGapFroidurePin and known generators", # [CanUseGapFroidurePin and HasGeneratorsOfSemigroup], -# function(S) -# return Size(S) < infinity; -# end); +# S -> Size(S) < infinity); InstallMethod(AsSet, "for a semigroup with CanUseGapFroidurePin and known generators", @@ -241,11 +235,10 @@ function(S) enum := rec(); - enum.NumberElement := function(enum, x) - return PositionCanonical(S, x); - end; + # TODO Shouldn't S be stored in enum + enum.NumberElement := {enum, x} -> PositionCanonical(S, x); - enum.ElementNumber := function(enum, nr) + enum.ElementNumber := function(_, nr) local fp; fp := GapFroidurePin(S); if not (IsBound(fp.elts) and nr < Length(fp.elts) and IsBound(fp.elts[nr])) @@ -261,17 +254,11 @@ function(S) enum.Length := enum -> Size(S); - enum.AsList := function(enum) - return AsListCanonical(S); - end; + enum.AsList := enum -> AsListCanonical(S); - enum.Membership := function(x, enum) - return PositionCanonical(S, x) <> fail; - end; + enum.Membership := {x, enum} -> PositionCanonical(S, x) <> fail; - enum.IsBound\[\] := function(enum, nr) - return nr <= Length(enum); - end; + enum.IsBound\[\] := {enum, nr} -> nr <= Length(enum); enum := EnumeratorByFunctions(S, enum); SetIsSemigroupEnumerator(enum, true); @@ -309,9 +296,7 @@ InstallMethod(\in, "for mult. elt. and a semigroup with CanUseGapFroidurePin + generators", [IsMultiplicativeElement, CanUseGapFroidurePin and HasGeneratorsOfSemigroup], -function(x, S) - return PositionCanonical(S, x) <> fail; -end); +{x, S} -> PositionCanonical(S, x) <> fail); # different method for ideals @@ -368,7 +353,7 @@ PositionOp); InstallMethod(PositionOp, "for a semigroup with CanUseGapFroidurePin, multi. element, zero cyc", [CanUseGapFroidurePin, IsMultiplicativeElement, IsZeroCyc], -function(S, x, n) +function(S, x, _) if FamilyObj(x) <> ElementsFamily(FamilyObj(S)) then return fail; fi; @@ -412,9 +397,7 @@ end); InstallMethod(Enumerate, "for a semigroup with CanUseGapFroidurePin and known generators", [CanUseGapFroidurePin and HasGeneratorsOfSemigroup], -function(S) - return Enumerate(S, -1); -end); +S -> Enumerate(S, -1)); # same method for ideals diff --git a/gap/main/graded.gi b/gap/main/graded.gi index 45bc31b6d..fa10b2c4e 100644 --- a/gap/main/graded.gi +++ b/gap/main/graded.gi @@ -33,30 +33,22 @@ end); InstallMethod(\in, "for a lambda value and graded lambda orbs", [IsObject, IsGradedLambdaOrbs], -function(lamf, o) - return not HTValue(GradedLambdaHT(o!.parent), lamf) = fail; -end); +{lamf, o} -> not HTValue(GradedLambdaHT(o!.parent), lamf) = fail); InstallMethod(\in, "for a rho value and graded rho orbs", [IsObject, IsGradedRhoOrbs], -function(rho, o) - return not HTValue(GradedRhoHT(o!.parent), rho) = fail; -end); +{rho, o} -> not HTValue(GradedRhoHT(o!.parent), rho) = fail); InstallMethod(ELM_LIST, "for graded lambda orbs, and pos int", [IsGradedLambdaOrbs, IsPosInt], -function(o, j) - return o!.orbits[j]; -end); +{o, j} -> o!.orbits[j]); InstallMethod(ELM_LIST, "for graded rho orbs, and pos int", [IsGradedRhoOrbs, IsPosInt], -function(o, j) - return o!.orbits[j]; -end); +{o, j} -> o!.orbits[j]); InstallGlobalFunction(GradedLambdaOrb, -function(arg) +function(arg...) local S, x, global, obj, lambda, graded, pos, gradingfunc, onlygrades, onlygradesdata, orb, gens, o, j, k, l; @@ -94,24 +86,16 @@ function(arg) return graded[pos[1]][pos[2]]; fi; - gradingfunc := function(o, x) - return [LambdaRank(S)(x), x]; - end; + gradingfunc := {o, x} -> [LambdaRank(S)(x), x]; - onlygrades := function(x, data_ht) - return x[1] = LambdaRank(S)(lambda) - and HTValue(data_ht, x[2]) = fail; - end; + onlygrades := {x, data} -> + x[1] = LambdaRank(S)(lambda) and HTValue(data, x[2]) = fail; onlygradesdata := GradedLambdaHT(S); else # local - gradingfunc := function(o, x) - return LambdaRank(S)(x); - end; - onlygrades := function(x, data_ht) - return x = LambdaRank(S)(lambda); - end; + gradingfunc := {o, x} -> LambdaRank(S)(x); + onlygrades := {x, data_ht} -> x = LambdaRank(S)(lambda); onlygradesdata := fail; fi; @@ -158,7 +142,7 @@ function(arg) end); InstallGlobalFunction(GradedRhoOrb, -function(arg) +function(arg...) local S, x, global, obj, rho, graded, pos, gradingfunc, onlygrades, onlygradesdata, orb, gens, o, j, k, l; @@ -203,12 +187,8 @@ function(arg) onlygradesdata := GradedRhoHT(S); else # local - gradingfunc := function(o, x) - return RhoRank(S)(x); - end; - onlygrades := function(x, data_ht) - return x = RhoRank(S)(rho); - end; + gradingfunc := {o, x} -> RhoRank(S)(x); + onlygrades := {x, data_ht} -> x = RhoRank(S)(rho); onlygradesdata := fail; fi; @@ -291,28 +271,18 @@ function(S) end); InstallMethod(IsBound\[\], "for graded lambda orbs and pos int", -[IsGradedLambdaOrbs, IsPosInt], -function(o, j) - return IsBound(o!.orbits[j]); -end); +[IsGradedLambdaOrbs, IsPosInt], {o, j} -> IsBound(o!.orbits[j])); InstallMethod(IsBound\[\], "for graded rho orbs and pos int", -[IsGradedRhoOrbs, IsPosInt], -function(o, j) - return IsBound(o!.orbits[j]); -end); +[IsGradedRhoOrbs, IsPosInt], {o, j} -> IsBound(o!.orbits[j])); InstallMethod(Position, "for graded lambda orbs and lambda value", [IsGradedLambdaOrbs, IsObject, IsZeroCyc], -function(o, lamf, n) - return HTValue(GradedLambdaHT(o!.parent), lamf); -end); +{o, lamf, n} -> HTValue(GradedLambdaHT(o!.parent), lamf)); InstallMethod(Position, "for graded rho orbs and rho value", [IsGradedRhoOrbs, IsObject, IsZeroCyc], -function(o, rho, n) - return HTValue(GradedRhoHT(o!.parent), rho); -end); +{o, rho, n} -> HTValue(GradedRhoHT(o!.parent), rho)); InstallMethod(PrintObj, [IsGradedLambdaOrbs], function(o) @@ -346,7 +316,7 @@ function(s) seen := iter!.seen; lambda_o := LambdaOrb(s); pos := LookForInOrb(lambda_o, - function(o, x) + function(_, x) local val; val := Position(GradedLambdaOrbs(s), x); return val = fail diff --git a/gap/main/lambda-rho.gi b/gap/main/lambda-rho.gi index 7ee2416bc..f613e2527 100644 --- a/gap/main/lambda-rho.gi +++ b/gap/main/lambda-rho.gi @@ -63,10 +63,6 @@ function(o, m) # it would be better to use the SchreierTree here not the ReverseSchreierTree # and shouldn't there be a second case of inverse orbits here?? genpos := ReverseSchreierTreeOfSCC(o, m); - inv := function(lambda, x) - return LambdaInverse(o!.parent)(lambda, x); - end; - trace := function(i) local x; if IsBound(mults[i]) then @@ -79,6 +75,7 @@ function(o, m) mults[i] := [inv(o[i], x), x]; return x; end; + inv := {lambda, x} -> LambdaInverse(o!.parent)(lambda, x); for i in scc do trace(i); @@ -113,7 +110,7 @@ function(o, m, i) genpos := ReverseSchreierTreeOfSCC(o, m); inv := LambdaInverse(o!.parent); - trace := function(i) + trace := function(i) # gaplint: disable=W000 local x; if IsBound(mults[i]) then return mults[i][2]; @@ -369,7 +366,7 @@ function(o, m) genpos := SchreierTreeOfSCC(o, m); inv := x -> RhoInverse(o!.parent)(o[scc[1]], x); - trace := function(i) + trace := function(i) # gaplint: disable=W000 local x; if IsBound(mults[i]) then return mults[i][1]; diff --git a/gap/main/orbits.gi b/gap/main/orbits.gi index 54c8a910b..a8d93554f 100644 --- a/gap/main/orbits.gi +++ b/gap/main/orbits.gi @@ -161,7 +161,7 @@ InstallMethod(EvaluateWord, [IsMultiplicativeElementWithOneCollection, IsList], function(gens, w) local i, res; - if Length(w) = 0 then + if IsEmpty(w) then return One(gens); fi; res := gens[AbsInt(w[1])] ^ SignInt(w[1]); @@ -176,7 +176,7 @@ InstallMethod(EvaluateWord, [IsMultiplicativeElementCollection, IsList], function(gens, w) local i, res; - if Length(w) = 0 then + if IsEmpty(w) then return SEMIGROUPS.UniversalFakeOne; fi; res := gens[AbsInt(w[1])] ^ SignInt(w[1]); @@ -191,7 +191,7 @@ InstallMethod(EvaluateExtRepObjWord, [IsMultiplicativeElementCollection, IsList], function(gens, w) local res, i; - if Length(w) = 0 then + if IsEmpty(w) then ErrorNoReturn("the second argument must be a non-empty list"); elif Length(w) mod 2 = 1 then ErrorNoReturn("the second argument must be a list of even length"); @@ -208,7 +208,7 @@ InstallMethod(EvaluateExtRepObjWord, [IsMultiplicativeElementWithOneCollection, IsList], function(gens, w) local res, i; - if Length(w) = 0 then + if IsEmpty(w) then return One(gens); elif Length(w) mod 2 = 1 then ErrorNoReturn("the second argument must be a list of even length"); @@ -221,7 +221,7 @@ function(gens, w) end); InstallGlobalFunction(EnumeratePosition, -function(arg) +function(arg...) local o, val, onlynew, pos; o := arg[1]; @@ -242,11 +242,9 @@ function(arg) if IsClosedOrbit(o) then return fail; fi; - o!.looking := true; - o!.lookingfor := function(o, x) - return x = val; - end; - o!.lookfunc := o!.lookingfor; + o!.looking := true; + o!.lookingfor := {_, x} -> x = val; + o!.lookfunc := o!.lookingfor; Enumerate(o); pos := PositionOfFound(o); o!.found := false; diff --git a/gap/main/setup.gi b/gap/main/setup.gi index cd1c1e3be..44117757d 100644 --- a/gap/main/setup.gi +++ b/gap/main/setup.gi @@ -29,13 +29,13 @@ InstallMethod(IsGeneratorsOfActingSemigroup, "for a list or collection", # IsGeneratorsOfActingSemigroup, then this is ignored. I think this is a bug. InstallMethod(IsGeneratorsOfActingSemigroup, "for a transformation collection", -[IsTransformationCollection], x -> true); +[IsTransformationCollection], x -> true); # gaplint: disable=W036 InstallMethod(IsGeneratorsOfActingSemigroup, "for a partial perm collection", -[IsPartialPermCollection], x -> true); +[IsPartialPermCollection], x -> true); # gaplint: disable=W036 InstallMethod(IsGeneratorsOfActingSemigroup, "for a bipartition collection", -[IsBipartitionCollection], x -> true); +[IsBipartitionCollection], x -> true); # gaplint: disable=W036 InstallMethod(IsGeneratorsOfActingSemigroup, "for a Rees 0-matrix semigroup element collection", @@ -90,9 +90,7 @@ end); InstallMethod(ActionDegree, "for a McAlister semigroup element", [IsMcAlisterTripleSemigroupElement], -function(x) - return 0; -end); +x -> 0); InstallMethod(ActionDegree, "for a matrix obj", [IsMatrixObj], function(m) @@ -132,9 +130,7 @@ end); InstallMethod(ActionDegree, "for a McAlister semigroup element collection", [IsMcAlisterTripleSemigroupElementCollection], -function(coll) - return MaximumList(List(coll, x -> ActionDegree(x))); -end); +coll -> MaximumList(List(coll, ActionDegree))); InstallMethod(ActionDegree, "for a transformation semigroup", [IsTransformationSemigroup], DegreeOfTransformationSemigroup); @@ -162,15 +158,11 @@ end); InstallMethod(ActionDegree, "for a McAlister triple subsemigroup", [IsMcAlisterTripleSubsemigroup], -function(S) - return 0; -end); +S -> 0); InstallMethod(ActionDegree, "for a matrix over finite field semigroup", [IsMatrixOverFiniteFieldSemigroup], -function(S) - return ActionDegree(Representative(S)); -end); +S -> ActionDegree(Representative(S))); # the number of points in the range of the action @@ -179,46 +171,33 @@ InstallMethod(ActionRank, "for a transformation and integer", InstallMethod(ActionRank, "for a transformation semigroup", [IsTransformationSemigroup], -function(s) - local deg; - deg := DegreeOfTransformationSemigroup(s); - return function(f) - return RANK_TRANS_INT(f, deg); - end; -end); +S -> f -> RANK_TRANS_INT(f, DegreeOfTransformationSemigroup(S))); InstallMethod(ActionRank, "for a partial perm and integer", [IsPartialPerm, IsInt], -function(f, n) - return RankOfPartialPerm(f); -end); +{f, n} -> RankOfPartialPerm(f)); InstallMethod(ActionRank, "for a partial perm semigroup", [IsPartialPermSemigroup], -function(s) - return RankOfPartialPerm; -end); +S -> RankOfPartialPerm); InstallMethod(ActionRank, "for a bipartition and integer", [IsBipartition, IsInt], BIPART_RANK); InstallMethod(ActionRank, "for a bipartition semigroup", [IsBipartitionSemigroup], -function(S) - return RankOfBipartition; -end); +S -> RankOfBipartition); InstallMethod(ActionRank, "for a Rees 0-matrix semigroup element and integer", [IsReesZeroMatrixSemigroupElement, IsInt], -function(f, n) +function(f, _) local parent; if f![1] = 0 then return 0; - else - parent := ReesMatrixSemigroupOfFamily(FamilyObj(f)); - return NrMovedPoints(UnderlyingSemigroup(parent)) + 1; fi; + parent := ReesMatrixSemigroupOfFamily(FamilyObj(f)); + return NrMovedPoints(UnderlyingSemigroup(parent)) + 1; end); InstallMethod(ActionRank, "for a Rees 0-matrix subsemigroup", @@ -237,15 +216,11 @@ end); InstallMethod(ActionRank, "for a McAlister triple semigroup element and int", [IsMcAlisterTripleSemigroupElement, IsInt], -function(f, n) - return f[1]; -end); +{f, n} -> f[1]); InstallMethod(ActionRank, "for a McAlister triple subsemigroup", [IsMcAlisterTripleSubsemigroup], -function(S) - return x -> ActionDegree(S); -end); +S -> x -> ActionDegree(S)); InstallMethod(ActionRank, "for a matrix object and integer", [IsMatrixObj, IsInt], @@ -258,9 +233,7 @@ end); InstallMethod(ActionRank, "for a matrix semigroup", [IsMatrixOverFiniteFieldSemigroup], -function(S) - return x -> Rank(RowSpaceBasis(x)); -end); +S -> x -> Rank(RowSpaceBasis(x))); # the minimum possible rank of an element @@ -282,7 +255,7 @@ InstallMethod(MinActionRank, "for a McAlister triple subsemigroup", InstallMethod(MinActionRank, "for a matrix semigroup", [IsMatrixOverFiniteFieldSemigroup], x -> 0); -# options passed to LambdaOrb(s) when it is created +# options passed to LambdaOrb(S) when it is created InstallMethod(LambdaOrbOpts, "for a transformation semigroup", [IsTransformationSemigroup], S -> rec(forflatplainlists := true)); @@ -300,7 +273,7 @@ InstallMethod(LambdaOrbOpts, "for a McAlister triple subsemigroup", [IsMcAlisterTripleSubsemigroup], S -> rec()); InstallMethod(LambdaOrbOpts, "for a matrix semigroup", -[IsMatrixOverFiniteFieldSemigroup], s -> rec()); +[IsMatrixOverFiniteFieldSemigroup], S -> rec()); InstallMethod(RhoOrbOpts, "for a transformation semigroup", [IsTransformationSemigroup], S -> rec(forflatplainlists := true)); @@ -318,19 +291,12 @@ InstallMethod(RhoOrbOpts, "for a McAlister triple subsemigroup", [IsMcAlisterTripleSubsemigroup], S -> rec()); InstallMethod(RhoOrbOpts, "for a matrix semigroup", -[IsMatrixOverFiniteFieldSemigroup], s -> rec()); +[IsMatrixOverFiniteFieldSemigroup], S -> rec()); # the lambda and rho acts InstallMethod(LambdaAct, "for a transformation semigroup", [IsTransformationSemigroup], -function(S) - local deg; - deg := DegreeOfTransformationSemigroup(S); - return - function(set, f) - return OnPosIntSetsTrans(set, f, deg); - end; -end); +S -> {set, f} -> OnPosIntSetsTrans(set, f, DegreeOfTransformationSemigroup(S))); InstallMethod(LambdaAct, "for a partial perm semigroup", [IsPartialPermSemigroup], x -> OnPosIntSetsPartialPerm); @@ -369,27 +335,16 @@ end); InstallMethod(LambdaAct, "for a matrix over finite field semigroup", [IsMatrixOverFiniteFieldSemigroup], -S -> function(vsp, mat) - return MatrixOverFiniteFieldRowSpaceRightAction(S, vsp, mat); -end); +S -> {vsp, mat} -> MatrixOverFiniteFieldRowSpaceRightAction(S, vsp, mat)); InstallMethod(RhoAct, "for a transformation semigroup", [IsTransformationSemigroup], -function(S) - local deg; - deg := DegreeOfTransformationSemigroup(S); - return - function(set, f) - return ON_KERNEL_ANTI_ACTION(set, f, deg); - end; -end); +S -> +{set, f} -> ON_KERNEL_ANTI_ACTION(set, f, DegreeOfTransformationSemigroup(S))); -# JDM new c method for this! InstallMethod(RhoAct, "for a partial perm semigroup", [IsPartialPermSemigroup], S -> - function(set, f) - return OnPosIntSetsPartialPerm(set, f ^ -1); - end); +{set, f} -> OnPosIntSetsPartialPerm(set, f ^ -1)); InstallMethod(RhoAct, "for a partial perm semigroup", [IsBipartitionSemigroup], x -> BLOCKS_LEFT_ACT); @@ -425,11 +380,7 @@ end); InstallMethod(RhoAct, "for a matrix semigroup", [IsMatrixOverFiniteFieldSemigroup], -function(S) - return function(vsp, mat) - return LambdaAct(S)(vsp, TransposedMat(mat)); - end; -end); +S -> {vsp, mat} -> LambdaAct(S)(vsp, TransposedMat(mat))); # the seed or dummy start point for LambdaOrb @@ -441,9 +392,7 @@ InstallMethod(LambdaOrbSeed, "for a partial perm semigroup", InstallMethod(LambdaOrbSeed, "for a bipartition semigroup", [IsBipartitionSemigroup], -function(S) - return BLOCKS_NC([[1 .. DegreeOfBipartitionSemigroup(S) + 1]]); -end); +S -> BLOCKS_NC([[1 .. DegreeOfBipartitionSemigroup(S) + 1]])); InstallMethod(LambdaOrbSeed, "for a Rees 0-matrix subsemigroup", [IsReesZeroMatrixSubsemigroup], S -> -1); @@ -472,9 +421,7 @@ InstallMethod(RhoOrbSeed, "for a partial perm semigroup", InstallMethod(RhoOrbSeed, "for a bipartition semigroup", [IsBipartitionSemigroup], -function(S) - return BLOCKS_NC([[1 .. DegreeOfBipartitionSemigroup(S) + 1]]); -end); +S -> BLOCKS_NC([[1 .. DegreeOfBipartitionSemigroup(S) + 1]])); InstallMethod(RhoOrbSeed, "for a Rees 0-matrix subsemigroup", [IsReesZeroMatrixSubsemigroup], S -> -1); @@ -489,14 +436,7 @@ InstallMethod(RhoOrbSeed, "for a matrix semigroup", InstallMethod(LambdaFunc, "for a transformation semigroup", [IsTransformationSemigroup], -function(S) - local deg; - deg := DegreeOfTransformationSemigroup(S); - return - function(f) - return IMAGE_SET_TRANS_INT(f, deg); - end; -end); +S -> f -> IMAGE_SET_TRANS_INT(f, DegreeOfTransformationSemigroup(S))); InstallMethod(LambdaFunc, "for a partial perm semigroup", [IsPartialPermSemigroup], x -> IMAGE_SET_PPERM); @@ -520,23 +460,13 @@ function(S) return x -> act(x[1], x[2] ^ -1); end); +# a function that returns the row space InstallMethod(LambdaFunc, "for a matrix semigroup", -[IsMatrixOverFiniteFieldSemigroup], -s -> function(mat) - # a function that returns the row space - return RowSpaceBasis(mat); -end); +[IsMatrixOverFiniteFieldSemigroup], S -> RowSpaceBasis); InstallMethod(RhoFunc, "for a transformation semigroup", [IsTransformationSemigroup], -function(S) - local deg; - deg := DegreeOfTransformationSemigroup(S); - return - function(f) - return FLAT_KERNEL_TRANS_INT(f, deg); - end; -end); +S -> f -> FLAT_KERNEL_TRANS_INT(f, DegreeOfTransformationSemigroup(S))); InstallMethod(RhoFunc, "for a partial perm semigroup", [IsPartialPermSemigroup], x -> DOMAIN_PPERM); @@ -545,23 +475,15 @@ InstallMethod(RhoFunc, "for a bipartition semigroup", [IsBipartitionSemigroup], x -> BIPART_LEFT_BLOCKS); InstallMethod(RhoFunc, "for a Rees 0-matrix subsemigroup", -[IsReesZeroMatrixSubsemigroup], R -> (x -> x![1])); +[IsReesZeroMatrixSubsemigroup], R -> x -> x![1]); InstallMethod(RhoFunc, "for a McAlister triple subsemigroup", -[IsMcAlisterTripleSubsemigroup], -function(S) - return x -> x[1]; -end); +[IsMcAlisterTripleSubsemigroup], S -> x -> x[1]); +# a function that returns the column space InstallMethod(RhoFunc, "for a matrix semigroup", [IsMatrixOverFiniteFieldSemigroup], -function(S) - # a function that returns the column space - return - function(mat) - return LambdaFunc(S)(TransposedMat(mat)); - end; -end); +S -> mat -> LambdaFunc(S)(TransposedMat(mat))); # The function used to calculate the rank of lambda or rho value @@ -623,15 +545,7 @@ InstallMethod(RhoRank, "for a matrix semigroup", [IsMatrixOverFiniteFieldSemigroup], LambdaRank); InstallMethod(RhoRank, "for a McAlister subsemigroup", -[IsMcAlisterTripleSubsemigroup], S -> -function(x) - local T; - if x = 0 then - return 0; - fi; - T := MTSEParent(Representative(S)); - return ActionRank(MTSE(T, x, One(McAlisterTripleSemigroupGroup(T))), 0); -end); +[IsMcAlisterTripleSubsemigroup], LambdaRank); # if g=LambdaInverse(X, f) and X^f=Y, then Y^g=X and g acts on the right # like the inverse of f on Y. @@ -640,14 +554,10 @@ InstallMethod(LambdaInverse, "for a transformation semigroup", [IsTransformationSemigroup], S -> INV_LIST_TRANS); InstallMethod(LambdaInverse, "for a partial perm semigroup", -[IsPartialPermSemigroup], S -> function(x, f) - return f ^ -1; - end); +[IsPartialPermSemigroup], S -> {x, f} -> f ^ -1); InstallMethod(LambdaInverse, "for a McAlister triple subsemigroup", -[IsMcAlisterTripleSubsemigroup], S -> function(x, f) - return f ^ -1; - end); +[IsMcAlisterTripleSubsemigroup], S -> {x, f} -> f ^ -1); InstallMethod(LambdaInverse, "for a bipartition semigroup", [IsBipartitionSemigroup], S -> BLOCKS_INV_RIGHT); @@ -671,24 +581,18 @@ end); # g ^ Y = X and g acts on the left like the inverse of f on Y. InstallMethod(LambdaInverse, "for a matrix semigroup", -[IsMatrixOverFiniteFieldSemigroup], s -> -function(rsp, mat) - return MatrixOverFiniteFieldLocalRightInverse(s, rsp, mat); -end); +[IsMatrixOverFiniteFieldSemigroup], S -> +{rsp, mat} -> MatrixOverFiniteFieldLocalRightInverse(S, rsp, mat)); InstallMethod(RhoInverse, "for a transformation semigroup", [IsTransformationSemigroup], S -> INV_KER_TRANS); InstallMethod(RhoInverse, "for a partial perm semigroup", [IsPartialPermSemigroup], S -> - function(dom, f) - return f ^ -1; - end); + {dom, f} -> f ^ -1); InstallMethod(RhoInverse, "for a McAlister triple subsemigroup", -[IsMcAlisterTripleSubsemigroup], S -> function(x, f) - return f ^ -1; - end); +[IsMcAlisterTripleSubsemigroup], S -> {x, f} -> f ^ -1); # JDM better method for this!! @@ -711,58 +615,41 @@ InstallMethod(RhoInverse, "for a bipartition semigroup", [IsBipartitionSemigroup], S -> BLOCKS_INV_LEFT); InstallMethod(RhoInverse, "for a matrix semigroup", -[IsMatrixOverFiniteFieldSemigroup], s -> +[IsMatrixOverFiniteFieldSemigroup], S -> function(rsp, mat) - return TransposedMat(MatrixOverFiniteFieldLocalRightInverse(s, + return TransposedMat(MatrixOverFiniteFieldLocalRightInverse(S, rsp, TransposedMat(mat))); end); -InstallMethod(LambdaBound, "for a transformation semigroup", -[IsTransformationSemigroup], s -> +SEMIGROUPS.DefaultLambdaBound := _ -> function(r) if r < 100 then return Factorial(r); else return infinity; fi; -end); +end; + +InstallMethod(LambdaBound, "for a transformation semigroup", +[IsTransformationSemigroup], SEMIGROUPS.DefaultLambdaBound); InstallMethod(RhoBound, "for a transformation semigroup", [IsTransformationSemigroup], LambdaBound); InstallMethod(LambdaBound, "for a partial perm semigroup", -[IsPartialPermSemigroup], s -> -function(r) - if r < 100 then - return Factorial(r); - else - return infinity; - fi; -end); +[IsPartialPermSemigroup], SEMIGROUPS.DefaultLambdaBound); + InstallMethod(RhoBound, "for a partial perm semigroup", [IsPartialPermSemigroup], LambdaBound); InstallMethod(LambdaBound, "for a bipartition semigroup", -[IsBipartitionSemigroup], s -> -function(r) - if r < 100 then - return Factorial(r); - else - return infinity; - fi; -end); +[IsBipartitionSemigroup], SEMIGROUPS.DefaultLambdaBound); + InstallMethod(RhoBound, "for a bipartition semigroup", [IsBipartitionSemigroup], LambdaBound); InstallMethod(LambdaBound, "for a Rees 0-matrix semigroup", -[IsReesZeroMatrixSubsemigroup], s -> -function(r) - if r < 100 then - return Factorial(r); - else - return infinity; - fi; -end); +[IsReesZeroMatrixSubsemigroup], SEMIGROUPS.DefaultLambdaBound); InstallMethod(RhoBound, "for a Rees 0-matrix semigroup", [IsReesZeroMatrixSubsemigroup], LambdaBound); @@ -793,7 +680,7 @@ end); InstallMethod(RhoBound, "for a matrix semigroup", [IsMatrixOverFiniteFieldSemigroup], LambdaBound); -# LamdaIdentity(s) returns a function that returns +# LamdaIdentity(S) returns a function that returns # the identity element of the Schutzenberger group # elements produced by LambdaPerm @@ -801,74 +688,52 @@ InstallMethod(RhoBound, "for a matrix semigroup", InstallMethod(LambdaIdentity, "for a transformation semigroup", [IsTransformationSemigroup], - s -> function(r) - return (); - end); +S -> r -> ()); InstallMethod(RhoIdentity, "for a transformation semigroup", [IsTransformationSemigroup], - s -> function(r) - return (); - end); +S -> r -> ()); InstallMethod(LambdaIdentity, "for a partial perm semigroup", [IsPartialPermSemigroup], - s -> function(r) - return (); - end); +S -> r -> ()); InstallMethod(RhoIdentity, "for a partial perm semigroup", [IsPartialPermSemigroup], - s -> function(r) - return (); - end); + S -> r -> ()); InstallMethod(LambdaIdentity, "for a bipartition semigroup", [IsBipartitionSemigroup], - s -> function(r) - return (); - end); +S -> r -> ()); InstallMethod(RhoIdentity, "for a bipartition semigroup", [IsBipartitionSemigroup], - s -> function(r) - return (); - end); +S -> r -> ()); InstallMethod(LambdaIdentity, "for a Rees 0-matrix semigroup", [IsReesZeroMatrixSubsemigroup], - s -> function(r) - return (); - end); +S -> r -> ()); InstallMethod(RhoIdentity, "for a Rees 0-matrix semigroup", [IsReesZeroMatrixSubsemigroup], - s -> function(r) - return (); - end); +S -> r -> ()); InstallMethod(LambdaIdentity, "for a McAlister triple subsemigroup", [IsMcAlisterTripleSubsemigroup], - S -> function(r) - return (); - end); +S -> r -> ()); InstallMethod(RhoIdentity, "for a McAlister triple subsemigroup", [IsMcAlisterTripleSubsemigroup], LambdaIdentity); InstallMethod(LambdaIdentity, "for a matrix semigroup", [IsMatrixOverFiniteFieldSemigroup], S -> -function(r) - return IdentityMat(r, BaseDomain(Representative(S))); -end); +r -> IdentityMat(r, BaseDomain(Representative(S)))); InstallMethod(RhoIdentity, "for a matrix semigroup", [IsMatrixOverFiniteFieldSemigroup], S -> -function(r) - return IdentityMat(r, BaseDomain(Representative(S))); -end); +r -> IdentityMat(r, BaseDomain(Representative(S)))); -# LambdaPerm(s) returns a permutation from two acting semigroup elements with +# LambdaPerm(S) returns a permutation from two acting semigroup elements with # equal LambdaFunc and RhoFunc. This is required to check if one of the two # elements belongs to the schutz gp of a lambda orb. @@ -892,15 +757,11 @@ end); InstallMethod(LambdaPerm, "for a McAlister triple subsemigroup", [IsMcAlisterTripleSubsemigroup], -function(S) - return {x, y} -> x[2] ^ -1 * y[2]; -end); +S -> {x, y} -> x[2] ^ -1 * y[2]); InstallMethod(LambdaPerm, "for a matrix semigroup", [IsMatrixOverFiniteFieldSemigroup], S -> -function(x, y) - return MatrixOverFiniteFieldSchutzGrpElement(S, x, y); -end); +{x, y} -> MatrixOverFiniteFieldSchutzGrpElement(S, x, y)); # Returns a permutation mapping LambdaFunc(S)(x) to LambdaFunc(S)(y) so that # yx ^ -1(i) = p(i) when RhoFunc(S)(x) = RhoFunc(S)(y)!! @@ -910,18 +771,15 @@ InstallMethod(LambdaConjugator, "for a transformation semigroup", InstallMethod(LambdaConjugator, "for a partial perm semigroup", [IsPartialPermSemigroup], S -> -function(x, y) - return MappingPermListList(IMAGE_PPERM(x), IMAGE_PPERM(y)); -end); +{x, y} -> MappingPermListList(IMAGE_PPERM(x), IMAGE_PPERM(y))); InstallMethod(LambdaConjugator, "for a bipartition semigroup", [IsBipartitionSemigroup], S -> BIPART_LAMBDA_CONJ); InstallMethod(LambdaConjugator, "for a Rees 0-matrix subsemigroup", [IsReesZeroMatrixSubsemigroup], S -> -function(x, y) - return (); # FIXME(later) is this right???? This is not right!! -end); +# FIXME(later) is this right???? This is not right!! +{x, y} -> ()); InstallMethod(LambdaConjugator, "for a McAlister triple subsemigroup", [IsMcAlisterTripleSubsemigroup], @@ -938,9 +796,7 @@ end); InstallMethod(LambdaConjugator, "for a matrix semigroup", [IsMatrixOverFiniteFieldSemigroup], S -> -function(x, y) - return MatrixOverFiniteFieldLambdaConjugator(S, x, y); -end); +{x, y} -> MatrixOverFiniteFieldLambdaConjugator(S, x, y)); # the function used to test if there is an idempotent with the specified # lambda and rho values. @@ -972,15 +828,11 @@ function(j, i) end); InstallMethod(IdempotentTester, "for a McAlister triple subsemigroup", -[IsMcAlisterTripleSubsemigroup], S -> -function(x, y) - return x = y; -end); +[IsMcAlisterTripleSubsemigroup], S -> {x, y} -> x = y); InstallMethod(IdempotentTester, "for a matrix semigroup", -[IsMatrixOverFiniteFieldSemigroup], S -> function(x, y) - return MatrixOverFiniteFieldIdempotentTester(S, x, y); -end); +[IsMatrixOverFiniteFieldSemigroup], +S -> {x, y} -> MatrixOverFiniteFieldIdempotentTester(S, x, y)); # the function used to create an idempotent with the specified lambda and rho # values. @@ -1008,16 +860,15 @@ end); InstallMethod(IdempotentCreator, "for a McAlister triple subsemigroup", [IsMcAlisterTripleSubsemigroup], S -> -function(x, y) +function(x, _) local T; T := MTSEParent(Representative(S)); return MTSE(T, x, One(McAlisterTripleSemigroupGroup(T))); end); InstallMethod(IdempotentCreator, "for a matrix semigroup", -[IsMatrixOverFiniteFieldSemigroup], S -> function(x, y) - return MatrixOverFiniteFieldIdempotentCreator(S, x, y); -end); +[IsMatrixOverFiniteFieldSemigroup], +S -> {x, y} -> MatrixOverFiniteFieldIdempotentCreator(S, x, y)); # the action of elements of the stabiliser of a lambda-value on any element of # the semigroup with that lambda-value @@ -1053,9 +904,7 @@ end); InstallMethod(StabilizerAction, "for a matrix semigroup", [IsMatrixOverFiniteFieldSemigroup], S -> -function(x, y) - return MatrixOverFiniteFieldStabilizerAction(S, x, y); -end); +{x, y} -> MatrixOverFiniteFieldStabilizerAction(S, x, y)); # IsActingSemigroupWithFixedDegreeMultiplication should be if and only # if it is only possible to multiply elements of the type in the semigroup with @@ -1086,49 +935,27 @@ InstallTrueMethod(IsActingSemigroupWithFixedDegreeMultiplication, InstallMethod(SchutzGpMembership, "for a transformation semigroup", [IsTransformationSemigroup], -function(S) - return function(stab, x) - return SiftedPermutation(stab, x) = (); - end; -end); +S -> {stab, x} -> SiftedPermutation(stab, x) = ()); InstallMethod(SchutzGpMembership, "for a partial perm semigroup", [IsPartialPermSemigroup], -function(S) - return function(stab, x) - return SiftedPermutation(stab, x) = (); - end; -end); +S -> {stab, x} -> SiftedPermutation(stab, x) = ()); InstallMethod(SchutzGpMembership, "for a Rees 0-matrix subsemigroup", [IsReesZeroMatrixSubsemigroup], -function(S) - return function(stab, x) - return SiftedPermutation(stab, x) = (); - end; -end); +S -> {stab, x} -> SiftedPermutation(stab, x) = ()); InstallMethod(SchutzGpMembership, "for a McAlister triple subsemigroup", [IsMcAlisterTripleSubsemigroup], -function(S) - return function(stab, x) - return SiftedPermutation(stab, x) = (); - end; -end); +S -> {stab, x} -> SiftedPermutation(stab, x) = ()); InstallMethod(SchutzGpMembership, "for a bipartition semigroup", [IsBipartitionSemigroup], -function(S) - return function(stab, x) - return SiftedPermutation(stab, x) = (); - end; -end); +S -> {stab, x} -> SiftedPermutation(stab, x) = ()); InstallMethod(SchutzGpMembership, "for a matrix semigroup", -[IsMatrixOverFiniteFieldSemigroup], S -> -function(stab, x) - return x in stab; -end); +[IsMatrixOverFiniteFieldSemigroup], +S -> {stab, x} -> x in stab); # One or a fake one for those types of object without one. @@ -1204,12 +1031,10 @@ end); InstallMethod(ChooseHashFunction, "for an object and an int", [IsObject, IsInt], 1, -function(p, hashlen) - return rec(func := {v, data} -> 1, data := fail); -end); +{p, hashlen} -> rec(func := {v, data} -> 1, data := fail)); # The next two methods are more general than might seem necessary but -# apparently ReesZeroMatrixSemigroup's satisfying IsWholeFamily are not in +# apparently ReesZeroMatrixSemigroup'S satisfying IsWholeFamily are not in # IsActingSemigroup but their ideals are, and we still require a method for # ConvertToInternalElement as a result. diff --git a/gap/semigroups/grpperm.gi b/gap/semigroups/grpperm.gi index c2a766cd0..fd1df6e5e 100644 --- a/gap/semigroups/grpperm.gi +++ b/gap/semigroups/grpperm.gi @@ -26,7 +26,7 @@ function(S, conj) Recurse := function(S, rep, conj) local pnt, max, val, lrep, gen, i; - if Length(S.generators) = 0 then + if IsEmpty(S.generators) then return rep ^ conj; fi; pnt := S.orbit[1]; @@ -80,14 +80,12 @@ function(S) UseIsomorphismRelation(S, G); - iso := function(x) - return EvaluateWord(gen1, Factorization(S, x)); - end; + iso := x -> EvaluateWord(gen1, Factorization(S, x)); inv := function(x) local w, i; w := ExtRepOfObj(Factorization(G, x)); - if Length(w) = 0 then + if IsEmpty(w) then return MultiplicativeNeutralElement(S); fi; for i in [2, 4 .. Length(w)] do diff --git a/gap/semigroups/semibipart.gi b/gap/semigroups/semibipart.gi index 6dff90a77..e7fdf52ac 100644 --- a/gap/semigroups/semibipart.gi +++ b/gap/semigroups/semibipart.gi @@ -17,27 +17,21 @@ InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsBipartitionSemigroup, IsList], -function(filt, params) - return SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params); -end); +{filt, params} -> SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params)); InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsBipartitionMonoid, IsList], -function(filt, params) - return SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params); -end); +{filt, params} -> SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params)); InstallMethod(RandomSemigroupCons, "for IsBipartitionSemigroup and list", [IsBipartitionSemigroup, IsList], -function(filt, params) - return Semigroup(List([1 .. params[1]], i -> RandomBipartition(params[2]))); -end); +{filt, params} -> Semigroup(List([1 .. params[1]], + i -> RandomBipartition(params[2])))); InstallMethod(RandomMonoidCons, "for IsBipartitionMonoid and list", [IsBipartitionMonoid, IsList], -function(filt, params) - return Monoid(List([1 .. params[1]], i -> RandomBipartition(params[2]))); -end); +{filt, params} -> Monoid(List([1 .. params[1]], + i -> RandomBipartition(params[2])))); InstallMethod(RandomInverseSemigroupCons, "for IsBipartitionSemigroup and list", [IsBipartitionSemigroup, IsList], @@ -53,47 +47,35 @@ SEMIGROUPS.DefaultRandomInverseMonoid); InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsBlockBijectionSemigroup, IsList], -function(filt, params) - return SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params); -end); +{filt, params} -> SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params)); InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsBlockBijectionMonoid, IsList], -function(filt, params) - return SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params); -end); +{filt, params} -> SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params)); InstallMethod(RandomSemigroupCons, "for IsBlockBijectionSemigroup and a list", [IsBlockBijectionSemigroup, IsList], -function(filt, params) - return Semigroup(List([1 .. params[1]], - i -> RandomBlockBijection(params[2]))); -end); +{filt, params} -> Semigroup(List([1 .. params[1]], + i -> RandomBlockBijection(params[2])))); InstallMethod(RandomMonoidCons, "for IsBlockBijectionMonoid and a list", [IsBlockBijectionMonoid, IsList], -function(filt, params) - return Monoid(List([1 .. params[1]], - i -> RandomBlockBijection(params[2]))); -end); +{filt, params} -> Monoid(List([1 .. params[1]], + i -> RandomBlockBijection(params[2])))); InstallMethod(RandomInverseSemigroupCons, "for IsBlockBijectionSemigroup and a list", [IsBlockBijectionSemigroup, IsList], -function(filt, params) - return InverseSemigroup(List([1 .. params[1]], - i -> RandomBlockBijection(params[2]))); -end); +{filt, params} -> InverseSemigroup(List([1 .. params[1]], + i -> RandomBlockBijection(params[2])))); InstallMethod(RandomInverseMonoidCons, "for IsBlockBijectionMonoid and a list", [IsBlockBijectionMonoid, IsList], -function(filt, params) - return InverseMonoid(List([1 .. params[1]], - i -> RandomBlockBijection(params[2]))); -end); +{filt, params} -> InverseMonoid(List([1 .. params[1]], + i -> RandomBlockBijection(params[2])))); ############################################################################# ## Printing and viewing @@ -163,21 +145,15 @@ end); InstallImmediateMethod(IsBlockBijectionSemigroup, IsBipartitionSemigroup and HasGeneratorsOfSemigroup, 0, -function(S) - return ForAll(GeneratorsOfSemigroup(S), IsBlockBijection); -end); +S -> ForAll(GeneratorsOfSemigroup(S), IsBlockBijection)); InstallImmediateMethod(IsPartialPermBipartitionSemigroup, IsBipartitionSemigroup and HasGeneratorsOfSemigroup, 0, -function(S) - return ForAll(GeneratorsOfSemigroup(S), IsPartialPermBipartition); -end); +S -> ForAll(GeneratorsOfSemigroup(S), IsPartialPermBipartition)); InstallImmediateMethod(IsPermBipartitionGroup, IsBipartitionSemigroup and HasGeneratorsOfSemigroup, 0, -function(S) - return ForAll(GeneratorsOfSemigroup(S), IsPermBipartition); -end); +S -> ForAll(GeneratorsOfSemigroup(S), IsPermBipartition)); InstallMethod(IsBlockBijectionSemigroup, "for a bipartition semigroup ideal", [IsBipartitionSemigroup and IsSemigroupIdeal], @@ -285,9 +261,7 @@ InstallMethod(IsomorphismMonoid, "for IsBipartitionMonoid and a semigroup", InstallMethod(IsomorphismMonoid, "for IsBipartitionMonoid and a monoid", [IsBipartitionMonoid, IsMonoid], -function(filter, S) - return IsomorphismSemigroup(IsBipartitionSemigroup, S); -end); +{filt, S} -> IsomorphismSemigroup(IsBipartitionSemigroup, S)); # this is just a composition of IsomorphismTransformationSemigroup and the # method below for IsomorphismBipartitionSemigroup... @@ -300,7 +274,7 @@ InstallMethod(IsomorphismSemigroup, "for IsBipartitionSemigroup and a transformation semigroup with generators", [IsBipartitionSemigroup, IsTransformationSemigroup and HasGeneratorsOfSemigroup], -function(filter, S) +function(_, S) local n, T; n := Maximum(1, DegreeOfTransformationSemigroup(S)); @@ -318,7 +292,7 @@ end); InstallMethod(IsomorphismSemigroup, "for IsBipartitionSemigroup and a partial perm semigroup with generators", [IsBipartitionSemigroup, IsPartialPermSemigroup and HasGeneratorsOfSemigroup], -function(filter, S) +function(_, S) local n, T; n := Maximum(DegreeOfPartialPermSemigroup(S), @@ -336,7 +310,7 @@ InstallMethod(IsomorphismSemigroup, "for IsBipartitionSemigroup and partial perm inverse semigp with generators", [IsBipartitionSemigroup, IsPartialPermSemigroup and IsInverseSemigroup and HasGeneratorsOfInverseSemigroup], -function(filter, S) +function(_, S) local n, T; n := Maximum(DegreeOfPartialPermSemigroup(S), @@ -354,7 +328,7 @@ end); InstallMethod(IsomorphismSemigroup, "for IsBipartitionSemigroup and a perm group with generators", [IsBipartitionSemigroup, IsPermGroup and HasGeneratorsOfGroup], -function(filt, S) +function(_, S) local n, T; n := LargestMovedPoint(S); @@ -392,48 +366,51 @@ end); # this is one way, i.e. no converse method +BindGlobal("SEMIGROUPS_BlockBijectionAsPPerm", +function(x) + local blocks, n, bigblock, lookup, out, i; + + if not IsBlockBijection(x) then + TryNextMethod(); + fi; + + blocks := IntRepOfBipartition(x); + n := DegreeOfBipartition(x); + bigblock := blocks[n]; + + # find the images of [1..n] + lookup := EmptyPlist(n - 1); + for i in [1 .. n - 1] do + lookup[blocks[i + n]] := i; + od; + + # put it together + out := [1 .. n - 1] * 0; + for i in [1 .. n - 1] do + if blocks[i] <> bigblock then + out[i] := lookup[blocks[i]]; + fi; + od; + + return PartialPerm(out); +end); + InstallMethod(IsomorphismSemigroup, "for IsBlockBijectionSemigroup and a partial perm semigroup with generators", [IsBlockBijectionSemigroup, IsPartialPermSemigroup and HasGeneratorsOfSemigroup], -function(filter, S) - local n, T, inv; +function(_, S) + local n, T; n := Maximum(DegreeOfPartialPermSemigroup(S), CodegreeOfPartialPermSemigroup(S)) + 1; T := Semigroup(List(GeneratorsOfSemigroup(S), x -> AsBlockBijection(x, n))); UseIsomorphismRelation(S, T); - # AsPartialPerm for a block bijection created using AsBlockBijection with - # argument a partial perm - inv := function(x) - local blocks, n, bigblock, lookup, out, i; - - blocks := IntRepOfBipartition(x); - n := DegreeOfBipartition(x); - bigblock := blocks[n]; - - # find the images of [1..n] - lookup := EmptyPlist(n - 1); - for i in [1 .. n - 1] do - lookup[blocks[i + n]] := i; - od; - - # put it together - out := [1 .. n - 1] * 0; - for i in [1 .. n - 1] do - if blocks[i] <> bigblock then - out[i] := lookup[blocks[i]]; - fi; - od; - - return PartialPerm(out); - end; - return SemigroupIsomorphismByFunctionNC(S, T, x -> AsBlockBijection(x, n), - inv); + SEMIGROUPS_BlockBijectionAsPPerm); end); # this is one way, i.e. no converse method @@ -442,50 +419,24 @@ InstallMethod(IsomorphismSemigroup, "for an inverse partial perm semigroup with generators", [IsBlockBijectionSemigroup, IsPartialPermSemigroup and IsInverseSemigroup and HasGeneratorsOfInverseSemigroup], -function(filter, S) - local n, T, inv; +function(_, S) + local n, T; n := DegreeOfPartialPermSemigroup(S) + 1; T := InverseSemigroup(List(GeneratorsOfInverseSemigroup(S), x -> AsBlockBijection(x, n))); UseIsomorphismRelation(S, T); - # AsPartialPerm for a block bijection created using AsBlockBijection with - # argument a partial perm - inv := function(x) - local blocks, n, bigblock, lookup, out, i; - - blocks := IntRepOfBipartition(x); - n := DegreeOfBipartition(x); - bigblock := blocks[n]; - - # find the images of [1..n] - lookup := EmptyPlist(n - 1); - for i in [1 .. n - 1] do - lookup[blocks[i + n]] := i; - od; - - # put it together - out := [1 .. n - 1] * 0; - for i in [1 .. n - 1] do - if blocks[i] <> bigblock then - out[i] := lookup[blocks[i]]; - fi; - od; - - return PartialPerm(out); - end; - return SemigroupIsomorphismByFunctionNC(S, T, x -> AsBlockBijection(x, n), - inv); + SEMIGROUPS_BlockBijectionAsPPerm); end); InstallMethod(IsomorphismSemigroup, "for IsBipartitionSemigroup and a semigroup ideal", [IsBipartitionSemigroup, IsSemigroupIdeal and HasGeneratorsOfSemigroupIdeal], -function(filt, I) +function(_, I) local iso, inv, J; iso := IsomorphismSemigroup(IsBipartitionSemigroup, @@ -501,7 +452,7 @@ InstallMethod(IsomorphismSemigroup, "for IsBlockBijectionSemigroup and a semigroup ideal", [IsBlockBijectionSemigroup, IsSemigroupIdeal and HasGeneratorsOfSemigroupIdeal], -function(filt, I) +function(_, I) local iso, inv, J; iso := IsomorphismSemigroup(IsBlockBijectionSemigroup, @@ -516,16 +467,12 @@ end); InstallMethod(IsomorphismSemigroup, "for IsBlockBijectionSemigroup and a block bijection semigroup", [IsBlockBijectionSemigroup, IsBlockBijectionSemigroup], -function(filter, S) - return SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc); -end); +{filt, S} -> SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc)); InstallMethod(IsomorphismSemigroup, "for IsBipartitionSemigroup and a bipartition semigroup", [IsBipartitionSemigroup, IsBipartitionSemigroup], -function(filter, S) - return SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc); -end); +{filt, S} -> SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc)); # TODO(later) could have a method for IsomorphismSemigroup for # IsPartialPermBipartitions and IsBlockBijectionSemigroup too... or just for diff --git a/gap/semigroups/semiboolmat.gi b/gap/semigroups/semiboolmat.gi index aa44f64ba..b987df007 100644 --- a/gap/semigroups/semiboolmat.gi +++ b/gap/semigroups/semiboolmat.gi @@ -16,20 +16,16 @@ InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsBooleanMatSemigroup, IsList], -function(filt, params) - return SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params); -end); +{filt, params} -> SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params)); InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsBooleanMatMonoid, IsList], -function(filt, params) - return SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params); -end); +{filt, params} -> SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params)); InstallMethod(RandomSemigroupCons, "for IsBooleanMatSemigroup and list", [IsBooleanMatSemigroup, IsList], -function(filt, params) +function(_, params) return Semigroup(List([1 .. params[1]], i -> RandomMatrix(IsBooleanMat, params[2]))); end); @@ -37,7 +33,7 @@ end); InstallMethod(RandomMonoidCons, "for IsBooleanMatMonoid and list", [IsBooleanMatMonoid, IsList], -function(filt, params) +function(_, params) return Monoid(List([1 .. params[1]], i -> RandomMatrix(IsBooleanMat, params[2]))); end); @@ -62,9 +58,7 @@ SEMIGROUPS.DefaultIsomorphismSemigroup); InstallMethod(IsomorphismSemigroup, "for IsBooleanMatSemigroup and a boolean mat semigroup", [IsBooleanMatSemigroup, IsBooleanMatSemigroup], -function(filter, S) - return SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc); -end); +{filter, S} -> SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc)); # It seems necessary that the method below occurs after the fallback method in # this file, in order that it be selected. @@ -72,7 +66,7 @@ end); InstallMethod(IsomorphismSemigroup, "for IsBooleanMatSemigroup and a transformation semigroup", [IsBooleanMatSemigroup, IsTransformationSemigroup], -function(filter, S) +function(_, S) local n, T; n := Maximum(1, DegreeOfTransformationSemigroup(S)); T := Semigroup(List(GeneratorsOfSemigroup(S), x -> AsBooleanMat(x, n))); @@ -102,14 +96,9 @@ InstallMethod(IsomorphismMonoid, "for IsBooleanMatMonoid and a semigroup", InstallMethod(IsomorphismMonoid, "for IsBooleanMatMonoid and a monoid", [IsBooleanMatMonoid, IsMonoid], -function(filter, S) - return IsomorphismSemigroup(IsBooleanMatSemigroup, S); -end); +{filter, S} -> IsomorphismSemigroup(IsBooleanMatSemigroup, S)); InstallMethod(IsomorphismMonoid, "for IsBooleanMatMonoid and a boolean mat monoid", [IsBooleanMatMonoid, IsBooleanMatMonoid], -function(filter, S) - return SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc); -end); - +{filter, S} -> SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc)); diff --git a/gap/semigroups/semicons.gi b/gap/semigroups/semicons.gi index 56dccef8d..0c83701a1 100644 --- a/gap/semigroups/semicons.gi +++ b/gap/semigroups/semicons.gi @@ -12,10 +12,10 @@ # Trivial semigroup: main method InstallGlobalFunction(TrivialSemigroup, -function(arg) +function(arg...) local S; - if Length(arg) = 0 then + if IsEmpty(arg) then S := TrivialSemigroupCons(IsTransformationSemigroup, 0); elif Length(arg) = 1 and IsInt(arg[1]) and arg[1] >= 0 then S := TrivialSemigroupCons(IsTransformationSemigroup, arg[1]); @@ -37,7 +37,7 @@ end); InstallMethod(TrivialSemigroupCons, "for IsTransformationSemigroup and an integer", [IsTransformationSemigroup, IsInt], -function(filt, deg) +function(_, deg) if deg = 0 then return Semigroup(IdentityTransformation); fi; @@ -47,14 +47,12 @@ end); InstallMethod(TrivialSemigroupCons, "for IsPartialPermSemigroup and an integer", [IsPartialPermSemigroup, IsInt], -function(filt, n) - return Semigroup(PartialPerm([1 .. n])); -end); +{filt, n} -> Semigroup(PartialPerm([1 .. n]))); InstallMethod(TrivialSemigroupCons, "for IsBipartitionSemigroup and an integer", [IsBipartitionSemigroup, IsInt], -function(filt, deg) +function(_, deg) local n; n := Maximum(deg, 1); return Semigroup(Bipartition([Concatenation(List([1 .. n], x -> [-x, x]))])); @@ -63,7 +61,7 @@ end); InstallMethod(TrivialSemigroupCons, "for IsBlockBijectionSemigroup and an integer", [IsBlockBijectionSemigroup, IsInt], -function(filt, deg) +function(_, deg) local n; n := Maximum(deg, 1); return TrivialSemigroupCons(IsBipartitionSemigroup, n); @@ -72,7 +70,7 @@ end); InstallMethod(TrivialSemigroupCons, "for IsPBRSemigroup and an integer", [IsPBRSemigroup, IsInt], -function(filt, deg) +function(_, deg) local n; n := Maximum(deg, 1); return Semigroup(IdentityPBR(n)); @@ -81,7 +79,7 @@ end); InstallMethod(TrivialSemigroupCons, "for IsBooleanMatSemigroup and an integer", [IsBooleanMatSemigroup, IsInt], -function(filt, deg) +function(_, deg) local n; n := Maximum(deg, 1); return Semigroup(BooleanMat(List([1 .. n], x -> BlistList([1 .. n], [x])))); @@ -114,7 +112,7 @@ Unbind(_IsXSemigroup); # Monogenic semigroup: main method InstallGlobalFunction(MonogenicSemigroup, -function(arg) +function(arg...) local filter, m, r, S; if Length(arg) = 2 then @@ -155,13 +153,13 @@ end); InstallMethod(MonogenicSemigroupCons, "for a IsTransformationSemigroup and two positive integers", [IsTransformationSemigroup, IsPosInt, IsPosInt], -function(filter, m, r) +function(_, m, r) local t; t := [1 .. r] + 1; t[r] := 1; - if not m = 1 then # m = 1 specifies a cyclic group + if m <> 1 then # m = 1 specifies a cyclic group Append(t, [1 .. m] + r - 1); fi; @@ -171,7 +169,7 @@ end); InstallMethod(MonogenicSemigroupCons, "for a IsPartialPermSemigroup and two positive integers", [IsPartialPermSemigroup, IsPosInt, IsPosInt], -function(filter, m, r) +function(_, m, r) local cyclic_group, nilpotent_offset, nilpotent, im; if m = 1 and r = 1 then @@ -193,14 +191,12 @@ end); InstallMethod(MonogenicSemigroupCons, "for a IsBipartitionSemigroup and two positive integers", [IsBipartitionSemigroup, IsPosInt, IsPosInt], -function(filter, m, r) - return MonogenicSemigroupCons(IsBlockBijectionSemigroup, m, r); -end); +{filter, m, r} -> MonogenicSemigroupCons(IsBlockBijectionSemigroup, m, r)); InstallMethod(MonogenicSemigroupCons, "for IsBlockBijectionSemigroup and two positive integers", [IsBlockBijectionSemigroup, IsPosInt, IsPosInt], -function(filter, m, r) +function(_, m, r) local out, offset, i; if m = 1 and r = 1 then @@ -218,7 +214,7 @@ function(filter, m, r) offset := r + 1; fi; - if not m = 1 then + if m <> 1 then Add(out, [offset, -offset, offset + 1, -(offset + m)]); for i in [offset + 2 .. offset + m] do Add(out, [i, -i + 1]); @@ -254,7 +250,7 @@ Unbind(_IsXSemigroup); # Rectangular band: main method InstallGlobalFunction(RectangularBand, -function(arg) +function(arg...) local filter, m, n, S; if Length(arg) = 2 then @@ -340,7 +336,7 @@ end); InstallMethod(RectangularBandCons, "for a filter and two positive integers", [IsBipartitionSemigroup, IsPosInt, IsPosInt], -function(filter, m, n) +function(_, m, n) local max, min, out, nrpoints, partitions, neg, i; max := Maximum(m, n); @@ -374,7 +370,7 @@ end); InstallMethod(RectangularBandCons, "for a filter and a positive integer and positive integer", [IsReesMatrixSemigroup, IsPosInt, IsPosInt], -function(filter, m, n) +function(_, m, n) local id, mat; id := (); @@ -413,7 +409,7 @@ Unbind(_IsXSemigroup); # Zero semigroup: main method InstallGlobalFunction(ZeroSemigroup, -function(arg) +function(arg...) local filter, n, S; if Length(arg) = 1 then @@ -446,7 +442,7 @@ end); InstallMethod(ZeroSemigroupCons, "for IsTransformationSemigroup and a positive integer", [IsTransformationSemigroup, IsPosInt], -function(filter, n) +function(_, n) local out, max, deg, N, R, gens, im, iter, r, i; if n = 1 then @@ -487,7 +483,7 @@ end); InstallMethod(ZeroSemigroupCons, "for IsPartialPermSemigroup and a positive integer", [IsPartialPermSemigroup, IsPosInt], -function(filter, n) +function(_, n) local zero, gens, out, i; zero := PartialPerm([], []); @@ -507,7 +503,7 @@ end); InstallMethod(ZeroSemigroupCons, "for a filter and a positive integer", [IsBlockBijectionSemigroup, IsPosInt], -function(filter, n) +function(_, n) local zero, gens, points, pair, out, i; if n = 1 then @@ -534,7 +530,7 @@ end); InstallMethod(ZeroSemigroupCons, "for a filter and a positive integer", [IsBipartitionSemigroup, IsPosInt], -function(filter, n) +function(_, n) local zero, out; if n = 2 then @@ -551,7 +547,7 @@ end); InstallMethod(ZeroSemigroupCons, "for a IsReesZeroMatrixSemigroup and a positive integer", [IsReesZeroMatrixSemigroup, IsPosInt], -function(filter, n) +function(_, n) local mat; if n = 1 then @@ -585,7 +581,7 @@ Unbind(_IsXSemigroup); # Left zero semigroup: main method InstallGlobalFunction(LeftZeroSemigroup, -function(arg) +function(arg...) local filt, n, S, max, deg, N, R, gens, im, iter, r, i; if Length(arg) = 1 then @@ -637,7 +633,7 @@ end); # Right zero semigroup: main method InstallGlobalFunction(RightZeroSemigroup, -function(arg) +function(arg...) local filt, n, S, max, deg, ker, add, iter, gens, i; if Length(arg) = 1 then @@ -704,7 +700,7 @@ function(arg) end); InstallGlobalFunction(BrandtSemigroup, -function(arg) +function(arg...) local S; if Length(arg) = 1 and IsPosInt(arg[1]) then @@ -730,7 +726,7 @@ end); InstallMethod(BrandtSemigroupCons, "for IsPartialPermSemigroup, a perm group, and a positive integer", [IsPartialPermSemigroup, IsPermGroup, IsPosInt], -function(filter, G, n) +function(_, G, n) local gens, one, m, i, x; gens := []; @@ -764,7 +760,7 @@ end); InstallMethod(BrandtSemigroupCons, "for IsReesZeroMatrixSemigroup, a finite group, and a positive integer", [IsReesZeroMatrixSemigroup, IsGroup and IsFinite, IsPosInt], -function(filter, G, n) +function(_, G, n) local mat, i; mat := []; for i in [1 .. n] do @@ -967,9 +963,7 @@ end); InstallMethod(Size, "for a strong semilattice of semigroups", [IsStrongSemilatticeOfSemigroups], -function(S) - return Sum(SemigroupsOfStrongSemilatticeOfSemigroups(S), Size); -end); +{S} -> Sum(SemigroupsOfStrongSemilatticeOfSemigroups(S), Size)); InstallMethod(ViewString, "for a strong semilattice of semigroups", [IsStrongSemilatticeOfSemigroups], @@ -999,14 +993,10 @@ end); InstallMethod(\=, "for SSSEs", IsIdenticalObj, [IsSSSERep, IsSSSERep], -function(x, y) - return x![1] = y![1] and x![2] = y![2] and x![3] = y![3]; -end); +{x, y} -> x![1] = y![1] and x![2] = y![2] and x![3] = y![3]); InstallMethod(\<, "for SSSEs", IsIdenticalObj, [IsSSSERep, IsSSSERep], -function(x, y) - return (x![2] < y![2]) or (x![2] = y![2] and x![3] < y![3]); -end); +{x, y} -> (x![2] < y![2]) or (x![2] = y![2] and x![3] < y![3])); InstallMethod(\*, "for SSSEs", IsIdenticalObj, [IsSSSERep, IsSSSERep], @@ -1020,14 +1010,8 @@ function(x, y) (x![3] ^ (maps[meet][x![2]])) * (y![3] ^ (maps[meet][y![2]]))); end); -InstallMethod(ViewString, "for a SSSE", -[IsSSSERep], -function(x) - return Concatenation("SSSE(", ViewString(x![2]), ", ", ViewString(x![3]), ")"); -end); +InstallMethod(ViewString, "for a SSSE", [IsSSSERep], +x -> Concatenation("SSSE(", ViewString(x![2]), ", ", ViewString(x![3]), ")")); -InstallMethod(UnderlyingSemilatticeOfSemigroups, "for a SSSE rep", -[IsSSSERep], -function(x) - return x![1]; -end); +InstallMethod(UnderlyingSemilatticeOfSemigroups, "for a SSSE", +[IsSSSERep], x -> x![1]); diff --git a/gap/semigroups/semidp.gi b/gap/semigroups/semidp.gi index 13c7e611d..960e544df 100644 --- a/gap/semigroups/semidp.gi +++ b/gap/semigroups/semidp.gi @@ -52,7 +52,7 @@ SEMIGROUPS.DirectProductOp := function(S, degree, convert, combine, restrict) fi; n := Length(S); - gens_old := List(S, i -> f(i)); + gens_old := List(S, f); gens_new := List([1 .. n], i -> []); indecomp := List([1 .. n], i -> []); pre_mult := List([1 .. n], i -> []); @@ -210,9 +210,7 @@ SEMIGROUPS.DirectProductOp := function(S, degree, convert, combine, restrict) [convert(x, degrees[i], offsets[i])], idems{[i + 1 .. n]})); end; - projection := function(x, i) - return restrict(x, offsets[i], degrees[i]); - end; + projection := {x, i} -> restrict(x, offsets[i], degrees[i]); SetSemigroupDirectProductInfo(D, rec(factors := S, nrfactors := n, embedding := embedding, @@ -239,9 +237,8 @@ function(list, S) fi; combine := x -> Transformation(Concatenation(x)); - convert := function(element, degree, offset) - return ImageListOfTransformation(element, degree) + offset; - end; + convert := {element, degree, offset} -> + ImageListOfTransformation(element, degree) + offset; restrict := function(element, offset, degree) local im; im := ImageListOfTransformation(element, offset + degree); @@ -271,7 +268,7 @@ function(list, S) CodegreeOfPartialPermSemigroup(S)); combine := x -> PartialPerm(Concatenation(List(x, y -> y[1])), Concatenation(List(x, y -> y[2]))); - convert := function(element, degree, offset) + convert := function(element, _, offset) return [DomainOfPartialPerm(element) + offset, ImageListOfPartialPerm(element) + offset]; end; @@ -307,7 +304,7 @@ function(list, S) fi; combine := x -> Bipartition(Concatenation(x)); - convert := function(element, degree, offset) + convert := function(element, _, offset) local x, i, j; x := List(ExtRepOfObj(element), ShallowCopy); for i in [1 .. Length(x)] do @@ -339,8 +336,11 @@ function(list, S) od; return Bipartition(new_bipartition); end; - return SEMIGROUPS.DirectProductOp(list, DegreeOfBipartitionSemigroup, convert, - combine, restrict); + return SEMIGROUPS.DirectProductOp(list, + DegreeOfBipartitionSemigroup, + convert, + combine, + restrict); end); # PBR semigroups diff --git a/gap/semigroups/semieunit.gi b/gap/semigroups/semieunit.gi index b4c9e4dd5..a4cbdb819 100644 --- a/gap/semigroups/semieunit.gi +++ b/gap/semigroups/semieunit.gi @@ -21,9 +21,7 @@ function(G, X, Y, act) ErrorNoReturn("the 1st argument (a group) is not finite"); fi; - anti_act := function(pt, g) - return act(pt, g ^ -1); - end; + anti_act := {pt, g} -> act(pt, g ^ -1); hom := ActionHomomorphism(G, DigraphVertices(X), anti_act); @@ -38,7 +36,7 @@ function(G, X, Y, act) fi; # Check that Y is a semilattice and an induced subdigraph of X - if not Y = InducedSubdigraph(X, DigraphVertexLabels(Y)) then + if Y <> InducedSubdigraph(X, DigraphVertexLabels(Y)) then ErrorNoReturn("the 3rd argument (a digraph) must be an induced ", "subdigraph of the 2nd argument (a digraph) with ", "vertex labels corresponding to the vertices of on ", @@ -118,22 +116,21 @@ end); InstallMethod(McAlisterTripleSemigroup, "for a perm group, digraph, and digraph", [IsPermGroup, IsDigraph, IsDigraph], -function(G, X, Y) - return McAlisterTripleSemigroup(G, X, Y, OnPoints); -end); +{G, X, Y} -> McAlisterTripleSemigroup(G, X, Y, OnPoints)); InstallMethod(McAlisterTripleSemigroup, "for a perm group, digraph, homogeneous list, and action", [IsGroup, IsDigraph, IsHomogeneousList, IsFunction], -function(G, X, sub_ver, act) - return McAlisterTripleSemigroup(G, X, InducedSubdigraph(X, sub_ver), act); -end); +{G, X, sub_ver, act} -> + McAlisterTripleSemigroup(G, X, InducedSubdigraph(X, sub_ver), act)); InstallMethod(McAlisterTripleSemigroup, "for a perm group, digraph, and homogeneous list", [IsPermGroup, IsDigraph, IsHomogeneousList], function(G, X, sub_ver) - return McAlisterTripleSemigroup(G, X, InducedSubdigraph(X, sub_ver), + return McAlisterTripleSemigroup(G, + X, + InducedSubdigraph(X, sub_ver), OnPoints); end); @@ -143,9 +140,7 @@ end); InstallMethod(OneImmutable, "for a McAlister triple semigroup element", [IsMcAlisterTripleSemigroupElement], -function(x) - return OneImmutable(MTSEParent(x)); -end); +x -> OneImmutable(MTSEParent(x))); InstallMethod(OneImmutable, "for a McAlister triple semigroup element collection", @@ -304,7 +299,7 @@ function(S, T) # DigraphVertexLabels(YT) then we need to compose iso_x with an # automorphism of McAlisterTripleSemilattice(T). Composing this with # iso_x will restrict to an isomorphism from (the labels of) YS to YT. - if not im_YS = DigraphVertexLabels(YT) then + if im_YS <> DigraphVertexLabels(YT) then A := AutomorphismGroup(XT); rep := RepresentativeAction(A, im_YS, DigraphVertexLabels(YT), OnSets); if rep = fail then @@ -332,65 +327,47 @@ end); InstallMethod(McAlisterTripleSemigroupGroup, "for a McAlister triple subsemigroup", [IsMcAlisterTripleSubsemigroup], -function(S) - return McAlisterTripleSemigroupGroup(MTSEParent(Representative(S))); -end); +S -> McAlisterTripleSemigroupGroup(MTSEParent(Representative(S)))); InstallMethod(McAlisterTripleSemigroupPartialOrder, "for a McAlister triple subsemigroup", [IsMcAlisterTripleSubsemigroup], -function(S) - return McAlisterTripleSemigroupPartialOrder(MTSEParent(Representative(S))); -end); +S -> McAlisterTripleSemigroupPartialOrder(MTSEParent(Representative(S)))); InstallMethod(McAlisterTripleSemigroupSemilattice, "for a McAlister triple subsemigroup", [IsMcAlisterTripleSubsemigroup], -function(S) - return McAlisterTripleSemigroupSemilattice(MTSEParent(Representative(S))); -end); +S -> McAlisterTripleSemigroupSemilattice(MTSEParent(Representative(S)))); InstallMethod(McAlisterTripleSemigroupAction, "for a McAlister triple subsemigroup", [IsMcAlisterTripleSubsemigroup], -function(S) - return McAlisterTripleSemigroupAction(MTSEParent(Representative(S))); -end); +S -> McAlisterTripleSemigroupAction(MTSEParent(Representative(S)))); InstallMethod(McAlisterTripleSemigroupActionHomomorphism, "for a McAlister triple subsemigroup", [IsMcAlisterTripleSubsemigroup], -function(S) - return MTSActionHomomorphism(MTSEParent(Representative(S))); -end); +S -> MTSActionHomomorphism(MTSEParent(Representative(S)))); InstallMethod(McAlisterTripleSemigroupUnderlyingAction, "for a McAlister triple subsemigroup", [IsMcAlisterTripleSubsemigroup], -function(S) - return MTSUnderlyingAction(MTSEParent(Representative(S))); -end); +S -> MTSUnderlyingAction(MTSEParent(Representative(S)))); InstallMethod(McAlisterTripleSemigroupComponents, "for a McAlister triple subsemigroup", [IsMcAlisterTripleSubsemigroup], -function(S) - return MTSComponents(MTSEParent(Representative(S))); -end); +S -> MTSComponents(MTSEParent(Representative(S)))); InstallMethod(McAlisterTripleSemigroupQuotientDigraph, "for a McAlister triple subsemigroup", [IsMcAlisterTripleSubsemigroup], -function(S) - return MTSQuotientDigraph(MTSEParent(Representative(S))); -end); +S -> MTSQuotientDigraph(MTSEParent(Representative(S)))); InstallMethod(McAlisterTripleSemigroupSemilatticeVertexLabelInverseMap, "for a McAlister triple subsemigroup", [IsMcAlisterTripleSubsemigroup], -function(S) - return MTSSemilatticeVertexLabelInverseMap(MTSEParent(Representative(S))); -end); +S -> MTSSemilatticeVertexLabelInverseMap(MTSEParent(Representative(S)))); SEMIGROUPS.MTSSmallGen := function(S) local G, Sl, X_Y, Y_X, comps, RepAct, _Stab, act, gens, po, top, sl, above, c, @@ -405,7 +382,7 @@ SEMIGROUPS.MTSSmallGen := function(S) if McAlisterTripleSemigroupUnderlyingAction(S) = OnPoints then RepAct := {a, b} -> RepresentativeAction(G, b, a); - _Stab := {a} -> Stabilizer(G, a); + _Stab := a -> Stabilizer(G, a); else # Can't use McAlisterTripleSemigroupAction because it is an anti-action # but not an action and produces unexpected results with some of these @@ -413,7 +390,7 @@ SEMIGROUPS.MTSSmallGen := function(S) act := McAlisterTripleSemigroupUnderlyingAction(S); RepAct := {a, b} -> RepresentativeAction(G, b, a, act); gens := Generators(G); - _Stab := {a} -> Stabilizer(G, a, act); + _Stab := a -> Stabilizer(G, a, act); fi; # We use reflexive transitive reductions so we can only check neighbours @@ -441,7 +418,7 @@ SEMIGROUPS.MTSSmallGen := function(S) elif IsEmpty(stab) then # If D-class is just a single element, add it. Add(gens, MTSE(S, c[1], One(G))); fi; - Add(gens, MTSE(S, c[Length(c)], RepAct(c[1], c[Length(c)]))); + Add(gens, MTSE(S, Last(c), RepAct(c[1], Last(c)))); else # We may have already generated some elements of this D-class. @@ -563,7 +540,7 @@ end; InstallMethod(IsomorphismSemigroup, "for IsMcAlisterTripleSemigroup and a semigroup", [IsMcAlisterTripleSemigroup, IsSemigroup], -function(filt, S) +function(_, S) local Es, iso_pg, G, H, map, xx, M, iso, yy, ids, cong, grp, hom, map_G, Dcl, n, cosets, x, xiny, yinx, D, s, R, e, Ge, h, y_pos, x_pos, act, ah, edgy, act2, i, isom; @@ -582,9 +559,7 @@ function(filt, S) xx := Digraph([[1]]); M := McAlisterTripleSemigroup(H, xx, xx); - iso := function(s) - return MTSE(M, 1, (s ^ iso_pg) ^ map); - end; + iso := s -> MTSE(M, 1, (s ^ iso_pg) ^ map); isom := SemigroupHomomorphismByFunctionNC(S, M, iso); SetIsBijective(isom, true); return isom; @@ -641,15 +616,9 @@ function(filt, S) yy := DigraphReflexiveTransitiveClosure(yy); SetDigraphVertexLabels(yy, yinx); - act2 := function(a, g) - return a ^ (g ^ ah); - end; - + act2 := {a, g} -> a ^ (g ^ ah); M := McAlisterTripleSemigroup(G, xx, yy, act2); - - iso := function(s) - return MTSE(M, yinx[Position(ids, LeftOne(s))], s ^ map_G); - end; + iso := s -> MTSE(M, yinx[Position(ids, LeftOne(s))], s ^ map_G); isom := SemigroupHomomorphismByFunctionNC(S, M, iso); SetIsBijective(isom, true); @@ -659,9 +628,7 @@ end); InstallMethod(IsWholeFamily, "for a McAlister triple semigroup", [IsMcAlisterTripleSemigroupElementCollection], -function(C) - return Size(Elements(C)[1]![3]) = Size(C); -end); +C -> Size(Elements(C)[1]![3]) = Size(C)); ############################################################################# # Methods for McAlister triple elements @@ -698,9 +665,7 @@ end); InstallMethod(McAlisterTripleSemigroupElementParent, "for a McAlister triple semigroup element rep", [IsMcAlisterTripleSemigroupElementRep], -function(x) - return x![3]; -end); +{x} -> x![3]); InstallMethod(String, "for a McAlister triple semigroup element rep", [IsMcAlisterTripleSemigroupElementRep], @@ -713,26 +678,19 @@ end); InstallMethod(ViewString, "for a McAlister triple semigroup element rep", [IsMcAlisterTripleSemigroupElementRep], -function(x) - return Concatenation("(", ViewString(x[1]), ", ", ViewString(x[2]), ")"); -end); +{x} -> Concatenation("(", ViewString(x[1]), ", ", ViewString(x[2]), ")")); InstallMethod(\=, "for two McAlister triple semigroup element reps", IsIdenticalObj, [IsMcAlisterTripleSemigroupElementRep, IsMcAlisterTripleSemigroupElementRep], -function(x, y) - if x![1] = y![1] and x![2] = y![2] and x![3] = y![3] then - return true; - fi; - return false; -end); +{x, y} -> x![1] = y![1] and x![2] = y![2] and x![3] = y![3]); InstallMethod(\*, "for two McAlister triple semigroup element reps", [IsMcAlisterTripleSemigroupElementRep, IsMcAlisterTripleSemigroupElementRep], function(x, y) local S; S := McAlisterTripleSemigroupElementParent(x); - if not S = McAlisterTripleSemigroupElementParent(y) then + if S <> McAlisterTripleSemigroupElementParent(y) then ErrorNoReturn("the arguments (McAlister triple elements) do not ", "belong to the same McAlister triple semigroup"); fi; @@ -745,22 +703,19 @@ end); InstallMethod(\<, "for two McAlister triple semigroup element reps", [IsMcAlisterTripleSemigroupElementRep, IsMcAlisterTripleSemigroupElementRep], -function(x, y) - return x[1] < y[1] or (x[1] = y[1] and x[2] < y[2]); -end); +{x, y} -> x[1] < y[1] or (x[1] = y[1] and x[2] < y[2])); InstallMethod(InverseOp, "for a McAlister triple semigroup element rep", [IsMcAlisterTripleSemigroupElementRep], function(x) - return MTSE(x![3], McAlisterTripleSemigroupAction(x![3])(x[1], Inverse(x[2])), - Inverse(x[2])); + return MTSE(x![3], + McAlisterTripleSemigroupAction(x![3])(x[1], Inverse(x[2])), + Inverse(x[2])); end); InstallMethod(\^, "for a McAlister triple semigroup element and a negative int", - [IsMcAlisterTripleSemigroupElement, IsNegInt], -function(x, i) - return InverseOp(x ^ - i); -end); +[IsMcAlisterTripleSemigroupElement, IsNegInt], +{x, i} -> InverseOp(x ^ - i)); InstallMethod(LeftOne, "for a McAlister triple semigroup element rep", [IsMcAlisterTripleSemigroupElementRep], @@ -819,17 +774,13 @@ end); InstallMethod(IsFInverseMonoid, "for a McAlister triple semigroup", [IsMcAlisterTripleSemigroup], -function(S) - return IsMonoid(S) and IsFInverseSemigroup(S); -end); +S -> IsMonoid(S) and IsFInverseSemigroup(S)); # A McAlister triple semigroup is F-inverse precisely when X, the partial # order, is a join-semilattice. InstallMethod(IsFInverseSemigroup, "for a McAlister triple semigroup", [IsMcAlisterTripleSemigroup], -function(S) - return IsJoinSemilatticeDigraph(McAlisterTripleSemigroupPartialOrder(S)); -end); +S -> IsJoinSemilatticeDigraph(McAlisterTripleSemigroupPartialOrder(S))); # For an inverse semigroup S we denote \sigma_{e,f} = \sigma \cap eSf x eSf. # An E-unitary inverse semigroup is said to be an F-inverse semigroup if diff --git a/gap/semigroups/semiex.gi b/gap/semigroups/semiex.gi index 3743b2298..67696fefe 100644 --- a/gap/semigroups/semiex.gi +++ b/gap/semigroups/semiex.gi @@ -325,9 +325,7 @@ function(d, q) end); InstallMethod(MunnSemigroup, "for a semilattice", [IsSemigroup], -function(S) - return InverseSemigroup(GeneratorsOfMunnSemigroup(S), rec(small := true)); -end); +S -> InverseSemigroup(GeneratorsOfMunnSemigroup(S), rec(small := true))); InstallMethod(GeneratorsOfMunnSemigroup, "for a semilattice", [IsSemigroup], function(S) @@ -356,7 +354,7 @@ function(S) Add(su[Length(x)], gr); od; - out := [PartialPerm(id[Length(id)][1], id[Length(id)][1])]; + out := [PartialPerm(Last(id)[1], Last(id)[1])]; for i in [Length(id), Length(id) - 1 .. 3] do if not IsBound(id[i]) then @@ -987,12 +985,8 @@ function(m, n) return S; end); -InstallMethod(PlanarPartitionMonoid, -"for a positive integer", -[IsPosInt], -function(n) - return PlanarModularPartitionMonoid(1, n); -end); +InstallMethod(PlanarPartitionMonoid, "for a positive integer", +[IsPosInt], n -> PlanarModularPartitionMonoid(1, n)); InstallMethod(ModularPartitionMonoid, "for a positive integer and positive integer", diff --git a/gap/semigroups/semiffmat.gi b/gap/semigroups/semiffmat.gi index 860e1e072..be898e7ad 100644 --- a/gap/semigroups/semiffmat.gi +++ b/gap/semigroups/semiffmat.gi @@ -52,16 +52,14 @@ end); InstallMethod(IsomorphismSemigroup, "for IsMatrixOverFiniteFieldSemigroup and a finite field matrix semigroup", [IsMatrixOverFiniteFieldSemigroup, IsMatrixOverFiniteFieldSemigroup], -function(filt, S) - return SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc); -end); +{filt, S} -> SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc)); InstallMethod(IsomorphismSemigroup, "for IsMatrixOverFiniteFieldSemigroup, ring, and matrix over ff semigroup", [IsMatrixOverFiniteFieldSemigroup, IsRing, IsMatrixOverFiniteFieldSemigroup], -function(filt, R, S) +function(_, R, S) local D, map, inv, T; D := BaseDomain(Representative(S)); if D = R then @@ -82,7 +80,7 @@ InstallMethod(IsomorphismSemigroup, "for IsMatrixOverFiniteFieldSemigroup and a semigroup of matrices over a ff", [IsMatrixOverFiniteFieldSemigroup, IsSemigroup and HasGeneratorsOfSemigroup and IsFFECollCollColl], -function(filt, S) +function(_, S) local R, map, T; # The following line is required because of the weirdness in constructor # method selection, if the method for IsMatrixOverFiniteFieldSemigroup was @@ -102,7 +100,7 @@ InstallMethod(IsomorphismSemigroup, [IsMatrixOverFiniteFieldSemigroup, IsRing, IsSemigroup and HasGeneratorsOfSemigroup and IsFFECollCollColl], -function(filt, R, S) +function(_, R, S) local D, map, T; # The following line is required because of the weirdness in constructor # method selection, if the method for IsMatrixOverFiniteFieldSemigroup was @@ -125,16 +123,14 @@ InstallMethod(IsomorphismSemigroup, "for IsMatrixOverFiniteFieldSemigroup and transformation semigroup with gens", [IsMatrixOverFiniteFieldSemigroup, IsTransformationSemigroup and HasGeneratorsOfSemigroup], - function(filt, S) - return IsomorphismSemigroup(IsMatrixOverFiniteFieldSemigroup, GF(2), S); -end); + {filt, S} -> IsomorphismSemigroup(IsMatrixOverFiniteFieldSemigroup, GF(2), S)); InstallMethod(IsomorphismSemigroup, "for IsMatrixOverFiniteFieldSemigroup, a ring, and a transformation semigroup", [IsMatrixOverFiniteFieldSemigroup, IsRing, IsTransformationSemigroup and HasGeneratorsOfSemigroup], -function(filt, R, S) +function(_, R, S) local n, basis, map, iso, inv, gens; if not (IsField(R) and IsFinite(R)) then @@ -194,30 +190,22 @@ end); InstallMethod(IsomorphismMonoid, "for IsMatrixOverFiniteFieldMonoid and a monoid", [IsMatrixOverFiniteFieldMonoid, IsMonoid], -function(filter, S) - return IsomorphismSemigroup(IsMatrixOverFiniteFieldSemigroup, S); -end); +{filt, S} -> IsomorphismSemigroup(IsMatrixOverFiniteFieldSemigroup, S)); InstallMethod(IsomorphismMonoid, "for IsMatrixOverFiniteFieldMonoid, a ring, and a monoid", [IsMatrixOverFiniteFieldMonoid, IsRing, IsMonoid], -function(filter, R, S) - return IsomorphismSemigroup(IsMatrixOverFiniteFieldSemigroup, R, S); -end); +{filt, R, S} -> IsomorphismSemigroup(IsMatrixOverFiniteFieldSemigroup, R, S)); InstallMethod(IsomorphismMonoid, "for IsMatrixOverFiniteFieldMonoid and a matrix over finite field monoid", [IsMatrixOverFiniteFieldMonoid, IsMatrixOverFiniteFieldMonoid], -function(filter, S) - return SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc); -end); +{filt, S} -> SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc)); InstallMethod(IsomorphismMonoid, "for IsMatrixOverFiniteFieldMonoid, a ring, and a matrix over ff monoid", [IsMatrixOverFiniteFieldMonoid, IsRing, IsMatrixOverFiniteFieldMonoid], -function(filter, R, S) - return IsomorphismSemigroup(IsMatrixOverFiniteFieldSemigroup, R, S); -end); +{filt, R, S} -> IsomorphismSemigroup(IsMatrixOverFiniteFieldSemigroup, R, S)); ############################################################################# # 3. Viewing and printing @@ -281,7 +269,7 @@ end); InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsMatrixOverFiniteFieldSemigroup, IsList], -function(filt, params) +function(_, params) if Length(params) < 1 then # nr gens params[1] := Random(1, 20); @@ -314,15 +302,13 @@ end); InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsMatrixOverFiniteFieldMonoid, IsList], -function(filt, params) - return SEMIGROUPS_ProcessRandomArgsCons(IsMatrixOverFiniteFieldSemigroup, - params); -end); +{filt, params} -> +SEMIGROUPS_ProcessRandomArgsCons(IsMatrixOverFiniteFieldSemigroup, params)); InstallMethod(RandomSemigroupCons, "for IsMatrixOverFiniteFieldSemigroup and list", [IsMatrixOverFiniteFieldSemigroup, IsList], -function(filt, params) # params = [nrgens, dim, field, ranks] +function(_, params) # params = [nrgens, dim, field, ranks] return Semigroup(List([1 .. params[1]], i -> RandomMatrix(params[3], params[2], params[4]))); @@ -331,7 +317,7 @@ end); InstallMethod(RandomMonoidCons, "for IsMatrixOverFiniteFieldMonoid and list", [IsMatrixOverFiniteFieldMonoid, IsList], -function(filt, params) # params = [nrgens, dim, field, ranks] +function(_, params) # params = [nrgens, dim, field, ranks] return Monoid(List([1 .. params[1]], i -> RandomMatrix(params[3], params[2], params[4]))); @@ -365,9 +351,7 @@ InstallMethod(BaseDomain, "for a matrix over finite field semigroup", InstallMethod(IsGeneratorsOfInverseSemigroup, "for an ffe coll coll coll ", [IsFFECollCollColl], -function(coll) - return IsGeneratorsOfSemigroup(coll) and ForAll(coll, x -> x ^ -1 <> fail); -end); +coll -> IsGeneratorsOfSemigroup(coll) and ForAll(coll, x -> x ^ -1 <> fail)); ############################################################################# # 5. Methods for acting semigroups setup diff --git a/gap/semigroups/semifp.gi b/gap/semigroups/semifp.gi index 8eed223b2..2b0d77396 100644 --- a/gap/semigroups/semifp.gi +++ b/gap/semigroups/semifp.gi @@ -59,9 +59,7 @@ S -> NrEquivalenceClasses(UnderlyingCongruence(S))); InstallMethod(Size, "for an fp semigroup with nice monomorphism", [IsFpSemigroup and HasNiceMonomorphism], -function(S) - return Size(Range(NiceMonomorphism(S))); -end); +S -> Size(Range(NiceMonomorphism(S)))); InstallMethod(AsList, "for an fp semigroup with nice monomorphism", [IsFpSemigroup and HasNiceMonomorphism], @@ -79,9 +77,8 @@ function(S) enum.map := NiceMonomorphism(S); - enum.NumberElement := function(enum, x) - return PositionCanonical(Range(enum!.map), x ^ enum!.map); - end; + enum.NumberElement := {enum, x} -> + PositionCanonical(Range(enum!.map), x ^ enum!.map); enum.ElementNumber := function(enum, nr) return EnumeratorCanonical(Range(enum!.map))[nr] @@ -90,13 +87,9 @@ function(S) enum.Length := enum -> Size(S); - enum.Membership := function(x, enum) - return x ^ enum!.map in Range(enum!.map); - end; + enum.Membership := {x, enum} -> x ^ enum!.map in Range(enum!.map); - enum.IsBound\[\] := function(enum, nr) - return nr <= Size(S); - end; + enum.IsBound\[\] := {enum, nr} -> nr <= Size(S); return EnumeratorByFunctions(S, enum); end); @@ -202,8 +195,7 @@ end); InstallMethod(PrintString, "for a free monoid with known generators", [IsFreeMonoid and HasGeneratorsOfMonoid], String); -InstallMethod(PrintObj, "for a free monoid with known generators", -[IsFreeMonoid and HasGeneratorsOfMonoid], +BindGlobal("SEMIGROUPS_FreeSemigroupMonoidPrintObj", function(M) if UserPreference("semigroups", "ViewObj") <> "semigroups-pkg" then @@ -214,6 +206,18 @@ function(M) return; end); +BindGlobal("SEMIGROUPS_FreeSemigroupMonoidString", +function(M) + if UserPreference("semigroups", "ViewObj") <> "semigroups-pkg" then + TryNextMethod(); + fi; + return String(M); +end); + +InstallMethod(PrintObj, "for a free monoid with known generators", +[IsFreeMonoid and HasGeneratorsOfMonoid], +SEMIGROUPS_FreeSemigroupMonoidPrintObj); + InstallMethod(String, "for a free semigroup with known generators", [IsFreeSemigroup and HasGeneratorsOfSemigroup], function(M) @@ -231,15 +235,7 @@ InstallMethod(PrintString, "for a free semigroup with known generators", InstallMethod(PrintObj, "for a free semigroup with known generators", [IsFreeSemigroup and HasGeneratorsOfSemigroup], -function(M) - - if UserPreference("semigroups", "ViewObj") <> "semigroups-pkg" then - TryNextMethod(); - fi; - - Print(PrintString(M)); - return; -end); +SEMIGROUPS_FreeSemigroupMonoidPrintObj); ############################################################################# # Viewing and printing - free monoids and semigroups @@ -269,27 +265,12 @@ end); InstallMethod(PrintString, "for an f.p. monoid with known generators", [IsFpMonoid and HasGeneratorsOfMonoid], -function(M) - - if UserPreference("semigroups", "ViewObj") <> "semigroups-pkg" then - TryNextMethod(); - fi; - - return String(M); -end); +SEMIGROUPS_FreeSemigroupMonoidString); InstallMethod(PrintObj, "for an f.p. monoid with known generators", [IsFpMonoid and HasGeneratorsOfMonoid], 4, # to beat the library method -function(M) - - if UserPreference("semigroups", "ViewObj") <> "semigroups-pkg" then - TryNextMethod(); - fi; - - Print(PrintString(M)); - return; -end); +SEMIGROUPS_FreeSemigroupMonoidPrintObj); InstallMethod(ViewString, "for an f.p. monoid with known generators", [IsFpMonoid and HasGeneratorsOfMonoid], @@ -331,27 +312,12 @@ end); InstallMethod(PrintString, "for an f.p. semigroup with known generators", [IsFpSemigroup and HasGeneratorsOfSemigroup], -function(M) - - if UserPreference("semigroups", "ViewObj") <> "semigroups-pkg" then - TryNextMethod(); - fi; - - return String(M); -end); +SEMIGROUPS_FreeSemigroupMonoidString); InstallMethod(PrintObj, "for an f.p. semigroup with known generators", [IsFpSemigroup and HasGeneratorsOfSemigroup], 4, # to beat the library method -function(M) - - if UserPreference("semigroups", "ViewObj") <> "semigroups-pkg" then - TryNextMethod(); - fi; - - Print(PrintString(M)); - return; -end); +SEMIGROUPS_FreeSemigroupMonoidPrintObj); InstallMethod(ViewString, "for an f.p. semigroup with known generators", [IsFpSemigroup and HasGeneratorsOfSemigroup], @@ -400,7 +366,7 @@ end); InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsFpSemigroup, IsList], -function(filt, params) +function(_, params) if Length(params) < 1 then # nr gens params[1] := Random(1, 20); params[2] := Random(1, 8); @@ -415,16 +381,14 @@ end); InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsFpMonoid, IsList], -function(filt, params) - return SEMIGROUPS_ProcessRandomArgsCons(IsFpSemigroup, params); -end); +{filt, params} -> SEMIGROUPS_ProcessRandomArgsCons(IsFpSemigroup, params)); # this doesn't work very well InstallMethod(RandomSemigroupCons, "for IsFpSemigroup and a list", [IsFpSemigroup, IsList], function(filt, params) - return AsSemigroup(IsFpSemigroup, + return AsSemigroup(filt, CallFuncList(RandomSemigroup, Concatenation([IsTransformationSemigroup], params))); @@ -435,7 +399,7 @@ end); InstallMethod(RandomMonoidCons, "for IsFpMonoid and a list", [IsFpMonoid, IsList], function(filt, params) - return AsMonoid(IsFpMonoid, + return AsMonoid(filt, CallFuncList(RandomMonoid, Concatenation([IsTransformationMonoid], params))); @@ -446,7 +410,7 @@ end); InstallMethod(RandomInverseSemigroupCons, "for IsFpSemigroup and a list", [IsFpSemigroup, IsList], function(filt, params) - return AsSemigroup(IsFpSemigroup, + return AsSemigroup(filt, CallFuncList(RandomInverseSemigroup, Concatenation([IsPartialPermSemigroup], params))); @@ -457,7 +421,7 @@ end); InstallMethod(RandomInverseMonoidCons, "for IsFpMonoid and a list", [IsFpMonoid, IsList], function(filt, params) - return AsMonoid(IsFpMonoid, + return AsMonoid(filt, CallFuncList(RandomInverseMonoid, Concatenation([IsPartialPermMonoid], params))); @@ -465,9 +429,7 @@ end); InstallMethod(IsomorphismSemigroup, "for IsFpSemigroup and a semigroup", [IsFpSemigroup, IsSemigroup], -function(filt, S) - return IsomorphismFpSemigroup(S); -end); +{filt, S} -> IsomorphismFpSemigroup(S)); InstallMethod(AsMonoid, "for an fp semigroup", [IsFpSemigroup], @@ -480,9 +442,7 @@ end); InstallMethod(IsomorphismMonoid, "for IsFpMonoid and a semigroup", [IsFpMonoid, IsSemigroup], -function(filt, S) - return IsomorphismFpMonoid(S); -end); +{filt, S} -> IsomorphismFpMonoid(S)); # same method for ideals @@ -733,11 +693,11 @@ end); InstallMethod(IsomorphismFpMonoid, "for an fp monoid", [IsFpMonoid], -function(S) - return SemigroupIsomorphismByImagesNC(S, - S, - GeneratorsOfSemigroup(S), - GeneratorsOfSemigroup(S)); +function(M) + return SemigroupIsomorphismByImagesNC(M, + M, + GeneratorsOfSemigroup(M), + GeneratorsOfSemigroup(M)); end); # The next method is copied directly from the GAP library the only change is @@ -1222,7 +1182,7 @@ function(gens, inputstring) i := 1; while i <= Size(word) do # if there are no brackets the character is left as it is. - if not word[i] = '(' then + if word[i] <> '(' then if product = "" then product := chartoel(word[i]); else @@ -1315,7 +1275,7 @@ IsCollsElms, [IsFpSemigroup, IsElementOfFpSemigroup], # generators !!! InstallMethod(Factorization, "for an fp monoid and element", IsCollsElms, [IsFpMonoid, IsElementOfFpMonoid], -function(S, x) +function(_, x) local y; y := ExtRepOfObj(x); if IsEmpty(y) then @@ -1336,7 +1296,7 @@ InstallMethod(MinimalFactorization, "for a free semigroup and word", # generators !!! InstallMethod(Factorization, "for a free monoid and word", [IsFreeMonoid, IsWord], -function(S, x) +function(_, x) if IsOne(x) then return [1]; else diff --git a/gap/semigroups/semigraph.gi b/gap/semigroups/semigraph.gi index dc144d6cf..cc4eb76ae 100644 --- a/gap/semigroups/semigraph.gi +++ b/gap/semigroups/semigraph.gi @@ -80,9 +80,7 @@ end); InstallMethod(IsVertex, "for a graph inverse semigroup element", [IsGraphInverseSemigroupElement], -function(x) - return Length(x![1]) = 1 and AbsInt(x![1][1]) > Length(DigraphSource(x![2])); -end); +x -> Length(x![1]) = 1 and AbsInt(x![1][1]) > Length(DigraphSource(x![2]))); InstallMethod(MultiplicativeZero, "for a graph inverse semigroup", [IsGraphInverseSemigroup], @@ -93,15 +91,11 @@ end); InstallMethod(ZeroOp, "for a graph inverse semigroup element", [IsGraphInverseSemigroupElement], -function(x) - return Objectify(FamilyObj(x)!.type, [[0], x![2]]); -end); +x -> Objectify(FamilyObj(x)!.type, [[0], x![2]])); InstallMethod(IsZero, "for a graph inverse semigroup element", [IsGraphInverseSemigroupElement], -function(x) - return x![1][1] = 0; -end); +x -> x![1][1] = 0); InstallMethod(Source, "for a graph inverse semigroup element", [IsGraphInverseSemigroupElement], @@ -195,15 +189,11 @@ end); InstallMethod(\<, "for elements of a graph inverse semigroup", [IsGraphInverseSemigroupElement, IsGraphInverseSemigroupElement], -function(x, y) - return x![1] < y![1]; -end); +{x, y} -> x![1] < y![1]); InstallMethod(\=, "for elements of a graph inverse semigroup", [IsGraphInverseSemigroupElement, IsGraphInverseSemigroupElement], -function(x, y) - return x![1] = y![1]; -end); +{x, y} -> x![1] = y![1]); # here @@ -300,4 +290,3 @@ function(x) fi; return x![1][1] - DigraphNrEdges(x![2]); end); - diff --git a/gap/semigroups/semigrp.gi b/gap/semigroups/semigrp.gi index dd0a90fb9..acbe71321 100644 --- a/gap/semigroups/semigrp.gi +++ b/gap/semigroups/semigrp.gi @@ -148,9 +148,7 @@ InstallMethod(MagmaByGenerators, InstallMethod(SemigroupByGenerators, "for a finite list or collection", [IsListOrCollection and IsFinite], -function(coll) - return SemigroupByGenerators(coll, SEMIGROUPS.DefaultOptionsRec); -end); +{coll} -> SemigroupByGenerators(coll, SEMIGROUPS.DefaultOptionsRec)); InstallMethod(SemigroupByGenerators, "for a finite list or collection and record", @@ -203,9 +201,7 @@ end); InstallMethod(MonoidByGenerators, "for a finite list or collection", [IsListOrCollection and IsFinite], -function(gens) - return MonoidByGenerators(gens, SEMIGROUPS.DefaultOptionsRec); -end); +{gens} -> MonoidByGenerators(gens, SEMIGROUPS.DefaultOptionsRec)); InstallMethod(MonoidByGenerators, "for a finite list or collection and record", @@ -269,9 +265,7 @@ end); InstallMethod(InverseSemigroupByGenerators, "for a finite collection", [IsCollection and IsFinite], -function(gens) - return InverseSemigroupByGenerators(gens, SEMIGROUPS.DefaultOptionsRec); -end); +{gens} -> InverseSemigroupByGenerators(gens, SEMIGROUPS.DefaultOptionsRec)); InstallMethod(InverseSemigroupByGenerators, "for a finite multiplicative element collection and record", @@ -316,9 +310,7 @@ end); InstallMethod(InverseMonoidByGenerators, "for a finite collection", [IsCollection and IsFinite], -function(gens) - return InverseMonoidByGenerators(gens, SEMIGROUPS.DefaultOptionsRec); -end); +{gens} -> InverseMonoidByGenerators(gens, SEMIGROUPS.DefaultOptionsRec)); InstallMethod(InverseMonoidByGenerators, "for a finite multiplicative element collection and record", @@ -380,11 +372,11 @@ end); ############################################################################# InstallGlobalFunction(RegularSemigroup, -function(arg) - if not IsRecord(arg[Length(arg)]) then +function(arg...) + if not IsRecord(Last(arg)) then Add(arg, rec(regular := true)); else - arg[Length(arg)].regular := true; + Last(arg).regular := true; fi; return CallFuncList(Semigroup, arg); end); @@ -396,42 +388,30 @@ end); InstallMethod(ClosureSemigroup, "for a semigroup and finite list or collection", [IsSemigroup, IsListOrCollection and IsFinite], -function(S, coll) - return ClosureSemigroup(S, coll, SEMIGROUPS.OptionsRec(S)); -end); +{S, coll} -> ClosureSemigroup(S, coll, SEMIGROUPS.OptionsRec(S))); InstallMethod(ClosureMonoid, "for a monoid and finite mult. element with one collection", [IsMonoid, IsMultiplicativeElementWithOneCollection and IsFinite], -function(S, coll) - return ClosureMonoid(S, coll, SEMIGROUPS.OptionsRec(S)); -end); +{S, coll} -> ClosureMonoid(S, coll, SEMIGROUPS.OptionsRec(S))); InstallMethod(ClosureSemigroup, "for a semigroup and multiplicative element", [IsSemigroup, IsMultiplicativeElement], -function(S, x) - return ClosureSemigroup(S, [x], SEMIGROUPS.OptionsRec(S)); -end); +{S, x} -> ClosureSemigroup(S, [x], SEMIGROUPS.OptionsRec(S))); InstallMethod(ClosureMonoid, "for a monoid and mult. element with one", [IsMonoid, IsMultiplicativeElementWithOne], -function(S, x) - return ClosureMonoid(S, [x], SEMIGROUPS.OptionsRec(S)); -end); +{S, x} -> ClosureMonoid(S, [x], SEMIGROUPS.OptionsRec(S))); InstallMethod(ClosureSemigroup, "for a semigroup, multiplicative element, and record", [IsSemigroup, IsMultiplicativeElement, IsRecord], -function(S, x, opts) - return ClosureSemigroup(S, [x], opts); -end); +{S, x, opts} -> ClosureSemigroup(S, [x], opts)); InstallMethod(ClosureMonoid, "for a monoid, mult. element with one, and record", [IsMonoid, IsMultiplicativeElementWithOne, IsRecord], -function(S, x, opts) - return ClosureMonoid(S, [x], opts); -end); +{S, x, opts} -> ClosureMonoid(S, [x], opts)); InstallMethod(ClosureSemigroup, "for a semigroup, finite list or collection, and record", @@ -556,51 +536,39 @@ InstallMethod(ClosureInverseSemigroup, "for an inverse semigroup with inverse op and finite mult. element coll", [IsInverseSemigroup and IsGeneratorsOfInverseSemigroup, IsMultiplicativeElementCollection and IsFinite], -function(S, coll) - return ClosureInverseSemigroup(S, coll, SEMIGROUPS.OptionsRec(S)); -end); +{S, coll} -> ClosureInverseSemigroup(S, coll, SEMIGROUPS.OptionsRec(S))); InstallMethod(ClosureInverseMonoid, "for an inverse monoid with inverse op and finite mult. element with one coll", [IsInverseMonoid and IsGeneratorsOfInverseSemigroup, IsMultiplicativeElementWithOneCollection and IsFinite], -function(S, coll) - return ClosureInverseMonoid(S, coll, SEMIGROUPS.OptionsRec(S)); -end); +{S, coll} -> ClosureInverseMonoid(S, coll, SEMIGROUPS.OptionsRec(S))); InstallMethod(ClosureInverseSemigroup, "for an inverse semigroup with inverse op and a multiplicative element", [IsInverseSemigroup and IsGeneratorsOfInverseSemigroup, IsMultiplicativeElement], -function(S, x) - return ClosureInverseSemigroup(S, [x], SEMIGROUPS.OptionsRec(S)); -end); +{S, x} -> ClosureInverseSemigroup(S, [x], SEMIGROUPS.OptionsRec(S))); InstallMethod(ClosureInverseMonoid, "for an inverse monoid with inverse op and a mult. element with one", [IsInverseMonoid and IsGeneratorsOfInverseSemigroup, IsMultiplicativeElementWithOne], -function(S, x) - return ClosureInverseMonoid(S, [x], SEMIGROUPS.OptionsRec(S)); -end); +{S, x} -> ClosureInverseMonoid(S, [x], SEMIGROUPS.OptionsRec(S))); InstallMethod(ClosureInverseSemigroup, "for inverse semigroup with inverse op, multiplicative element, record", [IsInverseSemigroup and IsGeneratorsOfInverseSemigroup, IsMultiplicativeElement, IsRecord], -function(S, x, opts) - return ClosureInverseSemigroup(S, [x], opts); -end); +{S, x, opts} -> ClosureInverseSemigroup(S, [x], opts)); InstallMethod(ClosureInverseMonoid, "for inverse monoid with inverse op, multiplicative element with one, record", [IsInverseMonoid and IsGeneratorsOfInverseSemigroup, IsMultiplicativeElementWithOne, IsRecord], -function(S, x, opts) - return ClosureInverseMonoid(S, [x], opts); -end); +{S, x, opts} -> ClosureInverseMonoid(S, [x], opts)); InstallMethod(ClosureInverseSemigroup, "for an inverse semigroup with inverse op, finite mult elt coll, and record", @@ -746,18 +714,14 @@ InstallMethod(ClosureInverseSemigroup, [IsInverseSemigroup and IsGeneratorsOfInverseSemigroup, IsListOrCollection and IsEmpty, IsRecord], -function(S, coll, opts) - return S; -end); +ReturnFirst); InstallMethod(ClosureInverseMonoid, "for an inverse monoid, empty list or collection, and record", [IsInverseMonoid and IsGeneratorsOfInverseSemigroup, IsListOrCollection and IsEmpty, IsRecord], -function(S, coll, opts) - return S; -end); +ReturnFirst); InstallMethod(ClosureInverseSemigroupOrMonoidNC, "for a function, inverse semigroup, empty list, and record", @@ -765,9 +729,7 @@ InstallMethod(ClosureInverseSemigroupOrMonoidNC, IsInverseSemigroup and IsGeneratorsOfInverseSemigroup, IsList and IsEmpty, IsRecord], -function(Constructor, S, coll, opts) - return S; -end); +{Constructor, S, coll, opts} -> S); ############################################################################# ## 7. Subsemigroups @@ -835,16 +797,12 @@ end); InstallMethod(SubsemigroupByProperty, "for a semigroup and function", [IsSemigroup, IsFunction], -function(S, func) - return SubsemigroupByProperty(S, func, Size(S)); -end); +{S, func} -> SubsemigroupByProperty(S, func, Size(S))); InstallMethod(InverseSubsemigroupByProperty, "for inverse semigroup with inverse op and function", [IsInverseSemigroup and IsGeneratorsOfInverseSemigroup, IsFunction], -function(S, func) - return InverseSubsemigroupByProperty(S, func, Size(S)); -end); +{S, func} -> InverseSubsemigroupByProperty(S, func, Size(S))); ############################################################################# ## 8. Random semigroups and elements @@ -854,13 +812,11 @@ InstallMethod(Random, "for a semigroup with AsList", [IsSemigroup and HasAsList], 20, # to beat other random methods -function(S) - return AsList(S)[Random(1, Size(S))]; -end); +{S} -> AsList(S)[Random(1, Size(S))]); InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsSemigroup, IsList], -function(filt, params) +function(_, params) if Length(params) < 1 then # nr gens params[1] := Random(1, 20); elif not IsPosInt(params[1]) then @@ -879,9 +835,7 @@ end); InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsMonoid, IsList], -function(filt, params) - return SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params); -end); +{filt, params} -> SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params)); SEMIGROUPS.DefaultRandomInverseSemigroup := function(filt, params) if Length(params) = 2 then @@ -930,7 +884,7 @@ SEMIGROUPS.DefaultRandomInverseMonoid := function(filt, params) end; InstallGlobalFunction(RandomSemigroup, -function(arg) +function(arg...) local filt, params; # check for optional first arg @@ -972,7 +926,7 @@ function(arg) end); InstallGlobalFunction(RandomMonoid, -function(arg) +function(arg...) local filt, params; # check for optional first arg @@ -1012,7 +966,7 @@ function(arg) end); InstallGlobalFunction(RandomInverseSemigroup, -function(arg) +function(arg...) local filt, params; # check for optional first arg @@ -1052,7 +1006,7 @@ function(arg) end); InstallGlobalFunction(RandomInverseMonoid, -function(arg) +function(arg...) local filt, params; # check for optional first arg @@ -1197,22 +1151,17 @@ end); InstallMethod(AsSemigroup, "for a filter, pos int, a semigroup", [IsOperation, IsPosInt, IsSemigroup], -function(filt, threshold, S) - return Range(IsomorphismSemigroup(filt, threshold, S)); -end); +{filt, threshold, S} -> Range(IsomorphismSemigroup(filt, threshold, S))); InstallMethod(AsSemigroup, "for a filter, pos int, pos int, a semigroup", [IsOperation, IsPosInt, IsPosInt, IsSemigroup], -function(filt, threshold, period, S) - return Range(IsomorphismSemigroup(filt, threshold, period, S)); -end); +{filt, threshold, period, S} +-> Range(IsomorphismSemigroup(filt, threshold, period, S))); InstallMethod(AsSemigroup, "for a filter, ring, and semigroup", [IsOperation, IsRing, IsSemigroup], -function(filt, R, S) - return Range(IsomorphismSemigroup(filt, R, S)); -end); +{filt, R, S} -> Range(IsomorphismSemigroup(filt, R, S))); InstallMethod(AsMonoid, "for a filter and a semigroup", [IsOperation, IsSemigroup], @@ -1233,22 +1182,17 @@ end); InstallMethod(AsMonoid, "for a filter, pos int, and a semigroup", [IsOperation, IsPosInt, IsSemigroup], -function(filt, threshold, S) - return Range(IsomorphismMonoid(filt, threshold, S)); -end); +{filt, threshold, S} -> Range(IsomorphismMonoid(filt, threshold, S))); InstallMethod(AsMonoid, "for a filter, pos int, pos int, and a semigroup", [IsOperation, IsPosInt, IsPosInt, IsSemigroup], -function(filt, threshold, period, S) - return Range(IsomorphismMonoid(filt, threshold, period, S)); -end); +{filt, threshold, period, S} -> +Range(IsomorphismMonoid(filt, threshold, period, S))); InstallMethod(AsMonoid, "for a filter, ring, and semigroup", [IsOperation, IsRing, IsSemigroup], -function(filt, R, S) - return Range(IsomorphismMonoid(filt, R, S)); -end); +{filt, R, S} -> Range(IsomorphismMonoid(filt, R, S))); ############################################################################# ## 10. Operators diff --git a/gap/semigroups/semimaxplus.gi b/gap/semigroups/semimaxplus.gi index e0dc13f44..0f94bfea0 100644 --- a/gap/semigroups/semimaxplus.gi +++ b/gap/semigroups/semimaxplus.gi @@ -62,20 +62,16 @@ _InstallRandom0 := function(params) InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [ValueGlobal(IsXSemigroup), IsList], - function(filt, params) - return SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params); - end); + {_, params} -> SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params)); InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [ValueGlobal(IsXMonoid), IsList], - function(filt, params) - return SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params); - end); + {_, params} -> SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params)); InstallMethod(RandomSemigroupCons, Concatenation("for ", IsXSemigroup, " and a list"), [ValueGlobal(IsXSemigroup), IsList], - function(filt, params) + function(_, params) return Semigroup(List([1 .. params[1]], i -> RandomMatrix(ValueGlobal(FilterPlaceHolder), params[2]))); @@ -84,7 +80,7 @@ _InstallRandom0 := function(params) InstallMethod(RandomMonoidCons, Concatenation("for ", IsXMonoid, " and a list"), [ValueGlobal(IsXMonoid), IsList], - function(filt, params) + function(_, params) return Monoid(List([1 .. params[1]], i -> RandomMatrix(ValueGlobal(FilterPlaceHolder), params[2]))); @@ -105,7 +101,7 @@ Unbind(_InstallRandom0); ## Random for matrices with 1 additional parameters ############################################################################# -_ProcessArgs1 := function(filt, params) +_ProcessArgs1 := function(_, params) if Length(params) < 1 then # nr gens params[1] := Random(1, 20); elif not IsPosInt(params[1]) then @@ -145,7 +141,7 @@ _InstallRandom1 := function(IsXMatrix) InstallMethod(RandomSemigroupCons, Concatenation("for ", IsXSemigroup, " and a list"), [ValueGlobal(IsXSemigroup), IsList], - function(filt, params) + function(_, params) return Semigroup(List([1 .. params[1]], i -> RandomMatrix(ValueGlobal(IsXMatrix), params[2], @@ -155,7 +151,7 @@ _InstallRandom1 := function(IsXMatrix) InstallMethod(RandomMonoidCons, Concatenation("for ", IsXMonoid, " and a list"), [ValueGlobal(IsXMonoid), IsList], - function(filt, params) + function(_, params) return Monoid(List([1 .. params[1]], i -> RandomMatrix(ValueGlobal(IsXMatrix), params[2], @@ -178,7 +174,7 @@ Unbind(_ProcessArgs1); InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsNTPMatrixSemigroup, IsList], -function(filt, params) +function(_, params) if Length(params) < 1 then # nr gens params[1] := Random(1, 20); elif not IsPosInt(params[1]) then @@ -207,15 +203,13 @@ function(filt, params) end); InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, -[IsNTPMatrixMonoid, IsList], -function(filt, params) - return SEMIGROUPS_ProcessRandomArgsCons(IsNTPMatrixSemigroup, params); -end); +[IsNTPMatrixMonoid, IsList], {filt, params} +-> SEMIGROUPS_ProcessRandomArgsCons(IsNTPMatrixSemigroup, params)); InstallMethod(RandomSemigroupCons, "for IsNTPMatrixSemigroup and a list", [IsNTPMatrixSemigroup, IsList], -function(filt, params) +function(_, params) return Semigroup(List([1 .. params[1]], i -> RandomMatrix(IsNTPMatrix, params[2], @@ -226,7 +220,7 @@ end); InstallMethod(RandomMonoidCons, "for IsNTPMatrixMonoid and a list", [IsNTPMatrixMonoid, IsList], -function(filt, params) +function(_, params) return Monoid(List([1 .. params[1]], i -> RandomMatrix(IsNTPMatrix, params[2], @@ -260,9 +254,7 @@ for _IsXMatrix in ["IsMaxPlusMatrix", InstallMethod(IsomorphismSemigroup, Concatenation("for ", _IsXSemigroup, " and a ", _IsXSemigroup), [ValueGlobal(_IsXSemigroup), ValueGlobal(_IsXSemigroup)], - function(filter, S) - return SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc); - end); + {filter, S} -> SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc)); od; @@ -296,14 +288,12 @@ for _IsXMatrix in ["IsTropicalMaxPlusMatrix", InstallMethod(IsomorphismSemigroup, Concatenation("for ", _IsXSemigroup, ", and a semigroup"), [ValueGlobal(_IsXSemigroup), IsSemigroup], - function(filter, S) - return IsomorphismSemigroup(filter, 1, S); - end); + {filter, S} -> IsomorphismSemigroup(filter, 1, S)); InstallMethod(IsomorphismSemigroup, Concatenation("for ", _IsXSemigroup, " and a ", _IsXSemigroup), [ValueGlobal(_IsXSemigroup), IsPosInt, ValueGlobal(_IsXSemigroup)], - function(filter, threshold, S) + function(_, threshold, S) if threshold = ThresholdTropicalMatrix(Representative(S)) then return SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc); fi; @@ -336,14 +326,12 @@ end); InstallMethod(IsomorphismSemigroup, "for IsNTPMatrixSemigroup and a semigroup", [IsNTPMatrixSemigroup, IsSemigroup], -function(filter, S) - return IsomorphismSemigroup(IsNTPMatrixSemigroup, 1, 1, S); -end); +{filter, S} -> IsomorphismSemigroup(IsNTPMatrixSemigroup, 1, 1, S)); InstallMethod(IsomorphismSemigroup, "for IsNTPMatrixSemigroup, pos int, pos int, and a semigroup", [IsNTPMatrixSemigroup, IsPosInt, IsPosInt, IsNTPMatrixSemigroup], -function(filter, threshold, period, S) +function(_, threshold, period, S) if threshold = ThresholdNTPMatrix(Representative(S)) and period = PeriodNTPMatrix(Representative(S)) then return SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc); @@ -359,10 +347,9 @@ end); ## These are installed inside a function so that the value of IsXMatrix and ## IsXSemigroup are retained as local variables. -_InstallIsomorphism0 := function(filter) - local IsXMatrix, IsXSemigroup, IsXMonoid; +_InstallAsMonoid := function(filter) + local IsXSemigroup, IsXMonoid; - IsXMatrix := filter; IsXSemigroup := Concatenation(filter, "Semigroup"); IsXMonoid := Concatenation(filter, "Monoid"); @@ -375,6 +362,30 @@ _InstallIsomorphism0 := function(filter) fi; return Range(IsomorphismMonoid(ValueGlobal(IsXMonoid), S)); end); +end; + +for _IsXMatrix in ["IsMaxPlusMatrix", + "IsMinPlusMatrix", + "IsTropicalMaxPlusMatrix", + "IsTropicalMinPlusMatrix", + "IsProjectiveMaxPlusMatrix", + "IsNTPMatrix", + "IsIntegerMatrix"] do + _InstallAsMonoid(_IsXMatrix); +od; + +Unbind(_IsXMatrix); +Unbind(_InstallAsMonoid); + +## These are installed inside a function so that the value of IsXMatrix and +## IsXSemigroup are retained as local variables. + +_InstallIsomorphism0 := function(filter) + local IsXMatrix, IsXSemigroup, IsXMonoid; + + IsXMatrix := filter; + IsXSemigroup := Concatenation(filter, "Semigroup"); + IsXMonoid := Concatenation(filter, "Monoid"); InstallMethod(IsomorphismMonoid, Concatenation("for ", IsXMonoid, " and a semigroup"), @@ -384,9 +395,7 @@ _InstallIsomorphism0 := function(filter) InstallMethod(IsomorphismMonoid, Concatenation("for ", IsXMonoid, " and a monoid"), [ValueGlobal(IsXMonoid), IsMonoid], - function(filter, S) - return IsomorphismSemigroup(ValueGlobal(IsXSemigroup), S); - end); + {filter, S} -> IsomorphismSemigroup(ValueGlobal(IsXSemigroup), S)); if IsXMatrix <> "IsIntegerMatrix" then InstallMethod(IsomorphismSemigroup, @@ -394,7 +403,7 @@ _InstallIsomorphism0 := function(filter) " and a transformation semigroup with generators"), [ValueGlobal(IsXSemigroup), IsTransformationSemigroup and HasGeneratorsOfSemigroup], - function(filt, S) + function(_, S) local n, map, T; n := Maximum(DegreeOfTransformationSemigroup(S), 1); @@ -435,16 +444,6 @@ _InstallIsomorphism1 := function(filter) IsXSemigroup := Concatenation(filter, "Semigroup"); IsXMonoid := Concatenation(filter, "Monoid"); - InstallMethod(AsMonoid, - Concatenation("for a semigroup in ", IsXSemigroup), - [ValueGlobal(IsXSemigroup)], - function(S) - if MultiplicativeNeutralElement(S) = fail then - return fail; # so that we do the same as the GAP/ref manual says - fi; - return Range(IsomorphismMonoid(ValueGlobal(IsXMonoid), S)); - end); - InstallMethod(IsomorphismMonoid, Concatenation("for ", IsXMonoid, ", pos int, and a semigroup"), [ValueGlobal(IsXMonoid), IsPosInt, IsSemigroup], @@ -465,9 +464,7 @@ _InstallIsomorphism1 := function(filter) InstallMethod(IsomorphismMonoid, Concatenation("for ", IsXMonoid, " and a semigroup"), [ValueGlobal(IsXMonoid), IsSemigroup], - function(filter, S) - return IsomorphismMonoid(filter, 1, S); - end); + {filter, S} -> IsomorphismMonoid(filter, 1, S)); InstallMethod(IsomorphismMonoid, Concatenation("for ", IsXMonoid, ", and a semigroup in ", IsXSemigroup), @@ -481,16 +478,15 @@ _InstallIsomorphism1 := function(filter) InstallMethod(IsomorphismMonoid, Concatenation("for ", IsXMonoid, ", pos int, and a monoid"), [ValueGlobal(IsXMonoid), IsPosInt, IsMonoid], - function(filter, threshold, S) - return IsomorphismSemigroup(ValueGlobal(IsXSemigroup), threshold, S); - end); + {filter, threshold, S} -> + IsomorphismSemigroup(ValueGlobal(IsXSemigroup), threshold, S)); InstallMethod(IsomorphismSemigroup, Concatenation("for ", IsXSemigroup, ", pos int, and a transformation semigroup with generators"), [ValueGlobal(IsXSemigroup), IsPosInt, IsTransformationSemigroup and HasGeneratorsOfSemigroup], - function(filt, threshold, S) + function(_, threshold, S) local n, map, T; n := Maximum(DegreeOfTransformationSemigroup(S), 1); @@ -509,9 +505,7 @@ _InstallIsomorphism1 := function(filter) " and a transformation semigroup with generators"), [ValueGlobal(IsXSemigroup), IsTransformationSemigroup and HasGeneratorsOfSemigroup], - function(filt, S) - return IsomorphismSemigroup(filt, 1, S); - end); + {filt, S} -> IsomorphismSemigroup(filt, 1, S)); end; for _IsXMatrix in ["IsTropicalMaxPlusMatrix", @@ -527,15 +521,6 @@ Unbind(_InstallIsomorphism1); ## 2 additional parameters!!! ############################################################################# -InstallMethod(AsMonoid, "for an ntp matrix semigroup", -[IsNTPMatrixSemigroup], -function(S) - if MultiplicativeNeutralElement(S) = fail then - return fail; # so that we do the same as the GAP/ref manual says - fi; - return Range(IsomorphismMonoid(IsNTPMatrixMonoid, S)); -end); - InstallMethod(IsomorphismMonoid, "for IsNTPMatrixMonoid, pos int, pos int, and a semigroup", [IsNTPMatrixMonoid, IsPosInt, IsPosInt, IsSemigroup], @@ -556,9 +541,7 @@ end); InstallMethod(IsomorphismMonoid, "for IsNTPMatrixMonoid and a semigroup", [IsNTPMatrixMonoid, IsSemigroup], -function(filter, S) - return IsomorphismMonoid(filter, 1, 1, S); -end); +{filter, S} -> IsomorphismMonoid(filter, 1, 1, S)); InstallMethod(IsomorphismMonoid, "for IsNTPMatrixMonoid and a ntp matrix semigroup", @@ -573,15 +556,14 @@ end); InstallMethod(IsomorphismMonoid, "for IsNTPMatrixMonoid, pos int, pos int, and a semigroup", [IsNTPMatrixMonoid, IsPosInt, IsPosInt, IsMonoid], -function(filter, threshold, period, S) - return IsomorphismSemigroup(IsNTPMatrixSemigroup, threshold, period, S); -end); +{filter, threshold, period, S} +-> IsomorphismSemigroup(IsNTPMatrixSemigroup, threshold, period, S)); InstallMethod(IsomorphismSemigroup, "for IsNTPMatrixSemigroup, pos int, pos int, trans semigroup with gens", [IsNTPMatrixSemigroup, IsPosInt, IsPosInt, IsTransformationSemigroup and HasGeneratorsOfSemigroup], -function(filt, threshold, period, S) +function(_, threshold, period, S) local n, map, T; n := Maximum(DegreeOfTransformationSemigroup(S), 1); @@ -596,7 +578,7 @@ function(filt, threshold, period, S) n, threshold, period), - x -> AsTransformation(x)); + AsTransformation); end); ############################################################################# @@ -726,4 +708,3 @@ function(S) ngens := List(gens, g -> InverseOp(d) * g * d); return Semigroup(ngens); end); - diff --git a/gap/semigroups/semintmat.gi b/gap/semigroups/semintmat.gi index ad8c4f42a..1645c733e 100644 --- a/gap/semigroups/semintmat.gi +++ b/gap/semigroups/semintmat.gi @@ -8,6 +8,8 @@ ############################################################################# ## +# Note that IsIntegerMatrixSemigroup does not imply +# IsMatrixOverSemiringSemigroup and so we require this method too. InstallMethod(SemigroupViewStringSuffix, "for an integer matrix semigroup", [IsIntegerMatrixSemigroup], @@ -22,7 +24,7 @@ InstallMethod(IsomorphismSemigroup, [IsIntegerMatrixSemigroup, IsTransformationSemigroup and HasGeneratorsOfSemigroup], 1, # to beat the default method -function(filt, S) +function(_, S) local n, map, T; n := Maximum(DegreeOfTransformationSemigroup(S), 1); diff --git a/gap/semigroups/semipbr.gi b/gap/semigroups/semipbr.gi index 4176e05ef..118c7c360 100644 --- a/gap/semigroups/semipbr.gi +++ b/gap/semigroups/semipbr.gi @@ -17,27 +17,19 @@ InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsPBRSemigroup, IsList], -function(filt, params) - return SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params); -end); +{filt, params} -> SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params)); InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsPBRMonoid, IsList], -function(filt, params) - return SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params); -end); +{filt, params} -> SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params)); InstallMethod(RandomSemigroupCons, "for IsPBRSemigroup and a list", [IsPBRSemigroup, IsList], -function(filt, params) - return Semigroup(List([1 .. params[1]], i -> RandomPBR(params[2]))); -end); +{filt, params} -> Semigroup(List([1 .. params[1]], i -> RandomPBR(params[2])))); InstallMethod(RandomMonoidCons, "for IsPBRMonoid and a list", [IsPBRMonoid, IsList], -function(filt, params) - return Monoid(List([1 .. params[1]], i -> RandomPBR(params[2]))); -end); +{filt, params} -> Monoid(List([1 .. params[1]], i -> RandomPBR(params[2])))); InstallMethod(RandomInverseSemigroupCons, "for IsPBRSemigroup and a list", [IsPBRSemigroup, IsList], SEMIGROUPS.DefaultRandomInverseSemigroup); @@ -56,12 +48,8 @@ function(S) "\<\< "); end); -InstallMethod(DegreeOfPBRSemigroup, -"for a PBR semigroup", -[IsPBRSemigroup], -function(S) - return DegreeOfPBR(Representative(S)); -end); +InstallMethod(DegreeOfPBRSemigroup, "for a PBR semigroup", [IsPBRSemigroup], +S -> DegreeOfPBR(Representative(S))); # fall back method via a transformation semigroup @@ -71,7 +59,7 @@ InstallMethod(IsomorphismSemigroup, "for IsPBRSemigroup and a semigroup", InstallMethod(IsomorphismSemigroup, "for IsPBRSemigroup and a transformation semigroup", [IsPBRSemigroup, IsTransformationSemigroup], -function(filt, S) +function(_, S) local deg, T; deg := Maximum(1, DegreeOfTransformationSemigroup(S)); @@ -89,7 +77,7 @@ end); InstallMethod(IsomorphismSemigroup, "for IsPBRSemigroup and a bipartition semigroup", [IsPBRSemigroup, IsBipartitionSemigroup], -function(filt, S) +function(_, S) local T; T := Semigroup(List(GeneratorsOfSemigroup(S), AsPBR)); @@ -104,9 +92,7 @@ end); InstallMethod(IsomorphismSemigroup, "for IsPBRSemigroup and a pbr semigroup", [IsPBRSemigroup, IsPBRSemigroup], -function(filter, S) - return SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc); -end); +{_, S} -> SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc)); InstallMethod(AsMonoid, "for a PBR semigroup", [IsPBRSemigroup], @@ -125,7 +111,7 @@ InstallMethod(IsomorphismMonoid, "for IsPBRMonoid and a monoid", InstallMethod(IsomorphismMonoid, "for IsPBRMonoid and a transformation monoid", [IsPBRMonoid, IsTransformationMonoid], -function(filt, S) +function(_, S) local deg, T; deg := Maximum(1, DegreeOfTransformationSemigroup(S)); @@ -141,9 +127,7 @@ end); InstallMethod(IsomorphismMonoid, "for IsPBRMonoid and a pbr monoid", [IsPBRMonoid, IsPBRMonoid], -function(filter, S) - return SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc); -end); +{filter, S} -> SemigroupIsomorphismByFunctionNC(S, S, IdFunc, IdFunc)); InstallMethod(\<, "for pbr semigroups", [IsPBRSemigroup, IsPBRSemigroup], diff --git a/gap/semigroups/semipperm.gd b/gap/semigroups/semipperm.gd index 0dc911ca3..246676b5f 100644 --- a/gap/semigroups/semipperm.gd +++ b/gap/semigroups/semipperm.gd @@ -21,5 +21,7 @@ DeclareAttribute("ComponentRepsOfPartialPermSemigroup", DeclareAttribute("ComponentsOfPartialPermSemigroup", IsPartialPermSemigroup); +DeclareAttribute("ComponentRepresentatives", IsSemigroup); + DeclareAttribute("SmallerDegreePartialPermRepresentation", IsInverseSemigroup and IsGeneratorsOfInverseSemigroup); diff --git a/gap/semigroups/semipperm.gi b/gap/semigroups/semipperm.gi index 213aa21a1..8675fc3a6 100644 --- a/gap/semigroups/semipperm.gi +++ b/gap/semigroups/semipperm.gi @@ -17,32 +17,24 @@ InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsPartialPermSemigroup, IsList], -function(filt, params) - return SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params); -end); +{filt, params} -> SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params)); InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsPartialPermMonoid, IsList], -function(filt, params) - return SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params); -end); +{filt, params} -> SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params)); InstallMethod(RandomSemigroupCons, "for IsPartialPermSemigroup and a list", -[IsPartialPermSemigroup, IsList], -function(filt, params) - return Semigroup(List([1 .. params[1]], i -> RandomPartialPerm(params[2]))); -end); +[IsPartialPermSemigroup, IsList], {filt, params} -> +Semigroup(List([1 .. params[1]], i -> RandomPartialPerm(params[2])))); InstallMethod(RandomMonoidCons, "for IsPartialPermMonoid and a list", -[IsPartialPermMonoid, IsList], -function(filt, params) - return Monoid(List([1 .. params[1]], i -> RandomPartialPerm(params[2]))); -end); +[IsPartialPermMonoid, IsList], {filt, params} -> +Monoid(List([1 .. params[1]], i -> RandomPartialPerm(params[2])))); InstallMethod(RandomInverseSemigroupCons, "for IsPartialPermSemigroup and a list", [IsPartialPermSemigroup, IsList], -function(filt, params) +function(_, params) return InverseSemigroup(List([1 .. params[1]], i -> RandomPartialPerm(params[2]))); end); @@ -50,7 +42,7 @@ end); InstallMethod(RandomInverseMonoidCons, "for IsPartialPermMonoid and a list", [IsPartialPermMonoid, IsList], -function(filt, params) +function(_, params) return InverseMonoid(List([1 .. params[1]], i -> RandomPartialPerm(params[2]))); end); @@ -83,16 +75,12 @@ end); InstallMethod(IsomorphismSemigroup, "for IsPartialPermSemigroup and a semigroup", [IsPartialPermSemigroup, IsSemigroup], -function(filt, S) - return IsomorphismPartialPermSemigroup(S); -end); +{filt, S} -> IsomorphismPartialPermSemigroup(S)); InstallMethod(IsomorphismMonoid, "for IsPartialPermMonoid and a semigroup", [IsPartialPermMonoid, IsSemigroup], -function(filt, S) - return IsomorphismPartialPermMonoid(S); -end); +{filt, S} -> IsomorphismPartialPermMonoid(S)); InstallMethod(IsomorphismPartialPermSemigroup, "for a bipartition semigroup with generators", @@ -392,9 +380,7 @@ end); InstallMethod(Idempotents, "for a partial perm semigroup and pos int", [IsPartialPermSemigroup, IsInt], -function(S, rank) - return Filtered(Idempotents(S), x -> RankOfPartialPerm(x) = rank); -end); +{S, rank} -> Filtered(Idempotents(S), x -> RankOfPartialPerm(x) = rank)); # this should really be in the library @@ -518,9 +504,7 @@ InstallMethod(RankOfPartialPermSemigroup, InstallMethod(RankOfPartialPermSemigroup, "for a partial perm semigroup ideal", [IsPartialPermSemigroup and IsSemigroupIdeal], -function(I) - return Length(DomainOfPartialPermCollection(I)); -end); +I -> Length(DomainOfPartialPermCollection(I))); ############################################################################# ## Domain, image @@ -633,21 +617,26 @@ function(S, n) return DigraphNC(out); end); -InstallMethod(ComponentRepsOfPartialPermSemigroup, -"for a partial perm semigroup", [IsPartialPermSemigroup], +InstallMethod(ComponentRepresentatives, +"for a partial perm or transf semigroup", [IsSemigroup], function(S) local D, C; + if not (IsPartialPermSemigroup(S) or IsTransformationSemigroup(S)) then + TryNextMethod(); + fi; D := DigraphMutableCopy(DigraphOfActionOnPoints(S)); C := DigraphStronglyConnectedComponents(D).comps; DigraphRemoveLoops(QuotientDigraph(D, C)); return List(DigraphSources(D), x -> DigraphVertexLabel(D, x)[1]); end); +InstallMethod(ComponentRepsOfPartialPermSemigroup, +"for a partial perm semigroup", [IsPartialPermSemigroup], +ComponentRepresentatives); + InstallMethod(ComponentsOfPartialPermSemigroup, "for a partial perm semigroup", [IsPartialPermSemigroup], -function(S) - return DigraphConnectedComponents(DigraphOfActionOnPoints(S)).comps; -end); +S -> DigraphConnectedComponents(DigraphOfActionOnPoints(S)).comps); InstallMethod(CyclesOfPartialPermSemigroup, "for a partial perm semigroup", [IsPartialPermSemigroup], diff --git a/gap/semigroups/semiquo.gi b/gap/semigroups/semiquo.gi index bc8c93467..251a95fa6 100644 --- a/gap/semigroups/semiquo.gi +++ b/gap/semigroups/semiquo.gi @@ -18,9 +18,7 @@ end); InstallMethod(OneImmutable, "for a quotient semigroup", [IsQuotientSemigroup], -function(S) - return One(QuotientSemigroupPreimage(S)) ^ QuotientSemigroupHomomorphism(S); -end); +S -> One(QuotientSemigroupPreimage(S)) ^ QuotientSemigroupHomomorphism(S)); InstallMethod(GeneratorsOfSemigroup, "for a quotient semigroup", [IsQuotientSemigroup], @@ -51,9 +49,7 @@ end); InstallMethod(\/, "for a semigroup and an ideal", [IsSemigroup, IsSemigroupIdeal], -function(S, I) - return S / ReesCongruenceOfSemigroupIdeal(I); -end); +{S, I} -> S / ReesCongruenceOfSemigroupIdeal(I)); # The next function is copied (almost) verbatim from the GAP library (4.11) so # that the QuotientSemigroupHomomorphism is a homomorphism object. diff --git a/gap/semigroups/semiringmat.gi b/gap/semigroups/semiringmat.gi index 4cca8f1f1..1a9db9849 100644 --- a/gap/semigroups/semiringmat.gi +++ b/gap/semigroups/semiringmat.gi @@ -17,23 +17,5 @@ function(S) local n, type; n := DimensionOfMatrixOverSemiring(Representative(S)); type := SEMIGROUPS_TypeViewStringOfMatrixOverSemiring(Representative(S)); - return StringFormatted("{}x{} {} matrices ", n, n, type); -end); - -InstallMethod(SemigroupViewStringSuffix, -"for an integer matrix semigroup", -[IsIntegerMatrixSemigroup], -function(S) - return StringFormatted("{1}x{1} {2} matrices ", - NrRows(Representative(S)), - "integer"); -end); - -InstallMethod(SemigroupViewStringSuffix, -"for an integer matrix monoid", -[IsIntegerMatrixMonoid], -function(S) - return StringFormatted("{1}x{1} {2} matrices ", - NrRows(Representative(S)), - "integer"); + return StringFormatted("{1}x{1} {2} matrices ", n, type); end); diff --git a/gap/semigroups/semirms.gi b/gap/semigroups/semirms.gi index 9da44441e..3de1f136f 100644 --- a/gap/semigroups/semirms.gi +++ b/gap/semigroups/semirms.gi @@ -18,7 +18,7 @@ InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsReesMatrixSemigroup, IsList], -function(filt, params) +function(_, params) local order, i; if Length(params) < 1 then # rows I params[1] := Random(1, 100); @@ -46,20 +46,18 @@ end); InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsReesZeroMatrixSemigroup, IsList], -function(filt, params) - return SEMIGROUPS_ProcessRandomArgsCons(IsReesMatrixSemigroup, params); -end); +{filt, params} +-> SEMIGROUPS_ProcessRandomArgsCons(IsReesMatrixSemigroup, params)); InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsReesZeroMatrixSemigroup and IsRegularSemigroup, IsList], -function(filt, params) - return SEMIGROUPS_ProcessRandomArgsCons(IsReesMatrixSemigroup, params); -end); +{filt, params} +-> SEMIGROUPS_ProcessRandomArgsCons(IsReesMatrixSemigroup, params)); InstallMethod(RandomSemigroupCons, "for IsReesZeroMatrixSemigroup and list", [IsReesZeroMatrixSemigroup, IsList], -function(filt, params) +function(_, params) local I, G, J, mat, i, j; I := [1 .. params[1]]; @@ -83,7 +81,7 @@ end); InstallMethod(RandomSemigroupCons, "for IsReesMatrixSemigroup and list", [IsReesMatrixSemigroup, IsList], -function(filt, params) +function(_, params) local I, G, J, mat, i, j; I := [1 .. params[1]]; @@ -106,7 +104,7 @@ end); InstallMethod(RandomSemigroupCons, "for IsReesZeroMatrixSemigroup and IsRegularSemigroup and list", [IsReesZeroMatrixSemigroup and IsRegularSemigroup, IsList], -function(filt, params) +function(_, params) local I, G, J, mat, i, j; I := [1 .. params[1]]; @@ -156,16 +154,12 @@ InstallMethod(AsMonoid, "for a Rees 0-matrix semigroup", InstallMethod(IsomorphismSemigroup, "for IsReesMatrixSemigroup and a semigroup", [IsReesMatrixSemigroup, IsSemigroup], -function(filt, S) - return IsomorphismReesMatrixSemigroup(S); -end); +{filt, S} -> IsomorphismReesMatrixSemigroup(S)); InstallMethod(IsomorphismSemigroup, "for IsReesZeroMatrixSemigroup and a semigroup", [IsReesZeroMatrixSemigroup, IsSemigroup], -function(filt, S) - return IsomorphismReesZeroMatrixSemigroup(S); -end); +{filt, S} -> IsomorphismReesZeroMatrixSemigroup(S)); InstallMethod(IsomorphismReesMatrixSemigroup, "for a semigroup", [IsSemigroup], @@ -720,9 +714,7 @@ function(R) fi; fi; - GT := function(x, y) - return y < x; - end; + GT := {x, y} -> y < x; # Sort the connected components of by size (#rows * #columns) descending. # This also sends any zero-columns or zero-rows to the end of the new matrix. @@ -935,9 +927,7 @@ end); InstallMethod(Size, "for a Rees matrix semigroup", [IsReesMatrixSemigroup and HasUnderlyingSemigroup and HasRows and HasColumns], -function(R) - return Length(Rows(R)) * Size(UnderlyingSemigroup(R)) * Length(Columns(R)); -end); +R -> Length(Rows(R)) * Size(UnderlyingSemigroup(R)) * Length(Columns(R))); InstallMethod(Size, "for a Rees 0-matrix semigroup", [IsReesZeroMatrixSemigroup and HasUnderlyingSemigroup and HasRows and @@ -951,15 +941,19 @@ end); # Pickler ############################################################################# +SEMIGROUPS.PickleRMSOrRZMS := function(str) + Assert(1, IsString(str)); + return function(file, x) + if IO_Write(file, str) = fail + or IO_Pickle(file, [UnderlyingSemigroup(x), Matrix(x)]) = IO_Error then + return IO_Error; + fi; + return IO_OK; + end; +end; + InstallMethod(IO_Pickle, "for a Rees matrix semigroup", -[IsFile, IsReesMatrixSemigroup], -function(file, x) - if IO_Write(file, "RMSX") = fail - or IO_Pickle(file, [UnderlyingSemigroup(x), Matrix(x)]) = IO_Error then - return IO_Error; - fi; - return IO_OK; -end); +[IsFile, IsReesMatrixSemigroup], SEMIGROUPS.PickleRMSOrRZMS("RMSX")); IO_Unpicklers.RMSX := function(file) local x; @@ -971,14 +965,7 @@ IO_Unpicklers.RMSX := function(file) end; InstallMethod(IO_Pickle, "for a Rees 0-matrix semigroup", -[IsFile, IsReesZeroMatrixSemigroup], -function(file, x) - if IO_Write(file, "RZMS") = fail - or IO_Pickle(file, [UnderlyingSemigroup(x), Matrix(x)]) = IO_Error then - return IO_Error; - fi; - return IO_OK; -end); +[IsFile, IsReesZeroMatrixSemigroup], SEMIGROUPS.PickleRMSOrRZMS("RZMS")); IO_Unpicklers.RZMS := function(file) local x; diff --git a/gap/semigroups/semitrans.gi b/gap/semigroups/semitrans.gi index 7aedeb4e7..7d8dcc438 100644 --- a/gap/semigroups/semitrans.gi +++ b/gap/semigroups/semitrans.gi @@ -17,28 +17,22 @@ InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsTransformationSemigroup, IsList], -function(filt, params) - return SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params); -end); +{filt, params} -> SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params)); InstallMethod(SEMIGROUPS_ProcessRandomArgsCons, [IsTransformationMonoid, IsList], -function(filt, params) - return SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params); -end); +{filt, params} -> SEMIGROUPS_ProcessRandomArgsCons(IsSemigroup, params)); InstallMethod(RandomSemigroupCons, "for IsTransformationSemigroup and a list", [IsTransformationSemigroup, IsList], -function(filt, params) +function(_, params) return Semigroup(List([1 .. params[1]], i -> RandomTransformation(params[2]))); end); InstallMethod(RandomMonoidCons, "for IsTransformationMonoid and a list", -[IsTransformationMonoid, IsList], -function(filt, params) - return Monoid(List([1 .. params[1]], i -> RandomTransformation(params[2]))); -end); +[IsTransformationMonoid, IsList], {filt, params} -> +Monoid(List([1 .. params[1]], i -> RandomTransformation(params[2])))); InstallMethod(RandomInverseSemigroupCons, "for IsTransformationSemigroup and a list", @@ -67,15 +61,11 @@ end); InstallMethod(\^, "for a transformation semigroup with generators and perm", [IsTransformationCollection, IsPerm], -function(coll, p) - return List(coll, x -> x ^ p); -end); +{coll, p} -> List(coll, x -> x ^ p)); InstallMethod(\^, "for a transformation semigroup with generators and perm", [IsTransformationSemigroup and HasGeneratorsOfSemigroup, IsPerm], -function(S, p) - return Semigroup(GeneratorsOfSemigroup(S) ^ p); -end); +{S, p} -> Semigroup(GeneratorsOfSemigroup(S) ^ p)); ############################################################################# ## Isomorphisms @@ -84,16 +74,12 @@ end); InstallMethod(IsomorphismSemigroup, "for IsTransformationSemigroup and a semigroup", [IsTransformationSemigroup, IsSemigroup], -function(filt, S) - return IsomorphismTransformationSemigroup(S); -end); +{filt, S} -> IsomorphismTransformationSemigroup(S)); InstallMethod(IsomorphismMonoid, "for IsTransformationMonoid and a semigroup", [IsTransformationMonoid, IsSemigroup], -function(filt, S) - return IsomorphismTransformationMonoid(S); -end); +{filt, S} -> IsomorphismTransformationMonoid(S)); # TODO(later) AntiIsomorphismTransformationSemigroup using LeftCayleyGraph @@ -355,9 +341,7 @@ InstallMethod(DegreeOfTransformationCollection, InstallMethod(DegreeOfTransformationSemigroup, "for a transformation semigroup ideal", [IsTransformationSemigroup and IsSemigroupIdeal], -function(I) - return DegreeOfTransformationSemigroup(SupersemigroupOfIdeal(I)); -end); +{I} -> DegreeOfTransformationSemigroup(SupersemigroupOfIdeal(I))); ############################################################################# ## Action on points and pairs @@ -424,9 +408,7 @@ end); InstallMethod(DigraphOfAction, "for a transformation semigroup with generators, list, and action", [IsTransformationSemigroup and HasGeneratorsOfSemigroup, IsList, IsFunction], -function(S, list, act) - return DigraphOfAction(GeneratorsOfSemigroup(S), list, act); -end); +{S, list, act} -> DigraphOfAction(GeneratorsOfSemigroup(S), list, act)); InstallMethod(DigraphOfActionOnPoints, "for a transformation collection and int", @@ -453,9 +435,7 @@ end); InstallMethod(DigraphOfActionOnPoints, "for a transformation semigroup with known generators and int", [IsTransformationSemigroup and HasGeneratorsOfSemigroup, IsInt], -function(S, n) - return DigraphOfActionOnPoints(GeneratorsOfSemigroup(S), n); -end); +{S, n} -> DigraphOfActionOnPoints(GeneratorsOfSemigroup(S), n)); InstallMethod(DigraphOfActionOnPoints, "for a transformation semigroup with known generators", @@ -482,16 +462,12 @@ end); InstallMethod(IsConnectedTransformationSemigroup, "for a transformation semigroup", [IsTransformationSemigroup], -function(S) - return IsConnectedDigraph(DigraphOfActionOnPoints(S)); -end); +{S} -> IsConnectedDigraph(DigraphOfActionOnPoints(S))); InstallMethod(IsTransitive, "for a transformation collection and a positive int", [IsTransformationCollection, IsPosInt], -function(coll, n) - return IsStronglyConnectedDigraph(DigraphOfActionOnPoints(coll, n)); -end); +{coll, n} -> IsStronglyConnectedDigraph(DigraphOfActionOnPoints(coll, n))); InstallMethod(IsTransitive, "for a transformation collection and homog. list", @@ -513,45 +489,29 @@ end); InstallMethod(IsTransitive, "for a transformation semigroup with generators and a pos. int.", [IsTransformationSemigroup and HasGeneratorsOfSemigroup, IsPosInt], -function(S, n) - return IsTransitive(GeneratorsOfSemigroup(S), n); -end); +{S, n} -> IsTransitive(GeneratorsOfSemigroup(S), n)); InstallMethod(IsTransitive, "for a transformation semigroup with generators", [IsTransformationSemigroup and HasGeneratorsOfSemigroup], -function(S) - return IsTransitive(S, DegreeOfTransformationSemigroup(S)); -end); +{S} -> IsTransitive(S, DegreeOfTransformationSemigroup(S))); InstallMethod(IsTransitive, "for a transformation semigroup with generators and a list", [IsTransformationSemigroup and HasGeneratorsOfSemigroup, IsList], -function(S, set) - return IsTransitive(GeneratorsOfSemigroup(S), set); -end); +{S, set} -> IsTransitive(GeneratorsOfSemigroup(S), set)); InstallMethod(ComponentRepsOfTransformationSemigroup, "for a transformation semigroup", [IsTransformationSemigroup], -function(S) - local D, C; - D := DigraphMutableCopy(DigraphOfActionOnPoints(S)); - C := DigraphStronglyConnectedComponents(D).comps; - DigraphRemoveLoops(QuotientDigraph(D, C)); - return List(DigraphSources(D), x -> DigraphVertexLabel(D, x)[1]); -end); +ComponentRepresentatives); InstallMethod(ComponentsOfTransformationSemigroup, "for a transformation semigroup", [IsTransformationSemigroup], -function(S) - return DigraphConnectedComponents(DigraphOfActionOnPoints(S)).comps; -end); +{S} -> DigraphConnectedComponents(DigraphOfActionOnPoints(S)).comps); InstallMethod(CyclesOfTransformationSemigroup, "for a transformation semigroup", [IsTransformationSemigroup], -function(S) - return DigraphStronglyConnectedComponents(DigraphOfActionOnPoints(S)).comps; -end); +{S} -> DigraphStronglyConnectedComponents(DigraphOfActionOnPoints(S)).comps); InstallMethod(RepresentativeOfMinimalIdealNC, "for a transformation semigroup with known generators", @@ -785,16 +745,12 @@ end); InstallMethod(WreathProduct, "for a transformation monoid and a permutation group", [IsTransformationMonoid, IsPermGroup], -function(M, G) - return WreathProduct(M, AsMonoid(IsTransformationMonoid, G)); -end); +{M, G} -> WreathProduct(M, AsMonoid(IsTransformationMonoid, G))); InstallMethod(WreathProduct, "for a permutation group and a transformation semigroup", [IsPermGroup, IsTransformationSemigroup], -function(G, S) - return WreathProduct(AsMonoid(IsTransformationMonoid, G), S); -end); +{G, S} -> WreathProduct(AsMonoid(IsTransformationMonoid, G), S)); InstallMethod(WreathProduct, "for a transformation monoid and a transformation semigroup", diff --git a/gap/tools/display.gi b/gap/tools/display.gi index a680130d8..a17aa5b3d 100644 --- a/gap/tools/display.gi +++ b/gap/tools/display.gi @@ -18,7 +18,7 @@ SEMIGROUPS.GetTikzInit := function(opts) extra := ""; fi; - return StringFormatted("{1}\n{2}\n{3}\n{4}\n{5}\n", + return StringFormatted("1\n2\n3\n4\n5\n", "%latex", "\\documentclass{minimal}", "\\usepackage{tikz}", @@ -94,15 +94,11 @@ end); InstallMethod(TikzString, "for a pbr collection", [IsPBRCollection], -function(coll) - return TikzString(coll, SEMIGROUPS.TikzPBROpts); -end); +coll -> TikzString(coll, SEMIGROUPS.TikzPBROpts)); InstallMethod(TikzString, "for a pbr", [IsPBR], -function(x) - return TikzString(x, SEMIGROUPS.TikzPBROpts); -end); +x -> TikzString(x, SEMIGROUPS.TikzPBROpts)); InstallMethod(TikzString, "for a pbr and record", [IsPBR, IsRecord], @@ -257,15 +253,11 @@ end); InstallMethod(TikzString, "for a bipartition collection", [IsBipartitionCollection], -function(coll) - return TikzString(coll, SEMIGROUPS.TikzBipartitionOpts); -end); +{coll} -> TikzString(coll, SEMIGROUPS.TikzBipartitionOpts)); InstallMethod(TikzString, "for a bipartition", [IsBipartition], -function(x) - return TikzString(x, SEMIGROUPS.TikzBipartitionOpts); -end); +x -> TikzString(x, SEMIGROUPS.TikzBipartitionOpts)); InstallMethod(TikzString, "for a bipartition and record", [IsBipartition, IsRecord], @@ -411,9 +403,7 @@ end); ############################################################################# InstallMethod(DotString, "for a semigroup", [IsSemigroup], -function(S) - return DotString(S, rec()); -end); +S -> DotString(S, rec())); InstallMethod(DotString, "for a semigroup and record", [IsSemigroup, IsRecord], @@ -658,9 +648,7 @@ end); InstallMethod(TexString, "for a transformation", [IsTransformation], -function(f) - return TexString(f, DegreeOfTransformation(f)); -end); +f -> TexString(f, DegreeOfTransformation(f))); InstallMethod(TexString, "for a transformation collection", [IsTransformationCollection], @@ -671,14 +659,10 @@ function(coll) end); InstallMethod(TikzLeftCayleyDigraph, "for a semigroup", [IsSemigroup], -function(S) - return TikzString(LeftCayleyDigraph(S)); -end); +S -> TikzString(LeftCayleyDigraph(S))); InstallMethod(TikzRightCayleyDigraph, "for a semigroup", [IsSemigroup], -function(S) - return TikzString(RightCayleyDigraph(S)); -end); +S -> TikzString(RightCayleyDigraph(S))); InstallMethod(TikzString, "for a Cayley digraph", [IsCayleyDigraph], function(digraph) @@ -759,11 +743,7 @@ function(digraph) end); InstallMethod(DotLeftCayleyDigraph, "for a semigroup", [IsSemigroup], -function(S) - return DotString(LeftCayleyDigraph(S)); -end); +S -> DotString(LeftCayleyDigraph(S))); InstallMethod(DotRightCayleyDigraph, "for a semigroup", [IsSemigroup], -function(S) - return DotString(RightCayleyDigraph(S)); -end); +S -> DotString(RightCayleyDigraph(S))); diff --git a/gap/tools/io.gi b/gap/tools/io.gi index ce18fdabd..4467318c5 100644 --- a/gap/tools/io.gi +++ b/gap/tools/io.gi @@ -56,7 +56,7 @@ SEMIGROUPS.ReadGeneratorsLine := function(line) i := i + m * (deg + 1) + 1; od; - if Length(line) = 0 then + if IsEmpty(line) then return IO_Nothing; elif line[1] = 't' then # transformations Apply(out, TransformationNC); @@ -134,7 +134,7 @@ end; ############################################################################# InstallGlobalFunction(ReadGenerators, -function(arg) +function(arg...) local name, line_nr, file, decoder, i, obj, out; if Length(arg) = 1 then @@ -201,7 +201,7 @@ function(arg) end); InstallGlobalFunction(WriteGenerators, -function(arg) +function(arg...) local name, collcoll, mode, file, encoder, coll; if Length(arg) = 2 then @@ -232,7 +232,7 @@ function(arg) ErrorNoReturn("there should be 2, 3, or 4 arguments"); fi; - if not (mode = "a" or mode = "w") then + if mode <> "a" and mode <> "w" then ErrorNoReturn("the 3rd argument is not \"a\" or \"w\""); elif IsString(name) then name := UserHomeExpand(name); @@ -346,7 +346,7 @@ end); ################################################################################ InstallGlobalFunction(ReadMultiplicationTable, -function(arg) +function(arg...) local name, line_nr, file, ReadMultiplicationTableLine, i, line, lines; if Length(arg) = 1 then name := arg[1]; @@ -416,7 +416,7 @@ SEMIGROUPS.ReadMultiplicationTableLine := function(line, n) end; InstallGlobalFunction(WriteMultiplicationTable, -function(arg) +function(arg...) local name, coll, mode, file, str, i, j, k, n; if Length(arg) = 2 then @@ -431,7 +431,7 @@ function(arg) ErrorNoReturn("there must be 2 or 3 arguments"); fi; - if not (mode = "a" or mode = "w") then + if mode <> "a" and mode <> "w" then ErrorNoReturn("the 3rd argument is not \"a\" or \"w\""); elif IsString(name) then name := UserHomeExpand(name); @@ -531,7 +531,8 @@ function(str) fi; end; - record.ShallowCopy := function(iter) + # TODO use iter here? Store things in the iterator? + record.ShallowCopy := function(_) local file, line; file := IO_CompressedFile(UserHomeExpand(str), "r"); line := SEMIGROUPS.ReadMultiplicationTableLine(Chomp(IO_ReadLine(file)), n); diff --git a/gap/tools/iterators.gi b/gap/tools/iterators.gi index 3aab77959..c7c971796 100644 --- a/gap/tools/iterators.gi +++ b/gap/tools/iterators.gi @@ -183,7 +183,7 @@ end); # for: baseiter, convert[, record, isnew] InstallGlobalFunction(WrappedIterator, -function(arg) +function(arg...) local iter; iter := rec(); diff --git a/gap/tools/utils.gi b/gap/tools/utils.gi index 70a22c2f8..419e9e953 100644 --- a/gap/tools/utils.gi +++ b/gap/tools/utils.gi @@ -40,7 +40,7 @@ end); SEMIGROUPS.TestRec := rec(); -SEMIGROUPS.TestRec.reportDiff := function(inp, expout, found, fnam, line, time) +SEMIGROUPS.TestRec.reportDiff := function(inp, expout, found, fnam, line, _) Print("######## > Diff in:\n"); if IsStream(fnam) then Print("test stream, line ", line, "\n"); @@ -209,7 +209,7 @@ end; ############################################################################# InstallGlobalFunction(SemigroupsTestInstall, -function(arg) +function(arg...) local opts, name; opts := ShallowCopy(SEMIGROUPS.TestRec); if Length(arg) = 1 and IsRecord(arg[1]) then @@ -229,15 +229,15 @@ function(arg) end); InstallGlobalFunction(SemigroupsTestStandard, -function(arg) +function(arg...) return SEMIGROUPS.TestDir(DirectoriesPackageLibrary("semigroups", "tst/standard/")[1]![1], arg); end); InstallGlobalFunction(SemigroupsTestExtreme, -function(arg) - if Length(arg) = 0 then +function(arg...) + if IsEmpty(arg) then arg := [rec(showProgress := "some")]; elif IsRecord(arg[1]) and not IsBound(arg[1].showProgress) then arg[1].showProgress := "some"; @@ -248,7 +248,7 @@ function(arg) end); InstallGlobalFunction(SemigroupsTestAll, -function(arg) +function(arg...) SemigroupsMakeDoc(); if not CallFuncList(SemigroupsTestInstall, arg) then Print("Abort: SemigroupsTestInstall failed . . . \n"); @@ -387,12 +387,12 @@ SEMIGROUPS.RunExamples := function(exlists, nums, excluded) return true; end; -SEMIGROUPS.TestManualExamples := function(arg) +SEMIGROUPS.TestManualExamples := function(arg...) local ex, nums, doc, tree, mansect, tester, actual, omit, acting, passed, str; ex := SEMIGROUPS.ManualExamples(); - if Length(arg) = 0 then + if IsEmpty(arg) then nums := [1 .. Length(ex)]; elif Length(arg) = 1 then if IsPosInt(arg[1]) and arg[1] <= Length(ex) then @@ -525,7 +525,7 @@ SEMIGROUPS.CheckManSectionTypes := function(doc, verbose...) referrcount, warncount, type, matches, match, matches2, stats, elt, t, s; - if Length(verbose) = 0 then + if IsEmpty(verbose) then display_warnings := false; else display_warnings := verbose[1]; @@ -580,7 +580,7 @@ SEMIGROUPS.CheckManSectionTypes := function(doc, verbose...) type := First(types, t -> IsBound(elt.attributes.(t))); if type <> fail then matches := Filtered(x, t -> t.attributes.Name = elt.attributes.(type)); - if Length(matches) = 0 then + if IsEmpty(matches) then pos := OriginalPositionDocument(doc[2], elt.start); Print(pos[1], ":", pos[2], " : no match for ", type, " := ", elt.attributes.(type), "\n"); @@ -598,7 +598,7 @@ SEMIGROUPS.CheckManSectionTypes := function(doc, verbose...) match := matches[1]; else matches2 := Filtered(matches, t -> not IsBound(t.attributes.Label)); - if Length(matches2) = 0 then + if IsEmpty(matches2) then pos := OriginalPositionDocument(doc[2], elt.start); Print(pos[1], ":", pos[2], " : no match (wrong type or missing label?) for ", type, " := ", @@ -665,7 +665,7 @@ SEMIGROUPS.CheckDocCoverage := function(doc) for mansect in x do pos := OriginalPositionDocument(doc[2], mansect.start); y := XMLElements(mansect, ["Example"]); - if Length(y) = 0 then + if IsEmpty(y) then if IsBound(mansect.content[1].attributes) and IsBound(mansect.content[1].attributes.Name) then Print(pos[1], ":", pos[2], " : ", mansect.content[1].attributes.Name); diff --git a/makedoc.g b/makedoc.g index 9416fe2ca..63710325e 100644 --- a/makedoc.g +++ b/makedoc.g @@ -72,8 +72,7 @@ for Pkg in PkgInfo.Dependencies.NeededOtherPackages do od; ARCHIVENAME := SplitString(PkgInfo.ArchiveURL, "/"); -ARCHIVENAME := Concatenation(ARCHIVENAME[Length(ARCHIVENAME)], - PkgInfo.ArchiveFormats); +ARCHIVENAME := Concatenation(Last(ARCHIVENAME), PkgInfo.ArchiveFormats); XMLEntities.ARCHIVENAME := ARCHIVENAME; XMLEntities.SEMIGROUPS := PackageEntity("Semigroups"); diff --git a/tst/extreme/bipart.tst b/tst/extreme/bipart.tst index f133dff98..b774b935d 100644 --- a/tst/extreme/bipart.tst +++ b/tst/extreme/bipart.tst @@ -21,21 +21,21 @@ gap> SEMIGROUPS.StartTest(); gap> S := DualSymmetricInverseMonoid(4); gap> IsomorphismTransformationMonoid(S); - -> + -> gap> S := Semigroup(Bipartition([[1, 2, 3, 4, -2, -3], [-1], [-4]]), > Bipartition([[1, 2, -1, -3], [3, 4, -2, -4]]), > Bipartition([[1, 3, -1], [2, 4, -2, -3], [-4]]), > Bipartition([[1, -4], [2], [3, -2], [4, -1], [-3]]));; gap> IsomorphismTransformationSemigroup(S); - -> + -> gap> S := Monoid(Bipartition([[1, 2, -2], [3], [4, -3, -4], [-1]]), > Bipartition([[1, 3, -3, -4], [2, 4, -1, -2]]), > Bipartition([[1, -1, -2], [2, 3, -3, -4], [4]]), > Bipartition([[1, 4, -4], [2, -1], [3, -2, -3]]));; gap> IsomorphismTransformationMonoid(S); - -> + -> # the number of iterations, change here to get faster test @@ -45,10 +45,10 @@ gap> N := 333;; gap> classes := [[1, 2, 3, -2], [4, -5], [5, -7], [6, -3, -4], [7], [-1], > [-6]];; gap> f := Bipartition(classes); - gap> LeftProjection(f); - # BipartitionTest3: different order of classes @@ -62,7 +62,7 @@ gap> f := Bipartition([[1, 2, -3, -5, -6], [3, -2, -4], [4, 7], gap> LeftProjection(f); - # BipartitionTest4: ASSOCIATIVITY @@ -72,14 +72,12 @@ gap> ForAll(triples, x -> ((x[1] * x[2]) * x[3]) = (x[1] * (x[2] * x[3]))); true # BipartitionTest5: EMBEDDING into T_n -gap> l := List([1, 2, 3, 4, 5, 15, 35, 1999, 64999, 65000], -> i -> RandomTransformation(i));; +gap> l := List([1, 2, 3, 4, 5, 15, 35, 1999, 64999, 65000], RandomTransformation);; gap> ForAll(l, t -> t = AsTransformation(AsBipartition(t))); true # BipartitionTest6: checking IsTransBipartitition -gap> l := List([1, 2, 3, 4, 5, 15, 35, 1999, 30101, 54321], -> i -> RandomTransformation(i));; +gap> l := List([1, 2, 3, 4, 5, 15, 35, 1999, 30101, 54321], RandomTransformation);; gap> ForAll(l, t -> IsTransBipartition(AsBipartition(t))); true @@ -108,7 +106,7 @@ true gap> f := Bipartition([[1, 2, 3], [4, -1, -3], [5, 6, -4, -5], > [-2], [-6]]);; gap> AsBipartition(f, 8); - gap> AsBipartition(f, 6); @@ -155,7 +153,7 @@ true gap> R := PrincipalFactor(D); gap> f := IsomorphismSemigroup(IsBipartitionSemigroup, R); - -> + -> gap> g := InverseGeneralMapping(f);; gap> ForAll(R, x -> (x ^ f) ^ g = x); @@ -173,7 +171,7 @@ gap> s := Semigroup(gens);; gap> S := Range(IsomorphismSemigroup(IsBipartitionSemigroup, s)); gap> f := IsomorphismSemigroup(IsBipartitionSemigroup, s); - -> + -> gap> g := InverseGeneralMapping(f);; gap> ForAll(s, x -> (x ^ f) ^ g = x); @@ -198,7 +196,7 @@ gap> S := Semigroup(Transformation([1, 3, 4, 1, 3]), gap> T := Range(IsomorphismSemigroup(IsBipartitionSemigroup, S)); gap> f := IsomorphismTransformationSemigroup(T); - -> + -> gap> g := InverseGeneralMapping(f);; gap> ForAll(T, x -> (x ^ f) ^ g = x); @@ -226,10 +224,10 @@ gap> Generators(S); [ [2,3,4](1), [1,2,5](3), [3,2,1,4], [3,1,2,4,5], (1,5,3) ] gap> Generators(T); [ - , , , - , + , , , + , ] gap> Size(S); @@ -266,7 +264,7 @@ gap> ForAll(S, x -> (x ^ g) ^ f = x); true # BipartitionTest18 -# Testing the cases to which the new methods for +# Testing the cases to which the new methods for # IsomorphismPartialPermSemigroup and IsomorphismTransformationSemigroup # don't apply gap> S := Semigroup( @@ -307,9 +305,9 @@ gap> D := DClass(S, > Bipartition([[1], [2, -3], [3, -4], [4, -5], [5], [-1], > [-2]]));; gap> G := GroupHClass(D);; -gap> G = GreensHClassOfElement(S, Bipartition([[1], [2], [3, -3], [4, -4], -> [5, -5], [-1], [-2]])) -> or G = GreensHClassOfElement(S, Bipartition([[1], [2, -1, -2], [3, -3], +gap> G = GreensHClassOfElement(S, Bipartition([[1], [2], [3, -3], [4, -4], +> [5, -5], [-1], [-2]])) +> or G = GreensHClassOfElement(S, Bipartition([[1], [2, -1, -2], [3, -3], > [4, -4, -5], [5]])); true gap> IsomorphismPermGroup(G);; @@ -326,7 +324,7 @@ gap> Size(S); gap> Size(T); 281 gap> IsomorphismPartialPermSemigroup(T); - -> + -> gap> Size(Range(last)); 281 @@ -341,7 +339,7 @@ gap> S := InverseSemigroup( > PartialPerm([1, 2, 3, 6, 8, 10], [2, 6, 7, 9, 1, 5]), > PartialPerm([1, 2, 3, 4, 6, 7, 8, 10], [3, 8, 1, 9, 4, 10, 5, 6]));; gap> AsBlockBijection(S.1); - gap> S.1; [3,7][8,1,2,6,9][10,5] @@ -408,27 +406,27 @@ false gap> First(Idempotents(S), e -> e * g = f); gap> Set(Filtered(S, f -> NaturalLeqBlockBijection(f, g))); -[ , - , - , - , +[ , + , + , + , ] gap> Set(Filtered(S, f -> ForAny(Idempotents(S), e -> e * f = g))); [ ] gap> Set(Filtered(S, f -> ForAny(Idempotents(S), e -> e * g = f))); -[ , - , - , - , +[ , + , + , + , ] # BipartitionTest25: Factorization/EvaluateWord gap> S := DualSymmetricInverseMonoid(6);; gap> f := S.1 * S.2 * S.3 * S.2 * S.1; - gap> EvaluateWord(GeneratorsOfSemigroup(S), Factorization(S, f)); - gap> S := PartitionMonoid(5);; gap> f := Bipartition([[1, 4, -2, -3], [2, 3, 5, -5], [-1, -4]]);; @@ -456,7 +454,7 @@ gap> IsInverseSemigroup(S); false # BipartitionTest26: -# Tests of things in greens-generic.xml in the order they appear in that file. +# Tests of things in greens-generic.xml in the order they appear in that file. gap> S := Semigroup( > Bipartition([[1, -1], [2, -2], [3, -3], [4, -4], [5, -8], > [6, -9], [7, -10], [8, -11], [9, -12], [10, -13], [11, -5], @@ -472,26 +470,26 @@ gap> f := Bipartition([[1, 2, 3, 4, 7, 8, 11, 13], [5, 9], [6, 10, 12], > [-1, -2, -6], [-3], [-4, -8], [-5, -11], [-7, -10, -13], [-9], > [-12]]);; gap> H := HClassNC(S, f); -> gap> IsGreensClassNC(H); true gap> MultiplicativeNeutralElement(H); - gap> StructureDescription(H); "1" gap> H := HClassNC(S, f); -> gap> f := Bipartition([[1, 2, 5, 6, 7, 8, 9, 10, 11, 12, -1, -10, -12, -13], > [3, 4, 13], [-2, -9], [-3, -7, -8], [-4], [-5], [-6, -11]]);; gap> HH := HClassNC(S, f); -> gap> HH < H; false @@ -500,12 +498,12 @@ true gap> H = HH; false gap> D := DClass(H); -> gap> DD := DClass(HH); -> gap> DD < D; true @@ -572,7 +570,7 @@ gap> D := DClassNC(S, f); > gap> D := [D]; -[ > ] gap> D[2] := DClass(S, f);; gap> D[3] := DClass(RClass(S, f));; @@ -751,1963 +749,1963 @@ gap> S := Semigroup([ > Bipartition([[1, 5, -8], [2, -4], [3, 6, 8, -1, -6], > [4, 7, -2, -3, -5], [-7]])], rec(acting := true));; gap> DClassReps(S); -[ , - , , - , , +[ , + , , + , , , - , , - , - , - , - , , - , - , - , - , - , - , - , - , , - , - , + , [ -7 ], [ -8 ]>, + , , + , + , + , + , , + , + , + , + , + , + , + , + , , + , + , , - , - , - , , - , - , - , , - , , - , , - , , + , [ -7 ], [ -8 ]>, + , + , + , , + , + , + , , + , , + , , + , , , , - , - , , - , - , , - , - , , - , - , , - , , - , - , , - , - , - , - , - , , - , , - , - , - , - , , - , , - , , - , , - , , - , - , - , , - , - , - , , - , - , - , - , - , - , - , - , - , - , , - , , - , - , - , - , - , , - , - , - , - , - , - , - , - , , - , - , - , - , , - , - , - , , - , - , - , - , - , , - , - , - , - , - , , - , , - , , - , - , - , - , - , , - , - , - , , - , - , , - , - , - , - , , - , , - , - , - , , - , - , - , - , - , , - , , - , , - , - , - , , - , , - , - , , - , - , - , - , - , , - , , + , + , , + , + , , + , + , , + , + , , + , , + , + , , + , + , + , + , + , , + , , + , + , + , + , , + , , + , , + , , + , , + , + , + , , + , + , + , , + , + , + , + , + , + , + , + , + , + , , + , , + , + , + , + , + , , + , + , + , + , + , + , + , + , , + , + , + , + , , + , + , + , , + , + , + , + , + , , + , + , + , + , + , , + , , + , , + , + , + , + , + , , + , + , + , , + , + , , + , + , + , + , , + , , + , + , + , , + , + , + , + , + , , + , , + , , + , + , + , , + , , + , + , , + , + , + , + , + , , + ] gap> RClassReps(S); -[ , - , , - , , +[ , + , , + , , , - , , - , , - , - , - , - , , - , - , , - , - , - , - , , - , - , - , - , - , - , - , - , - , - , - , - , - , - , , - , - , , - , , - , - , - , - , - , - , - , , + , [ -7 ], [ -8 ]>, + , , + , , + , + , + , + , , + , + , , + , + , + , + , , + , + , + , + , + , + , + , + , + , + , + , + , + , + , , + , + , , + , , + , + , + , + , + , + , + , , , - , - , - , - , - , , - , , - , , - , - , , - , - , - , , - , - , - , - , - , , - , - , , - , - , - , , - , , - , - , - , , - , - , , - , , - , + , [ -7 ], [ -8 ]>, + , + , + , + , + , , + , , + , , + , + , , + , + , + , , + , + , + , + , + , , + , + , , + , + , + , , + , , + , + , + , , + , + , , + , , + , , - , - , , - , - , , - , - , - , - , - , - , - , - , - , - , - , - , - , + , + , , + , + , , + , + , + , + , + , + , + , + , + , + , + , + , + , , - , , - , - , - , - , - , - , - , - , - , - , , - , + , [ -3 ], [ -6, -8 ]>, + , , + , + , + , + , + , + , + , + , + , + , , + , , , - , - , - , - , - , - , - , - , - , , - , , - , - , - , - , , - , , - , - , - , , - , - , - , - , - , - , - , , - , - , - , - , - , - , - , - , - , - , - , , - , - , - , - , - , - , - , - , , - , - , - , , - , - , , - , - , , - , , - , , - , - , - , - , - , - , , - , - , - , , - , - , - , - , - , - , - , - , - , - , - , - , - , - , , - , - , - , - , - , - , - , - , - , + , [ -7 ], [ -8 ]>, , + , + , + , + , + , + , + , + , + , , + , , + , + , + , + , , + , , + , + , + , , + , + , + , + , + , + , + , , + , + , + , + , + , + , + , + , + , + , + , , + , + , + , + , + , + , + , + , , + , + , + , , + , + , , + , + , , + , , + , , + , + , + , + , + , + , , + , + , + , , + , + , + , + , + , + , + , + , + , + , + , + , + , + , , + , + , + , + , + , + , + , + , + , , , - , - , - , - , - , - , - , - , - , , - , , - , - , - , , - , - , - , , - , - , - , , - , , - , - , , - , - , - , - , - , , - , - , - , - , , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , , - , , - , , - , , - , - , , - , - , - , - , , - , - , - , - , , - , - , - , , - , - , , - , , - , - , , - , - , , + , [ -7 ], [ -8 ]>, , + , + , + , + , + , + , + , + , + , , + , , + , + , + , , + , + , + , , + , + , + , , + , , + , + , , + , + , + , + , + , , + , + , + , + , , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , , + , , + , , + , , + , + , , + , + , + , + , , + , + , + , + , , + , + , + , , + , + , , + , , + , + , , + , + , , , , - , , - , , - , - , - , - , - , - , - , - , - , - , - , , - , - , - , - , - , - , - , - , - , - , - , - , - , - , , - , - , - , - , - , - , - , - , - , , - , - , - , - , , - , - , - , - , , - , , - , - , - , - , , - , - , - , + , [ -7, -8 ]>, , + , , + , , + , + , + , + , + , + , + , + , + , + , + , , + , + , + , + , + , + , + , + , + , + , + , + , + , + , , + , + , + , + , + , + , + , + , + , , + , + , + , + , , + , + , + , + , , + , , + , + , + , + , , + , + , + , , - , , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , , - , , - , - , - , , - , - , , - , , - , , - , - , - , - , - , - , - , - , , - , - , - , - , - , - , - , , - , , - , , - , - , - , - , , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , , - , - , , - , - , , - , - , , - , - , , - , - , - , - , - , - , - , - , , - , - , - , - , - , - , , - , , + , [ -2 ]>, + , , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , , + , , + , + , + , , + , + , , + , , + , , + , + , + , + , + , + , + , + , , + , + , + , + , + , + , + , , + , , + , , + , + , + , + , , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , , + , + , , + , + , , + , + , , + , + , , + , + , + , + , + , + , + , + , , + , + , + , + , + , + , , + , , , - , + , , - , , - , , + , [ -4, -5 ], [ -7 ], [ -8 ]>, + , , + , , , , - , , + , [ -2 ]>, , + , , , , - , , - , - , - , , - , , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , , - , - , - , , - , , - , - , - , - , , - , , - , - , , - , - , - , - , - , , - , - , - , - , - , , - , - , , - , - , - , , - , - , , - , - , - , , - , , - , - , , - , , - , , - , - , - , - , - , - , , - , - , - , - , - , - , - , - , , - , - , , - , - , - , - , , - , - , , - , , - , - , - , , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , , - , , - , - , - , - , - , + , [ -2 ]>, , + , , + , + , + , , + , , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , , + , + , + , , + , , + , + , + , + , , + , , + , + , , + , + , + , + , + , , + , + , + , + , + , , + , + , , + , + , + , , + , + , , + , + , + , , + , , + , + , , + , , + , , + , + , + , + , + , + , , + , + , + , + , + , + , + , + , , + , + , , + , + , + , + , , + , + , , + , , + , + , + , , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , , + , , + , + , + , + , + , , , - , - , - , - , - , - , , - , - , - , - , , - , - , - , - , - , , - , - , , - , - , - , - , , - , - , - , - , - , - , - , - , , - , - , - , , - , - , - , , - , - , - , - , - , - , - , - , - , - , , - , , - , - , - , - , , - , - , - , - , - , - , , - , - , - , - , , - , - , - , - , + , [ -2 ]>, , + , + , + , + , + , + , , + , + , + , + , , + , + , + , + , + , , + , + , , + , + , + , + , , + , + , + , + , + , + , + , + , , + , + , + , , + , + , + , , + , + , + , + , + , + , + , + , + , + , , + , , + , + , + , + , , + , + , + , + , + , + , , + , + , + , + , , + , + , + , + , , - , - , - , , - , - , + , [ -2 ]>, + , + , + , , + , + , , , - , - , - , - , , + , [ -2 ]>, , + , + , + , + , , , - , , - , - , , - , - , - , , - , - , - , , - , , - , - , - , - , - , - , - , - , , - , - , - , - , - , , - , - , , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , , - , - , - , , - , , - , - , , - , - , , - , - , - , , - , + , [ -2 ]>, + , , + , + , , + , + , + , , + , + , + , , + , , + , + , + , + , + , + , + , + , , + , + , + , + , + , , + , + , , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , , + , + , + , , + , , + , + , , + , + , , + , + , + , , + , , , - , - , - , , - , , - , - , - , - , , - , - , - , , - , , - , , - , - , - , - , , - , - , - , - , - , - , - , - , - , + , [ -7 ]>, , + , + , + , , + , , + , + , + , + , , + , + , + , , + , , + , , + , + , + , + , , + , + , + , + , + , + , + , + , + , , - , - , , - , - , + , [ -2 ]>, + , + , , + , + , , , - , - , , - , - , , - , - , , - , - , , - , - , - , - , - , - , - , , - , , + , [ -7 ]>, , + , + , , + , + , , + , + , , + , + , , + , + , + , + , + , + , + , , + , , , - , , - , - , - , , - , - , - , - , - , - , - , - , + , [ -7 ]>, + , , + , + , + , , + , + , + , + , + , + , + , + , , - , , - , + , , + ] gap> LClassReps(D);; gap> x := Bipartition([[1, 3, 4, 6, 7, -3, -4, -5, -6, -8], > [2, 5, 8, -1, -7], [-2]]);; gap> D := DClass(S, x); -> gap> LClassReps(D); -[ ] gap> L := LClass(S, Bipartition([[1], [2, 4], [3, 6, -3, -4, -5, -6, -8], > [5, 7, 8, -1, -7], [-2]])); @@ -2715,7 +2713,7 @@ gap> L := LClass(S, Bipartition([[1], [2, 4], [3, 6, -3, -4, -5, -6, -8], , [ 5, 7, 8, -1, -7 ], [ -2 ]>> gap> LL := LClassNC(S, Bipartition([[1, 3, 4, 6, 7, -3, -4, -5, -6, -8], [2, > 5, 8, -1, -7], [-2]])); -> gap> LL = L; true @@ -2728,14 +2726,14 @@ gap> Size(LL); gap> x := Bipartition([[1], [2, 4], [3, 6, 8, -1, -3, -5, -7], > [5, 7, -4, -6, -8], [-2]]);; gap> D := DClass(RClassNC(S, x)); -> gap> GroupHClass(D); fail gap> IsRegularDClass(D); false gap> D := DClass(S, x); -> gap> IsRegularDClass(D); false @@ -2746,17 +2744,17 @@ false gap> NrRegularDClasses(S); 4 gap> First(DClasses(S), IsRegularDClass); -> gap> Size(last); 12078 gap> GroupHClass(last2); -> gap> StructureDescription(last); "1" gap> D := First(DClasses(S), IsRegularDClass); -> gap> NrRClasses(D); 99 @@ -2782,8 +2780,8 @@ gap> PartialOrderOfDClasses(S); gap> StructureDescriptionMaximalSubgroups(S); [ "1", "C2" ] -gap> (IsActingSemigroup(S) -> and StructureDescriptionSchutzenbergerGroups(S) = ["1", "C2"]) +gap> (IsActingSemigroup(S) +> and StructureDescriptionSchutzenbergerGroups(S) = ["1", "C2"]) > or not IsActingSemigroup(S); true @@ -2800,6 +2798,6 @@ true gap> ForAll(S, x -> (x ^ iso) ^ inv = x); true -# +# gap> SEMIGROUPS.StopTest(); gap> STOP_TEST("Semigroups package: extreme/bipart.tst"); diff --git a/tst/extreme/greens-acting.tst b/tst/extreme/greens-acting.tst index 86737b3aa..1ea786418 100644 --- a/tst/extreme/greens-acting.tst +++ b/tst/extreme/greens-acting.tst @@ -256,23 +256,23 @@ gap> for x in gens do > Add(out, [NrRClasses(s), Size(s)]); > od; gap> out; -[ [ 3, 4 ], [ 2, 10 ], [ 3, 14 ], [ 12, 211 ], [ 4, 28 ], [ 378, 4818 ], - [ 2, 5 ], [ 92, 7142 ], [ 81, 615 ], [ 2, 4 ], [ 158, 2255 ], [ 18, 99 ], - [ 9, 50 ], [ 16, 76 ], [ 17, 77 ], [ 6, 13 ], [ 19, 330 ], [ 120, 1263 ], - [ 1, 1 ], [ 14, 53 ], [ 216, 1306 ], [ 6, 12 ], [ 15, 235 ], [ 23, 235 ], - [ 2, 2 ], [ 3, 9 ], [ 2, 2 ], [ 17, 206 ], [ 22, 506 ], [ 24, 340 ], - [ 7, 39 ], [ 99, 495 ], [ 10, 18 ], [ 10, 100 ], [ 34, 843 ], [ 14, 210 ], - [ 546, 3538 ], [ 2, 3 ], [ 2, 3 ], [ 35, 448 ], [ 21, 515 ], [ 9, 14 ], - [ 5, 11 ], [ 17, 23 ], [ 28, 763 ], [ 15, 199 ], [ 21, 170 ], [ 11, 142 ], - [ 2, 2 ], [ 33, 1259 ], [ 6, 25 ], [ 64, 426 ], [ 9, 40 ], [ 46, 388 ], - [ 6, 25 ], [ 11, 49 ], [ 48, 391 ], [ 7, 40 ], [ 13, 18 ], [ 6, 48 ], - [ 30, 792 ], [ 7, 11 ], [ 1, 3 ], [ 2, 3 ], [ 8, 17 ], [ 15, 115 ], - [ 49, 1724 ], [ 8, 45 ], [ 6, 46 ], [ 8, 66 ], [ 2, 4 ], [ 1, 3 ], - [ 322, 4344 ], [ 30, 661 ], [ 1597, 63890 ], [ 10, 76 ], [ 173, 9084 ], - [ 74, 3931 ], [ 15, 117 ], [ 163, 4804 ], [ 14, 106 ], [ 10, 28 ], - [ 1, 2 ], [ 53, 328 ], [ 1, 1 ], [ 17, 26 ], [ 172, 1443 ], [ 230, 15176 ], - [ 83, 1382 ], [ 158, 1074 ], [ 2, 2 ], [ 26, 535 ], [ 3, 6 ], [ 3, 3 ], - [ 44, 1834 ], [ 158, 1776 ], [ 19, 326 ], [ 9, 45 ], [ 32, 379 ], +[ [ 3, 4 ], [ 2, 10 ], [ 3, 14 ], [ 12, 211 ], [ 4, 28 ], [ 378, 4818 ], + [ 2, 5 ], [ 92, 7142 ], [ 81, 615 ], [ 2, 4 ], [ 158, 2255 ], [ 18, 99 ], + [ 9, 50 ], [ 16, 76 ], [ 17, 77 ], [ 6, 13 ], [ 19, 330 ], [ 120, 1263 ], + [ 1, 1 ], [ 14, 53 ], [ 216, 1306 ], [ 6, 12 ], [ 15, 235 ], [ 23, 235 ], + [ 2, 2 ], [ 3, 9 ], [ 2, 2 ], [ 17, 206 ], [ 22, 506 ], [ 24, 340 ], + [ 7, 39 ], [ 99, 495 ], [ 10, 18 ], [ 10, 100 ], [ 34, 843 ], [ 14, 210 ], + [ 546, 3538 ], [ 2, 3 ], [ 2, 3 ], [ 35, 448 ], [ 21, 515 ], [ 9, 14 ], + [ 5, 11 ], [ 17, 23 ], [ 28, 763 ], [ 15, 199 ], [ 21, 170 ], [ 11, 142 ], + [ 2, 2 ], [ 33, 1259 ], [ 6, 25 ], [ 64, 426 ], [ 9, 40 ], [ 46, 388 ], + [ 6, 25 ], [ 11, 49 ], [ 48, 391 ], [ 7, 40 ], [ 13, 18 ], [ 6, 48 ], + [ 30, 792 ], [ 7, 11 ], [ 1, 3 ], [ 2, 3 ], [ 8, 17 ], [ 15, 115 ], + [ 49, 1724 ], [ 8, 45 ], [ 6, 46 ], [ 8, 66 ], [ 2, 4 ], [ 1, 3 ], + [ 322, 4344 ], [ 30, 661 ], [ 1597, 63890 ], [ 10, 76 ], [ 173, 9084 ], + [ 74, 3931 ], [ 15, 117 ], [ 163, 4804 ], [ 14, 106 ], [ 10, 28 ], + [ 1, 2 ], [ 53, 328 ], [ 1, 1 ], [ 17, 26 ], [ 172, 1443 ], [ 230, 15176 ], + [ 83, 1382 ], [ 158, 1074 ], [ 2, 2 ], [ 26, 535 ], [ 3, 6 ], [ 3, 3 ], + [ 44, 1834 ], [ 158, 1776 ], [ 19, 326 ], [ 9, 45 ], [ 32, 379 ], [ 23, 149 ] ] gap> m := Semigroup(gens[32]);; gap> Size(m); @@ -309,145 +309,145 @@ gap> for x in gens do > Add(out, NrLClasses(s)); > od; gap> out; -[ 3, 5, 2, 19, 9, 46, 2, 39, 25, 2, 789, 21, 11, 25, 42, 10, 23, 87, 1, 24, - 195, 9, 15, 28, 2, 7, 2, 18, 26, 25, 10, 45, 13, 11, 94, 15, 80, 2, 2, 103, - 21, 10, 7, 14, 27, 14, 20, 13, 2, 30, 9, 23, 17, 34, 8, 13, 31, 10, 17, 12, - 68, 10, 1, 2, 8, 22, 201, 7, 10, 11, 2, 1, 363, 68, 2423, 11, 57, 84, 12, - 156, 16, 10, 1, 52, 1, 20, 257, 74, 333, 74, 2, 28, 3, 3, 35, 93, 18, 16, +[ 3, 5, 2, 19, 9, 46, 2, 39, 25, 2, 789, 21, 11, 25, 42, 10, 23, 87, 1, 24, + 195, 9, 15, 28, 2, 7, 2, 18, 26, 25, 10, 45, 13, 11, 94, 15, 80, 2, 2, 103, + 21, 10, 7, 14, 27, 14, 20, 13, 2, 30, 9, 23, 17, 34, 8, 13, 31, 10, 17, 12, + 68, 10, 1, 2, 8, 22, 201, 7, 10, 11, 2, 1, 363, 68, 2423, 11, 57, 84, 12, + 156, 16, 10, 1, 52, 1, 20, 257, 74, 333, 74, 2, 28, 3, 3, 35, 93, 18, 16, 25, 33 ] gap> ForAll(GreensLClasses(m), x -> ForAll(Idempotents(x), y -> > y in x)); true gap> idem := Set(Concatenation(List(GreensLClasses(m), Idempotents))); -[ Transformation( [ 1, 1, 1, 1, 1, 1, 1 ] ), - Transformation( [ 1, 1, 1, 1, 5, 1, 1 ] ), - Transformation( [ 1, 1, 1, 1, 5, 1, 5 ] ), - Transformation( [ 1, 1, 1, 1, 5, 5, 1 ] ), - Transformation( [ 1, 1, 1, 4, 1, 1, 1 ] ), - Transformation( [ 1, 1, 1, 4, 1, 4, 1 ] ), - Transformation( [ 1, 1, 1, 4, 4, 1, 4 ] ), - Transformation( [ 1, 1, 1, 4, 5, 1, 5 ] ), - Transformation( [ 1, 1, 1, 5, 5, 1, 5 ] ), - Transformation( [ 1, 1, 4, 4, 1, 1, 1 ] ), - Transformation( [ 1, 1, 4, 4, 4, 1, 4 ] ), - Transformation( [ 1, 1, 5, 5, 5, 1, 5 ] ), - Transformation( [ 1, 2, 1, 1, 1, 1, 1 ] ), - Transformation( [ 1, 2, 1, 1, 2, 1, 1 ] ), - Transformation( [ 1, 2, 1, 1, 2, 1, 2 ] ), - Transformation( [ 1, 2, 1, 1, 2, 2, 2 ] ), - Transformation( [ 1, 2, 1, 1, 5, 1, 1 ] ), - Transformation( [ 1, 2, 1, 2, 2, 1, 2 ] ), - Transformation( [ 1, 2, 1, 2, 2, 2, 2 ] ), - Transformation( [ 1, 2, 2, 1, 1, 1, 1 ] ), - Transformation( [ 1, 2, 2, 1, 1, 2, 1 ] ), - Transformation( [ 1, 2, 2, 1, 2, 2, 1 ] ), - Transformation( [ 1, 2, 2, 1, 5, 5, 1 ] ), - Transformation( [ 1, 4, 1, 4, 4, 1, 4 ] ), - Transformation( [ 1, 4, 1, 4, 4, 4, 4 ] ), - Transformation( [ 1, 5, 1, 1, 5, 1, 1 ] ), - Transformation( [ 1, 5, 1, 1, 5, 1, 5 ] ), - Transformation( [ 1, 5, 1, 1, 5, 5, 5 ] ), - Transformation( [ 1, 5, 1, 4, 5, 4, 5 ] ), - Transformation( [ 1, 5, 1, 5, 5, 1, 5 ] ), - Transformation( [ 1, 5, 1, 5, 5, 5, 5 ] ), - Transformation( [ 1, 5, 5, 1, 5, 5, 1 ] ), - Transformation( [ 2, 2, 2, 2, 2, 2, 2 ] ), - Transformation( [ 2, 2, 2, 2, 2, 6, 2 ] ), - Transformation( [ 2, 2, 2, 2, 5, 2, 2 ] ), - Transformation( [ 2, 2, 2, 2, 5, 2, 5 ] ), - Transformation( [ 2, 2, 2, 2, 5, 5, 2 ] ), - Transformation( [ 2, 2, 2, 2, 6, 6, 2 ] ), - Transformation( [ 2, 2, 2, 2, 7, 2, 7 ] ), - Transformation( [ 2, 2, 2, 5, 5, 2, 5 ] ), - Transformation( [ 2, 2, 2, 6, 2, 6, 2 ] ), - Transformation( [ 2, 2, 2, 7, 7, 2, 7 ] ), - Transformation( [ 2, 2, 5, 5, 5, 2, 5 ] ), - Transformation( [ 2, 2, 7, 7, 7, 2, 7 ] ), - Transformation( [ 3, 3, 3, 3, 3, 3, 3 ] ), - Transformation( [ 3, 3, 3, 3, 5, 3, 3 ] ), - Transformation( [ 3, 3, 3, 3, 5, 3, 5 ] ), - Transformation( [ 3, 3, 3, 3, 5, 5, 3 ] ), - Transformation( [ 3, 3, 3, 3, 7, 3, 7 ] ), - Transformation( [ 3, 3, 3, 4, 3, 3, 3 ] ), - Transformation( [ 3, 3, 3, 4, 3, 4, 3 ] ), - Transformation( [ 3, 3, 3, 4, 4, 3, 4 ] ), - Transformation( [ 3, 3, 3, 4, 5, 3, 5 ] ), - Transformation( [ 3, 3, 3, 4, 7, 3, 7 ] ), - Transformation( [ 3, 3, 3, 5, 5, 3, 5 ] ), - Transformation( [ 3, 3, 3, 7, 7, 3, 7 ] ), - Transformation( [ 3, 4, 3, 4, 4, 3, 4 ] ), - Transformation( [ 3, 4, 3, 4, 4, 4, 4 ] ), - Transformation( [ 3, 5, 3, 3, 5, 3, 3 ] ), - Transformation( [ 3, 5, 3, 3, 5, 3, 5 ] ), - Transformation( [ 3, 5, 3, 3, 5, 5, 5 ] ), - Transformation( [ 3, 5, 3, 4, 5, 4, 5 ] ), - Transformation( [ 3, 5, 3, 5, 5, 3, 5 ] ), - Transformation( [ 3, 5, 3, 5, 5, 5, 5 ] ), - Transformation( [ 3, 7, 3, 3, 7, 3, 7 ] ), - Transformation( [ 3, 7, 3, 3, 7, 7, 7 ] ), - Transformation( [ 3, 7, 3, 4, 7, 4, 7 ] ), - Transformation( [ 3, 7, 3, 7, 7, 3, 7 ] ), - Transformation( [ 3, 7, 3, 7, 7, 7, 7 ] ), - Transformation( [ 4, 3, 3, 4, 3, 3, 4 ] ), - Transformation( [ 4, 3, 3, 4, 4, 3, 4 ] ), - Transformation( [ 4, 3, 3, 4, 4, 4, 4 ] ), - Transformation( [ 4, 3, 3, 4, 5, 5, 4 ] ), - Transformation( [ 4, 4, 4, 4, 4, 4, 4 ] ), - Transformation( [ 4, 4, 4, 4, 5, 4, 4 ] ), - Transformation( [ 4, 4, 4, 4, 5, 4, 5 ] ), - Transformation( [ 4, 4, 4, 4, 5, 5, 4 ] ), - Transformation( [ 4, 4, 4, 4, 7, 4, 7 ] ), - Transformation( [ 4, 5, 4, 4, 5, 4, 4 ] ), - Transformation( [ 4, 5, 4, 4, 5, 4, 5 ] ), - Transformation( [ 4, 5, 4, 4, 5, 5, 5 ] ), - Transformation( [ 4, 5, 5, 4, 5, 5, 4 ] ), - Transformation( [ 4, 7, 4, 4, 7, 4, 7 ] ), - Transformation( [ 4, 7, 4, 4, 7, 7, 7 ] ), - Transformation( [ 5, 2, 2, 5, 5, 2, 5 ] ), - Transformation( [ 5, 2, 2, 5, 5, 5, 5 ] ), - Transformation( [ 5, 2, 5, 5, 5, 5, 5 ] ), - Transformation( [ 5, 3, 3, 5, 5, 3, 5 ] ), - Transformation( [ 5, 3, 3, 5, 5, 5, 5 ] ), - Transformation( [ 5, 5, 3, 3, 5, 5, 5 ] ), - Transformation( [ 5, 5, 4, 4, 5, 5, 5 ] ), - Transformation( [ 5, 5, 5, 4, 5, 4, 5 ] ), - Transformation( [ 5, 5, 5, 4, 5, 5, 5 ] ), - Transformation( [ 5, 5, 5, 5, 5, 5, 5 ] ), - Transformation( [ 6, 2, 2, 6, 6, 6, 6 ] ), - Transformation( [ 6, 2, 6, 2, 2, 6, 2 ] ), - Transformation( [ 6, 2, 6, 6, 2, 6, 2 ] ), - Transformation( [ 6, 2, 6, 6, 2, 6, 6 ] ), - Transformation( [ 6, 2, 6, 6, 6, 6, 6 ] ), - Transformation( [ 6, 6, 6, 6, 6, 6, 6 ] ), - Transformation( [ 6, 6, 6, 6, 7, 6, 7 ] ), - Transformation( [ 6, 6, 6, 7, 7, 6, 7 ] ), - Transformation( [ 6, 6, 7, 7, 7, 6, 7 ] ), - Transformation( [ 6, 7, 6, 6, 7, 6, 7 ] ), - Transformation( [ 6, 7, 6, 7, 7, 6, 7 ] ), - Transformation( [ 7, 2, 2, 7, 2, 2, 7 ] ), - Transformation( [ 7, 2, 2, 7, 5, 5, 7 ] ), - Transformation( [ 7, 2, 2, 7, 6, 6, 7 ] ), - Transformation( [ 7, 2, 2, 7, 7, 2, 7 ] ), - Transformation( [ 7, 2, 2, 7, 7, 7, 7 ] ), - Transformation( [ 7, 2, 7, 7, 2, 7, 7 ] ), - Transformation( [ 7, 2, 7, 7, 5, 7, 7 ] ), - Transformation( [ 7, 2, 7, 7, 7, 7, 7 ] ), - Transformation( [ 7, 3, 3, 7, 3, 3, 7 ] ), - Transformation( [ 7, 3, 3, 7, 7, 3, 7 ] ), - Transformation( [ 7, 3, 3, 7, 7, 7, 7 ] ), - Transformation( [ 7, 5, 5, 7, 5, 5, 7 ] ), - Transformation( [ 7, 5, 7, 7, 5, 7, 7 ] ), - Transformation( [ 7, 6, 6, 7, 6, 6, 7 ] ), - Transformation( [ 7, 6, 6, 7, 7, 6, 7 ] ), - Transformation( [ 7, 7, 3, 3, 7, 7, 7 ] ), - Transformation( [ 7, 7, 4, 4, 7, 7, 7 ] ), - Transformation( [ 7, 7, 7, 4, 7, 4, 7 ] ), - Transformation( [ 7, 7, 7, 4, 7, 7, 7 ] ), - Transformation( [ 7, 7, 7, 6, 7, 6, 7 ] ), - Transformation( [ 7, 7, 7, 7, 5, 5, 7 ] ), - Transformation( [ 7, 7, 7, 7, 5, 7, 7 ] ), - Transformation( [ 7, 7, 7, 7, 6, 6, 7 ] ), - Transformation( [ 7, 7, 7, 7, 7, 6, 7 ] ), +[ Transformation( [ 1, 1, 1, 1, 1, 1, 1 ] ), + Transformation( [ 1, 1, 1, 1, 5, 1, 1 ] ), + Transformation( [ 1, 1, 1, 1, 5, 1, 5 ] ), + Transformation( [ 1, 1, 1, 1, 5, 5, 1 ] ), + Transformation( [ 1, 1, 1, 4, 1, 1, 1 ] ), + Transformation( [ 1, 1, 1, 4, 1, 4, 1 ] ), + Transformation( [ 1, 1, 1, 4, 4, 1, 4 ] ), + Transformation( [ 1, 1, 1, 4, 5, 1, 5 ] ), + Transformation( [ 1, 1, 1, 5, 5, 1, 5 ] ), + Transformation( [ 1, 1, 4, 4, 1, 1, 1 ] ), + Transformation( [ 1, 1, 4, 4, 4, 1, 4 ] ), + Transformation( [ 1, 1, 5, 5, 5, 1, 5 ] ), + Transformation( [ 1, 2, 1, 1, 1, 1, 1 ] ), + Transformation( [ 1, 2, 1, 1, 2, 1, 1 ] ), + Transformation( [ 1, 2, 1, 1, 2, 1, 2 ] ), + Transformation( [ 1, 2, 1, 1, 2, 2, 2 ] ), + Transformation( [ 1, 2, 1, 1, 5, 1, 1 ] ), + Transformation( [ 1, 2, 1, 2, 2, 1, 2 ] ), + Transformation( [ 1, 2, 1, 2, 2, 2, 2 ] ), + Transformation( [ 1, 2, 2, 1, 1, 1, 1 ] ), + Transformation( [ 1, 2, 2, 1, 1, 2, 1 ] ), + Transformation( [ 1, 2, 2, 1, 2, 2, 1 ] ), + Transformation( [ 1, 2, 2, 1, 5, 5, 1 ] ), + Transformation( [ 1, 4, 1, 4, 4, 1, 4 ] ), + Transformation( [ 1, 4, 1, 4, 4, 4, 4 ] ), + Transformation( [ 1, 5, 1, 1, 5, 1, 1 ] ), + Transformation( [ 1, 5, 1, 1, 5, 1, 5 ] ), + Transformation( [ 1, 5, 1, 1, 5, 5, 5 ] ), + Transformation( [ 1, 5, 1, 4, 5, 4, 5 ] ), + Transformation( [ 1, 5, 1, 5, 5, 1, 5 ] ), + Transformation( [ 1, 5, 1, 5, 5, 5, 5 ] ), + Transformation( [ 1, 5, 5, 1, 5, 5, 1 ] ), + Transformation( [ 2, 2, 2, 2, 2, 2, 2 ] ), + Transformation( [ 2, 2, 2, 2, 2, 6, 2 ] ), + Transformation( [ 2, 2, 2, 2, 5, 2, 2 ] ), + Transformation( [ 2, 2, 2, 2, 5, 2, 5 ] ), + Transformation( [ 2, 2, 2, 2, 5, 5, 2 ] ), + Transformation( [ 2, 2, 2, 2, 6, 6, 2 ] ), + Transformation( [ 2, 2, 2, 2, 7, 2, 7 ] ), + Transformation( [ 2, 2, 2, 5, 5, 2, 5 ] ), + Transformation( [ 2, 2, 2, 6, 2, 6, 2 ] ), + Transformation( [ 2, 2, 2, 7, 7, 2, 7 ] ), + Transformation( [ 2, 2, 5, 5, 5, 2, 5 ] ), + Transformation( [ 2, 2, 7, 7, 7, 2, 7 ] ), + Transformation( [ 3, 3, 3, 3, 3, 3, 3 ] ), + Transformation( [ 3, 3, 3, 3, 5, 3, 3 ] ), + Transformation( [ 3, 3, 3, 3, 5, 3, 5 ] ), + Transformation( [ 3, 3, 3, 3, 5, 5, 3 ] ), + Transformation( [ 3, 3, 3, 3, 7, 3, 7 ] ), + Transformation( [ 3, 3, 3, 4, 3, 3, 3 ] ), + Transformation( [ 3, 3, 3, 4, 3, 4, 3 ] ), + Transformation( [ 3, 3, 3, 4, 4, 3, 4 ] ), + Transformation( [ 3, 3, 3, 4, 5, 3, 5 ] ), + Transformation( [ 3, 3, 3, 4, 7, 3, 7 ] ), + Transformation( [ 3, 3, 3, 5, 5, 3, 5 ] ), + Transformation( [ 3, 3, 3, 7, 7, 3, 7 ] ), + Transformation( [ 3, 4, 3, 4, 4, 3, 4 ] ), + Transformation( [ 3, 4, 3, 4, 4, 4, 4 ] ), + Transformation( [ 3, 5, 3, 3, 5, 3, 3 ] ), + Transformation( [ 3, 5, 3, 3, 5, 3, 5 ] ), + Transformation( [ 3, 5, 3, 3, 5, 5, 5 ] ), + Transformation( [ 3, 5, 3, 4, 5, 4, 5 ] ), + Transformation( [ 3, 5, 3, 5, 5, 3, 5 ] ), + Transformation( [ 3, 5, 3, 5, 5, 5, 5 ] ), + Transformation( [ 3, 7, 3, 3, 7, 3, 7 ] ), + Transformation( [ 3, 7, 3, 3, 7, 7, 7 ] ), + Transformation( [ 3, 7, 3, 4, 7, 4, 7 ] ), + Transformation( [ 3, 7, 3, 7, 7, 3, 7 ] ), + Transformation( [ 3, 7, 3, 7, 7, 7, 7 ] ), + Transformation( [ 4, 3, 3, 4, 3, 3, 4 ] ), + Transformation( [ 4, 3, 3, 4, 4, 3, 4 ] ), + Transformation( [ 4, 3, 3, 4, 4, 4, 4 ] ), + Transformation( [ 4, 3, 3, 4, 5, 5, 4 ] ), + Transformation( [ 4, 4, 4, 4, 4, 4, 4 ] ), + Transformation( [ 4, 4, 4, 4, 5, 4, 4 ] ), + Transformation( [ 4, 4, 4, 4, 5, 4, 5 ] ), + Transformation( [ 4, 4, 4, 4, 5, 5, 4 ] ), + Transformation( [ 4, 4, 4, 4, 7, 4, 7 ] ), + Transformation( [ 4, 5, 4, 4, 5, 4, 4 ] ), + Transformation( [ 4, 5, 4, 4, 5, 4, 5 ] ), + Transformation( [ 4, 5, 4, 4, 5, 5, 5 ] ), + Transformation( [ 4, 5, 5, 4, 5, 5, 4 ] ), + Transformation( [ 4, 7, 4, 4, 7, 4, 7 ] ), + Transformation( [ 4, 7, 4, 4, 7, 7, 7 ] ), + Transformation( [ 5, 2, 2, 5, 5, 2, 5 ] ), + Transformation( [ 5, 2, 2, 5, 5, 5, 5 ] ), + Transformation( [ 5, 2, 5, 5, 5, 5, 5 ] ), + Transformation( [ 5, 3, 3, 5, 5, 3, 5 ] ), + Transformation( [ 5, 3, 3, 5, 5, 5, 5 ] ), + Transformation( [ 5, 5, 3, 3, 5, 5, 5 ] ), + Transformation( [ 5, 5, 4, 4, 5, 5, 5 ] ), + Transformation( [ 5, 5, 5, 4, 5, 4, 5 ] ), + Transformation( [ 5, 5, 5, 4, 5, 5, 5 ] ), + Transformation( [ 5, 5, 5, 5, 5, 5, 5 ] ), + Transformation( [ 6, 2, 2, 6, 6, 6, 6 ] ), + Transformation( [ 6, 2, 6, 2, 2, 6, 2 ] ), + Transformation( [ 6, 2, 6, 6, 2, 6, 2 ] ), + Transformation( [ 6, 2, 6, 6, 2, 6, 6 ] ), + Transformation( [ 6, 2, 6, 6, 6, 6, 6 ] ), + Transformation( [ 6, 6, 6, 6, 6, 6, 6 ] ), + Transformation( [ 6, 6, 6, 6, 7, 6, 7 ] ), + Transformation( [ 6, 6, 6, 7, 7, 6, 7 ] ), + Transformation( [ 6, 6, 7, 7, 7, 6, 7 ] ), + Transformation( [ 6, 7, 6, 6, 7, 6, 7 ] ), + Transformation( [ 6, 7, 6, 7, 7, 6, 7 ] ), + Transformation( [ 7, 2, 2, 7, 2, 2, 7 ] ), + Transformation( [ 7, 2, 2, 7, 5, 5, 7 ] ), + Transformation( [ 7, 2, 2, 7, 6, 6, 7 ] ), + Transformation( [ 7, 2, 2, 7, 7, 2, 7 ] ), + Transformation( [ 7, 2, 2, 7, 7, 7, 7 ] ), + Transformation( [ 7, 2, 7, 7, 2, 7, 7 ] ), + Transformation( [ 7, 2, 7, 7, 5, 7, 7 ] ), + Transformation( [ 7, 2, 7, 7, 7, 7, 7 ] ), + Transformation( [ 7, 3, 3, 7, 3, 3, 7 ] ), + Transformation( [ 7, 3, 3, 7, 7, 3, 7 ] ), + Transformation( [ 7, 3, 3, 7, 7, 7, 7 ] ), + Transformation( [ 7, 5, 5, 7, 5, 5, 7 ] ), + Transformation( [ 7, 5, 7, 7, 5, 7, 7 ] ), + Transformation( [ 7, 6, 6, 7, 6, 6, 7 ] ), + Transformation( [ 7, 6, 6, 7, 7, 6, 7 ] ), + Transformation( [ 7, 7, 3, 3, 7, 7, 7 ] ), + Transformation( [ 7, 7, 4, 4, 7, 7, 7 ] ), + Transformation( [ 7, 7, 7, 4, 7, 4, 7 ] ), + Transformation( [ 7, 7, 7, 4, 7, 7, 7 ] ), + Transformation( [ 7, 7, 7, 6, 7, 6, 7 ] ), + Transformation( [ 7, 7, 7, 7, 5, 5, 7 ] ), + Transformation( [ 7, 7, 7, 7, 5, 7, 7 ] ), + Transformation( [ 7, 7, 7, 7, 6, 6, 7 ] ), + Transformation( [ 7, 7, 7, 7, 7, 6, 7 ] ), Transformation( [ 7, 7, 7, 7, 7, 7, 7 ] ) ] gap> idem = Set(Idempotents(m)); true @@ -475,23 +475,23 @@ gap> for i in gens do > Add(out, [NrHClasses(s), Length(GreensHClasses(s))]); > od; gap> out; -[ [ 3, 3 ], [ 5, 5 ], [ 3, 3 ], [ 77, 77 ], [ 13, 13 ], [ 1281, 1281 ], - [ 2, 2 ], [ 1032, 1032 ], [ 231, 231 ], [ 2, 2 ], [ 1355, 1355 ], - [ 57, 57 ], [ 28, 28 ], [ 48, 48 ], [ 57, 57 ], [ 12, 12 ], [ 139, 139 ], - [ 508, 508 ], [ 1, 1 ], [ 36, 36 ], [ 801, 801 ], [ 10, 10 ], [ 71, 71 ], - [ 130, 130 ], [ 2, 2 ], [ 7, 7 ], [ 2, 2 ], [ 83, 83 ], [ 158, 158 ], - [ 172, 172 ], [ 22, 22 ], [ 285, 285 ], [ 17, 17 ], [ 40, 40 ], - [ 377, 377 ], [ 67, 67 ], [ 1285, 1285 ], [ 2, 2 ], [ 2, 2 ], [ 212, 212 ], - [ 153, 153 ], [ 14, 14 ], [ 9, 9 ], [ 22, 22 ], [ 239, 239 ], [ 65, 65 ], - [ 91, 91 ], [ 55, 55 ], [ 2, 2 ], [ 367, 367 ], [ 15, 15 ], [ 168, 168 ], - [ 26, 26 ], [ 207, 207 ], [ 14, 14 ], [ 29, 29 ], [ 274, 274 ], [ 22, 22 ], - [ 17, 17 ], [ 26, 26 ], [ 253, 253 ], [ 10, 10 ], [ 1, 1 ], [ 2, 2 ], - [ 13, 13 ], [ 64, 64 ], [ 605, 605 ], [ 20, 20 ], [ 25, 25 ], [ 33, 33 ], - [ 2, 2 ], [ 1, 1 ], [ 1520, 1520 ], [ 307, 307 ], [ 9625, 9625 ], - [ 41, 41 ], [ 1885, 1885 ], [ 945, 945 ], [ 54, 54 ], [ 1297, 1297 ], - [ 58, 58 ], [ 18, 18 ], [ 1, 1 ], [ 173, 173 ], [ 1, 1 ], [ 25, 25 ], - [ 737, 737 ], [ 2807, 2807 ], [ 636, 636 ], [ 495, 495 ], [ 2, 2 ], - [ 201, 201 ], [ 3, 3 ], [ 3, 3 ], [ 471, 471 ], [ 715, 715 ], [ 118, 118 ], +[ [ 3, 3 ], [ 5, 5 ], [ 3, 3 ], [ 77, 77 ], [ 13, 13 ], [ 1281, 1281 ], + [ 2, 2 ], [ 1032, 1032 ], [ 231, 231 ], [ 2, 2 ], [ 1355, 1355 ], + [ 57, 57 ], [ 28, 28 ], [ 48, 48 ], [ 57, 57 ], [ 12, 12 ], [ 139, 139 ], + [ 508, 508 ], [ 1, 1 ], [ 36, 36 ], [ 801, 801 ], [ 10, 10 ], [ 71, 71 ], + [ 130, 130 ], [ 2, 2 ], [ 7, 7 ], [ 2, 2 ], [ 83, 83 ], [ 158, 158 ], + [ 172, 172 ], [ 22, 22 ], [ 285, 285 ], [ 17, 17 ], [ 40, 40 ], + [ 377, 377 ], [ 67, 67 ], [ 1285, 1285 ], [ 2, 2 ], [ 2, 2 ], [ 212, 212 ], + [ 153, 153 ], [ 14, 14 ], [ 9, 9 ], [ 22, 22 ], [ 239, 239 ], [ 65, 65 ], + [ 91, 91 ], [ 55, 55 ], [ 2, 2 ], [ 367, 367 ], [ 15, 15 ], [ 168, 168 ], + [ 26, 26 ], [ 207, 207 ], [ 14, 14 ], [ 29, 29 ], [ 274, 274 ], [ 22, 22 ], + [ 17, 17 ], [ 26, 26 ], [ 253, 253 ], [ 10, 10 ], [ 1, 1 ], [ 2, 2 ], + [ 13, 13 ], [ 64, 64 ], [ 605, 605 ], [ 20, 20 ], [ 25, 25 ], [ 33, 33 ], + [ 2, 2 ], [ 1, 1 ], [ 1520, 1520 ], [ 307, 307 ], [ 9625, 9625 ], + [ 41, 41 ], [ 1885, 1885 ], [ 945, 945 ], [ 54, 54 ], [ 1297, 1297 ], + [ 58, 58 ], [ 18, 18 ], [ 1, 1 ], [ 173, 173 ], [ 1, 1 ], [ 25, 25 ], + [ 737, 737 ], [ 2807, 2807 ], [ 636, 636 ], [ 495, 495 ], [ 2, 2 ], + [ 201, 201 ], [ 3, 3 ], [ 3, 3 ], [ 471, 471 ], [ 715, 715 ], [ 118, 118 ], [ 28, 28 ], [ 197, 197 ], [ 88, 88 ] ] gap> out := [];; out2 := [];; out3 := [];; gap> for i in gens do @@ -505,86 +505,86 @@ gap> for i in gens do > fi; > od; gap> Perform(out2, Sort); -gap> out; -[ [ 1, 3 ], [ 2, 2 ], [ 2, 2 ], [ 4, 4 ], [ 3, 3 ], [ 6, 9 ], [ 1, 2 ], - [ 5, 5 ], [ 4, 6 ], [ 1, 2 ], [ 6, 75 ], [ 3, 10 ], [ 3, 4 ], [ 4, 8 ], - [ 3, 12 ], [ 3, 5 ], [ 4, 4 ], [ 4, 16 ], [ 1, 1 ], [ 4, 10 ], [ 6, 101 ], - [ 4, 5 ], [ 4, 4 ], [ 4, 8 ], [ 1, 2 ], [ 2, 3 ], [ 1, 2 ], [ 3, 6 ], - [ 5, 7 ], [ 5, 6 ], [ 3, 4 ], [ 5, 19 ], [ 3, 8 ], [ 3, 3 ], [ 5, 13 ], - [ 4, 4 ], [ 6, 36 ], [ 1, 2 ], [ 1, 2 ], [ 4, 14 ], [ 4, 4 ], [ 3, 7 ], - [ 3, 4 ], [ 4, 11 ], [ 4, 4 ], [ 4, 4 ], [ 4, 7 ], [ 3, 3 ], [ 1, 2 ], - [ 4, 4 ], [ 3, 4 ], [ 4, 7 ], [ 4, 6 ], [ 4, 16 ], [ 4, 4 ], [ 3, 7 ], - [ 6, 8 ], [ 3, 4 ], [ 3, 13 ], [ 3, 3 ], [ 4, 7 ], [ 3, 7 ], [ 1, 1 ], - [ 2, 2 ], [ 2, 4 ], [ 4, 9 ], [ 4, 10 ], [ 3, 3 ], [ 3, 3 ], [ 3, 3 ], - [ 1, 2 ], [ 1, 1 ], [ 5, 54 ], [ 3, 10 ], [ 7, 32 ], [ 3, 4 ], [ 5, 7 ], - [ 5, 15 ], [ 5, 5 ], [ 5, 22 ], [ 2, 7 ], [ 3, 5 ], [ 1, 1 ], [ 4, 17 ], - [ 1, 1 ], [ 4, 14 ], [ 5, 62 ], [ 6, 11 ], [ 5, 26 ], [ 5, 15 ], [ 1, 2 ], - [ 3, 8 ], [ 1, 3 ], [ 1, 3 ], [ 6, 6 ], [ 4, 19 ], [ 3, 4 ], [ 3, 5 ], +gap> out; +[ [ 1, 3 ], [ 2, 2 ], [ 2, 2 ], [ 4, 4 ], [ 3, 3 ], [ 6, 9 ], [ 1, 2 ], + [ 5, 5 ], [ 4, 6 ], [ 1, 2 ], [ 6, 75 ], [ 3, 10 ], [ 3, 4 ], [ 4, 8 ], + [ 3, 12 ], [ 3, 5 ], [ 4, 4 ], [ 4, 16 ], [ 1, 1 ], [ 4, 10 ], [ 6, 101 ], + [ 4, 5 ], [ 4, 4 ], [ 4, 8 ], [ 1, 2 ], [ 2, 3 ], [ 1, 2 ], [ 3, 6 ], + [ 5, 7 ], [ 5, 6 ], [ 3, 4 ], [ 5, 19 ], [ 3, 8 ], [ 3, 3 ], [ 5, 13 ], + [ 4, 4 ], [ 6, 36 ], [ 1, 2 ], [ 1, 2 ], [ 4, 14 ], [ 4, 4 ], [ 3, 7 ], + [ 3, 4 ], [ 4, 11 ], [ 4, 4 ], [ 4, 4 ], [ 4, 7 ], [ 3, 3 ], [ 1, 2 ], + [ 4, 4 ], [ 3, 4 ], [ 4, 7 ], [ 4, 6 ], [ 4, 16 ], [ 4, 4 ], [ 3, 7 ], + [ 6, 8 ], [ 3, 4 ], [ 3, 13 ], [ 3, 3 ], [ 4, 7 ], [ 3, 7 ], [ 1, 1 ], + [ 2, 2 ], [ 2, 4 ], [ 4, 9 ], [ 4, 10 ], [ 3, 3 ], [ 3, 3 ], [ 3, 3 ], + [ 1, 2 ], [ 1, 1 ], [ 5, 54 ], [ 3, 10 ], [ 7, 32 ], [ 3, 4 ], [ 5, 7 ], + [ 5, 15 ], [ 5, 5 ], [ 5, 22 ], [ 2, 7 ], [ 3, 5 ], [ 1, 1 ], [ 4, 17 ], + [ 1, 1 ], [ 4, 14 ], [ 5, 62 ], [ 6, 11 ], [ 5, 26 ], [ 5, 15 ], [ 1, 2 ], + [ 3, 8 ], [ 1, 3 ], [ 1, 3 ], [ 6, 6 ], [ 4, 19 ], [ 3, 4 ], [ 3, 5 ], [ 4, 6 ], [ 3, 13 ] ] gap> out2; -[ [ 0, 0, 1 ], [ 1, 4 ], [ 1, 2 ], [ 1, 5, 7, 30 ], [ 1, 4, 4 ], - [ 0, 0, 0, 1, 1, 6, 11, 167, 168 ], [ 0, 1 ], [ 2, 6, 42, 169, 197 ], - [ 0, 0, 2, 5, 18, 58 ], [ 0, 1 ], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, - 8, 46, 159 ], [ 0, 0, 0, 0, 0, 0, 0, 1, 5, 19 ], [ 0, 2, 4, 11 ], - [ 0, 0, 0, 0, 1, 2, 4, 14 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 12 ], - [ 0, 0, 1, 2, 3 ], [ 2, 5, 17, 39 ], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 24, 137 ], [ 1 ], - [ 0, 0, 0, 0, 0, 0, 1, 1, 3, 10 ], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, - 1, 4, 6, 7, 221 ], [ 0, 1, 2, 2, 3 ], [ 1, 4, 12, 24 ], - [ 0, 0, 0, 0, 1, 1, 7, 34 ], [ 0, 1 ], [ 0, 1, 3 ], [ 0, 1 ], - [ 0, 0, 0, 5, 9, 36 ], [ 0, 0, 1, 1, 5, 17, 50 ], [ 0, 1, 1, 7, 7, 63 ], - [ 0, 1, 4, 8 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 7, 13, 69 - ], [ 0, 0, 0, 0, 0, 1, 2, 4 ], [ 4, 4, 17 ], - [ 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 6, 20, 93 ], [ 1, 4, 10, 24 ], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 1, 1, 7, 105, 199 ], [ 0, 1 ], [ 0, 1 ], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 13, 48 ], [ 1, 5, 20, 51 ], +[ [ 0, 0, 1 ], [ 1, 4 ], [ 1, 2 ], [ 1, 5, 7, 30 ], [ 1, 4, 4 ], + [ 0, 0, 0, 1, 1, 6, 11, 167, 168 ], [ 0, 1 ], [ 2, 6, 42, 169, 197 ], + [ 0, 0, 2, 5, 18, 58 ], [ 0, 1 ], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, + 8, 46, 159 ], [ 0, 0, 0, 0, 0, 0, 0, 1, 5, 19 ], [ 0, 2, 4, 11 ], + [ 0, 0, 0, 0, 1, 2, 4, 14 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 12 ], + [ 0, 0, 1, 2, 3 ], [ 2, 5, 17, 39 ], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 24, 137 ], [ 1 ], + [ 0, 0, 0, 0, 0, 0, 1, 1, 3, 10 ], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 1, 4, 6, 7, 221 ], [ 0, 1, 2, 2, 3 ], [ 1, 4, 12, 24 ], + [ 0, 0, 0, 0, 1, 1, 7, 34 ], [ 0, 1 ], [ 0, 1, 3 ], [ 0, 1 ], + [ 0, 0, 0, 5, 9, 36 ], [ 0, 0, 1, 1, 5, 17, 50 ], [ 0, 1, 1, 7, 7, 63 ], + [ 0, 1, 4, 8 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 7, 13, 69 + ], [ 0, 0, 0, 0, 0, 1, 2, 4 ], [ 4, 4, 17 ], + [ 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 6, 20, 93 ], [ 1, 4, 10, 24 ], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 1, 1, 7, 105, 199 ], [ 0, 1 ], [ 0, 1 ], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 13, 48 ], [ 1, 5, 20, 51 ], [ 0, 0, 0, 0, 1, 2, 3 ], [ 0, 1, 3, 3 ], [ 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3 ] - , [ 2, 7, 27, 82 ], [ 1, 4, 9, 24 ], [ 0, 0, 0, 1, 3, 5, 38 ], - [ 4, 6, 24 ], [ 0, 1 ], [ 1, 6, 47, 121 ], [ 0, 1, 4, 5 ], - [ 0, 0, 0, 1, 5, 14, 42 ], [ 0, 0, 1, 1, 3, 8 ], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 6, 80 ], [ 1, 1, 3, 6 ], - [ 0, 0, 0, 0, 1, 4, 11 ], [ 0, 0, 1, 1, 4, 6, 20, 65 ], [ 0, 1, 4, 10 ], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2 ], [ 2, 4, 10 ], - [ 0, 0, 0, 1, 5, 34, 62 ], [ 0, 0, 0, 0, 1, 1, 2 ], [ 1 ], [ 1, 1 ], - [ 0, 0, 3, 4 ], [ 0, 0, 0, 0, 0, 1, 1, 6, 26 ], - [ 0, 0, 0, 0, 0, 0, 2, 6, 47, 121 ], [ 2, 3, 10 ], [ 1, 4, 11 ], - [ 3, 4, 15 ], [ 0, 1 ], [ 1 ], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 3, 7, 122, 248 ], [ 0, 0, 0, 0, 0, 0, 0, 7, 12, 111 ], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1, 1, 7, 9, 258, 430, 889 ], [ 0, 1, 4, 20 ], - [ 0, 0, 1, 6, 12, 231, 324 ], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 6, 143, 163 ], [ 1, 1, 3, 4, 24 ], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 7, 140, 277 ], - [ 0, 0, 0, 0, 0, 5, 23 ], [ 0, 0, 1, 4, 4 ], [ 1 ], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 5, 52 ], [ 1 ], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2 ], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 7, 11, 177 ], - [ 0, 0, 0, 0, 0, 1, 2, 7, 38, 390, 434 ], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 9, - 40, 114 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 6, 32, 65 ], [ 0, 1 ], - [ 0, 0, 0, 0, 0, 6, 16, 74 ], [ 0, 0, 1 ], [ 0, 0, 1 ], - [ 1, 1, 4, 6, 65, 114 ], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7, 40, 200 ], - [ 0, 5, 8, 44 ], [ 0, 0, 1, 3, 10 ], [ 0, 0, 1, 6, 6, 73 ], + , [ 2, 7, 27, 82 ], [ 1, 4, 9, 24 ], [ 0, 0, 0, 1, 3, 5, 38 ], + [ 4, 6, 24 ], [ 0, 1 ], [ 1, 6, 47, 121 ], [ 0, 1, 4, 5 ], + [ 0, 0, 0, 1, 5, 14, 42 ], [ 0, 0, 1, 1, 3, 8 ], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 6, 80 ], [ 1, 1, 3, 6 ], + [ 0, 0, 0, 0, 1, 4, 11 ], [ 0, 0, 1, 1, 4, 6, 20, 65 ], [ 0, 1, 4, 10 ], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2 ], [ 2, 4, 10 ], + [ 0, 0, 0, 1, 5, 34, 62 ], [ 0, 0, 0, 0, 1, 1, 2 ], [ 1 ], [ 1, 1 ], + [ 0, 0, 3, 4 ], [ 0, 0, 0, 0, 0, 1, 1, 6, 26 ], + [ 0, 0, 0, 0, 0, 0, 2, 6, 47, 121 ], [ 2, 3, 10 ], [ 1, 4, 11 ], + [ 3, 4, 15 ], [ 0, 1 ], [ 1 ], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 3, 7, 122, 248 ], [ 0, 0, 0, 0, 0, 0, 0, 7, 12, 111 ], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 7, 9, 258, 430, 889 ], [ 0, 1, 4, 20 ], + [ 0, 0, 1, 6, 12, 231, 324 ], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 6, 143, 163 ], [ 1, 1, 3, 4, 24 ], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 7, 140, 277 ], + [ 0, 0, 0, 0, 0, 5, 23 ], [ 0, 0, 1, 4, 4 ], [ 1 ], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 5, 52 ], [ 1 ], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2 ], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 7, 11, 177 ], + [ 0, 0, 0, 0, 0, 1, 2, 7, 38, 390, 434 ], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 9, + 40, 114 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 6, 32, 65 ], [ 0, 1 ], + [ 0, 0, 0, 0, 0, 6, 16, 74 ], [ 0, 0, 1 ], [ 0, 0, 1 ], + [ 1, 1, 4, 6, 65, 114 ], + [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7, 40, 200 ], + [ 0, 5, 8, 44 ], [ 0, 0, 1, 3, 10 ], [ 0, 0, 1, 6, 6, 73 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, 33 ] ] gap> out3; -[ 1, 5, 3, 43, 9, 354, 1, 416, 83, 1, 220, 25, 17, 21, 16, 6, 63, 168, 1, 15, - 240, 8, 41, 43, 1, 4, 1, 50, 74, 79, 13, 92, 7, 25, 122, 39, 314, 1, 1, 67, - 77, 6, 7, 7, 118, 38, 47, 34, 1, 175, 10, 62, 13, 93, 11, 16, 97, 15, 4, - 16, 102, 4, 1, 2, 7, 34, 176, 15, 16, 22, 1, 1, 381, 130, 1595, 25, 574, - 316, 33, 430, 28, 9, 1, 63, 1, 5, 197, 872, 173, 106, 1, 96, 1, 1, 191, +[ 1, 5, 3, 43, 9, 354, 1, 416, 83, 1, 220, 25, 17, 21, 16, 6, 63, 168, 1, 15, + 240, 8, 41, 43, 1, 4, 1, 50, 74, 79, 13, 92, 7, 25, 122, 39, 314, 1, 1, 67, + 77, 6, 7, 7, 118, 38, 47, 34, 1, 175, 10, 62, 13, 93, 11, 16, 97, 15, 4, + 16, 102, 4, 1, 2, 7, 34, 176, 15, 16, 22, 1, 1, 381, 130, 1595, 25, 574, + 316, 33, 430, 28, 9, 1, 63, 1, 5, 197, 872, 173, 106, 1, 96, 1, 1, 191, 248, 57, 14, 86, 38 ] gap> a := Transformation([2, 1, 4, 5, 6, 3]);; gap> b := Transformation([2, 3, 1, 5, 4, 1]);; @@ -632,7 +632,7 @@ gap> gens := [Transformation([1, 2, 1, 2, 1]), > Transformation([3, 4, 2, 1, 4])];; gap> S := Semigroup(gens);; gap> RClassReps(S); -[ Transformation( [ 1, 2, 1, 2, 1 ] ), Transformation( [ 3, 4, 2, 1, 4 ] ), +[ Transformation( [ 1, 2, 1, 2, 1 ] ), Transformation( [ 3, 4, 2, 1, 4 ] ), Transformation( [ 1, 2, 2, 1, 2 ] ), Transformation( [ 2, 1, 2, 1, 1 ] ) ] gap> a := Transformation([2, 1, 4, 5, 6, 3]);; gap> b := Transformation([2, 3, 1, 5, 4, 1]);; @@ -671,8 +671,8 @@ Group([ (4,5) ]) gap> S := Semigroup([Transformation([2, 3, 4, 1]), > Transformation([3, 3, 1, 1])]);; gap> Idempotents(S); -[ IdentityTransformation, Transformation( [ 1, 1, 3, 3 ] ), - Transformation( [ 1, 3, 3, 1 ] ), Transformation( [ 2, 2, 4, 4 ] ), +[ IdentityTransformation, Transformation( [ 1, 1, 3, 3 ] ), + Transformation( [ 1, 3, 3, 1 ] ), Transformation( [ 2, 2, 4, 4 ] ), Transformation( [ 4, 2, 2, 4 ] ) ] gap> gens := [Transformation([4, 3, 3, 6, 7, 2, 3]), > Transformation([6, 6, 4, 4, 2, 1, 4])];; @@ -809,13 +809,13 @@ gap> Position(GreensDClasses(s), d); 3 gap> List(GreensRClasses(s), x -> Position(GreensDClasses(s), > DClassOfRClass(x))); -[ 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 2, 3, 3, 3, 2, 3, 4, 2, 3, 3, 3, 4, 2, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 4, 3, 3, 4, 3, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 5, 2, 3, 3, 3, 3, 3, 4, 4, 5, 3, 3, 4, 3, 3, 4, 4, 2, 3, 3, 4, 4, - 4, 4, 4, 4, 3, 3, 4, 4, 4, 3, 3, 3, 4, 4, 4, 4, 4, 2, 3, 3, 4, 3, 4, 4, 3, - 3, 4, 4, 3, 4, 3, 4, 4, 4, 4, 3, 4, 4, 4, 4, 3, 4, 4, 4, 4, 3, 4, 4, 4, 5, - 3, 4, 4, 4, 4, 4, 4, 3, 4, 4, 5, 4, 4, 4, 4, 5, 5, 5, 5, 4, 5, 5, 5, 4, 5, - 5, 5, 4, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 3, 4, 3, 3, 4, 5, 5, 5, 3, +[ 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 2, 3, 3, 3, 2, 3, 4, 2, 3, 3, 3, 4, 2, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 4, 3, 3, 4, 3, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 5, 2, 3, 3, 3, 3, 3, 4, 4, 5, 3, 3, 4, 3, 3, 4, 4, 2, 3, 3, 4, 4, + 4, 4, 4, 4, 3, 3, 4, 4, 4, 3, 3, 3, 4, 4, 4, 4, 4, 2, 3, 3, 4, 3, 4, 4, 3, + 3, 4, 4, 3, 4, 3, 4, 4, 4, 4, 3, 4, 4, 4, 4, 3, 4, 4, 4, 4, 3, 4, 4, 4, 5, + 3, 4, 4, 4, 4, 4, 4, 3, 4, 4, 5, 4, 4, 4, 4, 5, 5, 5, 5, 4, 5, 5, 5, 4, 5, + 5, 5, 4, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 3, 4, 3, 3, 4, 5, 5, 5, 3, 4, 3, 5, 5, 3, 3, 4, 5, 3, 3, 4, 5, 3, 4, 4, 5, 4, 4, 5, 5, 5, 6, 4, 4, 4 ] gap> gens := [Transformation([1, 2, 6, 4, 7, 5, 7]), > Transformation([2, 1, 6, 4, 5, 6, 7]), @@ -851,20 +851,20 @@ gap> d := GreensDClassOfElement(s, f); gap> Transformation([1, 6, 4, 7, 5, 2, 5]) in last; true gap> reps := Set(RClassReps(d)); -[ Transformation( [ 1, 4, 5, 2, 7, 6, 6 ] ), - Transformation( [ 1, 5, 7, 2, 4, 6, 2 ] ), - Transformation( [ 1, 6, 4, 7, 5, 2, 5 ] ), - Transformation( [ 4, 2, 6, 2, 5, 7, 1 ] ), - Transformation( [ 4, 5, 6, 7, 1, 6, 2 ] ), - Transformation( [ 4, 7, 6, 2, 7, 5, 1 ] ), - Transformation( [ 5, 2, 4, 6, 1, 7, 2 ] ), +[ Transformation( [ 1, 4, 5, 2, 7, 6, 6 ] ), + Transformation( [ 1, 5, 7, 2, 4, 6, 2 ] ), + Transformation( [ 1, 6, 4, 7, 5, 2, 5 ] ), + Transformation( [ 4, 2, 6, 2, 5, 7, 1 ] ), + Transformation( [ 4, 5, 6, 7, 1, 6, 2 ] ), + Transformation( [ 4, 7, 6, 2, 7, 5, 1 ] ), + Transformation( [ 5, 2, 4, 6, 1, 7, 2 ] ), Transformation( [ 5, 4, 7, 7, 1, 6, 2 ] ) ] gap> Set(reps, x -> Position(GreensRClasses(s), GreensRClassOfElement(s, x))); [ 1, 2, 3, 5, 6, 7, 13, 16 ] gap> r := GreensRClasses(s)[63];; gap> Idempotents(r); -[ Transformation( [ 1, 7, 3, 4, 5, 7, 7 ] ), - Transformation( [ 1, 2, 3, 4, 5, 2, 2 ] ), +[ Transformation( [ 1, 7, 3, 4, 5, 7, 7 ] ), + Transformation( [ 1, 2, 3, 4, 5, 2, 2 ] ), Transformation( [ 1, 6, 3, 4, 5, 6, 6 ] ) ] gap> last[2] in r; true @@ -1196,35 +1196,35 @@ gap> Size(r); gap> Transformation([8, 8, 6, 2, 6, 2, 8, 2, 8, 8]) in r; true gap> Set(Idempotents(r)); -[ Transformation( [ 1, 1, 3, 4, 3, 4, 1, 4, 1, 1 ] ), - Transformation( [ 1, 1, 3, 6, 3, 6, 1, 6, 1, 1 ] ), - Transformation( [ 1, 1, 3, 8, 3, 8, 1, 8, 1, 1 ] ), - Transformation( [ 1, 1, 5, 4, 5, 4, 1, 4, 1, 1 ] ), - Transformation( [ 1, 1, 5, 6, 5, 6, 1, 6, 1, 1 ] ), - Transformation( [ 1, 1, 5, 8, 5, 8, 1, 8, 1, 1 ] ), - Transformation( [ 2, 2, 3, 4, 3, 4, 2, 4, 2, 2 ] ), - Transformation( [ 2, 2, 3, 6, 3, 6, 2, 6, 2, 2 ] ), - Transformation( [ 2, 2, 3, 8, 3, 8, 2, 8, 2, 2 ] ), - Transformation( [ 2, 2, 5, 4, 5, 4, 2, 4, 2, 2 ] ), - Transformation( [ 2, 2, 5, 6, 5, 6, 2, 6, 2, 2 ] ), - Transformation( [ 2, 2, 5, 8, 5, 8, 2, 8, 2, 2 ] ), - Transformation( [ 7, 7, 3, 4, 3, 4, 7, 4, 7, 7 ] ), - Transformation( [ 7, 7, 3, 6, 3, 6, 7, 6, 7, 7 ] ), - Transformation( [ 7, 7, 3, 8, 3, 8, 7, 8, 7, 7 ] ), - Transformation( [ 7, 7, 5, 4, 5, 4, 7, 4, 7, 7 ] ), - Transformation( [ 7, 7, 5, 6, 5, 6, 7, 6, 7, 7 ] ), - Transformation( [ 7, 7, 5, 8, 5, 8, 7, 8, 7, 7 ] ), - Transformation( [ 9, 9, 3, 4, 3, 4, 9, 4, 9, 9 ] ), - Transformation( [ 9, 9, 3, 6, 3, 6, 9, 6, 9, 9 ] ), - Transformation( [ 9, 9, 3, 8, 3, 8, 9, 8, 9, 9 ] ), - Transformation( [ 9, 9, 5, 4, 5, 4, 9, 4, 9, 9 ] ), - Transformation( [ 9, 9, 5, 6, 5, 6, 9, 6, 9, 9 ] ), - Transformation( [ 9, 9, 5, 8, 5, 8, 9, 8, 9, 9 ] ), - Transformation( [ 10, 10, 3, 4, 3, 4, 10, 4, 10, 10 ] ), - Transformation( [ 10, 10, 3, 6, 3, 6, 10, 6, 10, 10 ] ), - Transformation( [ 10, 10, 3, 8, 3, 8, 10, 8, 10, 10 ] ), - Transformation( [ 10, 10, 5, 4, 5, 4, 10, 4, 10, 10 ] ), - Transformation( [ 10, 10, 5, 6, 5, 6, 10, 6, 10, 10 ] ), +[ Transformation( [ 1, 1, 3, 4, 3, 4, 1, 4, 1, 1 ] ), + Transformation( [ 1, 1, 3, 6, 3, 6, 1, 6, 1, 1 ] ), + Transformation( [ 1, 1, 3, 8, 3, 8, 1, 8, 1, 1 ] ), + Transformation( [ 1, 1, 5, 4, 5, 4, 1, 4, 1, 1 ] ), + Transformation( [ 1, 1, 5, 6, 5, 6, 1, 6, 1, 1 ] ), + Transformation( [ 1, 1, 5, 8, 5, 8, 1, 8, 1, 1 ] ), + Transformation( [ 2, 2, 3, 4, 3, 4, 2, 4, 2, 2 ] ), + Transformation( [ 2, 2, 3, 6, 3, 6, 2, 6, 2, 2 ] ), + Transformation( [ 2, 2, 3, 8, 3, 8, 2, 8, 2, 2 ] ), + Transformation( [ 2, 2, 5, 4, 5, 4, 2, 4, 2, 2 ] ), + Transformation( [ 2, 2, 5, 6, 5, 6, 2, 6, 2, 2 ] ), + Transformation( [ 2, 2, 5, 8, 5, 8, 2, 8, 2, 2 ] ), + Transformation( [ 7, 7, 3, 4, 3, 4, 7, 4, 7, 7 ] ), + Transformation( [ 7, 7, 3, 6, 3, 6, 7, 6, 7, 7 ] ), + Transformation( [ 7, 7, 3, 8, 3, 8, 7, 8, 7, 7 ] ), + Transformation( [ 7, 7, 5, 4, 5, 4, 7, 4, 7, 7 ] ), + Transformation( [ 7, 7, 5, 6, 5, 6, 7, 6, 7, 7 ] ), + Transformation( [ 7, 7, 5, 8, 5, 8, 7, 8, 7, 7 ] ), + Transformation( [ 9, 9, 3, 4, 3, 4, 9, 4, 9, 9 ] ), + Transformation( [ 9, 9, 3, 6, 3, 6, 9, 6, 9, 9 ] ), + Transformation( [ 9, 9, 3, 8, 3, 8, 9, 8, 9, 9 ] ), + Transformation( [ 9, 9, 5, 4, 5, 4, 9, 4, 9, 9 ] ), + Transformation( [ 9, 9, 5, 6, 5, 6, 9, 6, 9, 9 ] ), + Transformation( [ 9, 9, 5, 8, 5, 8, 9, 8, 9, 9 ] ), + Transformation( [ 10, 10, 3, 4, 3, 4, 10, 4, 10, 10 ] ), + Transformation( [ 10, 10, 3, 6, 3, 6, 10, 6, 10, 10 ] ), + Transformation( [ 10, 10, 3, 8, 3, 8, 10, 8, 10, 10 ] ), + Transformation( [ 10, 10, 5, 4, 5, 4, 10, 4, 10, 10 ] ), + Transformation( [ 10, 10, 5, 6, 5, 6, 10, 6, 10, 10 ] ), Transformation( [ 10, 10, 5, 8, 5, 8, 10, 8, 10, 10 ] ) ] gap> gens := [Transformation([10, 8, 7, 4, 1, 4, 10, 10, 7, 2]), > Transformation([5, 2, 5, 5, 9, 10, 8, 3, 8, 10])];; @@ -1234,13 +1234,13 @@ gap> r := RClass(s, f);; gap> IsRegularGreensClass(r); true gap> Set(Idempotents(r)); -[ Transformation( [ 2, 2, 3, 5, 5, 5, 2, 2, 3, 5 ] ), - Transformation( [ 2, 2, 3, 10, 10, 10, 2, 2, 3, 10 ] ), - Transformation( [ 2, 2, 9, 5, 5, 5, 2, 2, 9, 5 ] ), - Transformation( [ 2, 2, 9, 10, 10, 10, 2, 2, 9, 10 ] ), - Transformation( [ 8, 8, 3, 5, 5, 5, 8, 8, 3, 5 ] ), - Transformation( [ 8, 8, 3, 10, 10, 10, 8, 8, 3, 10 ] ), - Transformation( [ 8, 8, 9, 5, 5, 5, 8, 8, 9, 5 ] ), +[ Transformation( [ 2, 2, 3, 5, 5, 5, 2, 2, 3, 5 ] ), + Transformation( [ 2, 2, 3, 10, 10, 10, 2, 2, 3, 10 ] ), + Transformation( [ 2, 2, 9, 5, 5, 5, 2, 2, 9, 5 ] ), + Transformation( [ 2, 2, 9, 10, 10, 10, 2, 2, 9, 10 ] ), + Transformation( [ 8, 8, 3, 5, 5, 5, 8, 8, 3, 5 ] ), + Transformation( [ 8, 8, 3, 10, 10, 10, 8, 8, 3, 10 ] ), + Transformation( [ 8, 8, 9, 5, 5, 5, 8, 8, 9, 5 ] ), Transformation( [ 8, 8, 9, 10, 10, 10, 8, 8, 9, 10 ] ) ] gap> h := HClass(s, f);; gap> f := Transformation([5, 9, 8, 8, 8, 8, 5, 5, 8, 5]);; @@ -1430,7 +1430,7 @@ gap> for i in [1 .. 100] do > r1 := NextIterator(iter1); > r2 := NextIterator(iter2); > r3 := NextIterator(iter3); -> if not (r1 = r2 and r2 = r3) then +> if r1 <> r2 or r2 <> r3 then > ErrorNoReturn("Problem in IteratorOfRClasses 1"); > fi; > od; @@ -1445,7 +1445,7 @@ gap> GreensDClasses(s);; gap> for i in [1 .. 100] do > r2 := NextIterator(iter2); > r3 := NextIterator(iter3); -> if not r2 = r3 then +> if r2 <> r3 then > ErrorNoReturn("Problem in IteratorOfRClasses 2"); > fi; > od; @@ -1496,7 +1496,7 @@ gap> j := 0; 0 gap> for i in iter1 do > j := j + 1; -> if not i = out[j] then +> if i <> out[j] then > ErrorNoReturn("Problems with IteratorOfRClasses 3"); > fi; > od; @@ -1692,57 +1692,57 @@ gap> d := DClassOfRClass(r); gap> Transformation([3, 6, 8, 5, 7, 4, 2, 8]) in last; true gap> R := GreensRClasses(d); -[ , - , - , - , - , - , - , - , - , +[ , + , + , + , + , + , + , + , + , ] -gap> Transformation([3, 6, 8, 5, 7, 4, 2, 8]) +gap> Transformation([3, 6, 8, 5, 7, 4, 2, 8]) > in RClass(s, Transformation([3, 6, 8, 5, 7, 4, 2, 8])); true -gap> Transformation([7, 4, 2, 8, 3, 5, 6, 8]) +gap> Transformation([7, 4, 2, 8, 3, 5, 6, 8]) > in RClass(s, Transformation([7, 4, 2, 8, 3, 5, 6, 8])); true -gap> Transformation([3, 5, 6, 2, 7, 8, 4, 8]) +gap> Transformation([3, 5, 6, 2, 7, 8, 4, 8]) > in RClass(s, Transformation([3, 5, 6, 2, 7, 8, 4, 8])); true -gap> Transformation([7, 8, 4, 6, 3, 2, 5, 8]) +gap> Transformation([7, 8, 4, 6, 3, 2, 5, 8]) > in RClass(s, Transformation([7, 8, 4, 6, 3, 2, 5, 8])); true -gap> Transformation([3, 2, 5, 4, 7, 6, 8, 8]) +gap> Transformation([3, 2, 5, 4, 7, 6, 8, 8]) > in RClass(s, Transformation([3, 2, 5, 4, 7, 6, 8, 8])); true -gap> Transformation([7, 6, 8, 5, 3, 4, 2, 8]) +gap> Transformation([7, 6, 8, 5, 3, 4, 2, 8]) > in RClass(s, Transformation([7, 6, 8, 5, 3, 4, 2, 8])); true -gap> Transformation([3, 4, 2, 8, 7, 5, 6, 8]) +gap> Transformation([3, 4, 2, 8, 7, 5, 6, 8]) > in RClass(s, Transformation([3, 4, 2, 8, 7, 5, 6, 8])); true -gap> Transformation([7, 5, 6, 2, 3, 8, 4, 8]) +gap> Transformation([7, 5, 6, 2, 3, 8, 4, 8]) > in RClass(s, Transformation([7, 5, 6, 2, 3, 8, 4, 8])); true -gap> Transformation([3, 8, 4, 6, 7, 2, 5, 8]) +gap> Transformation([3, 8, 4, 6, 7, 2, 5, 8]) > in RClass(s, Transformation([3, 8, 4, 6, 7, 2, 5, 8])); true -gap> Transformation([7, 2, 5, 4, 3, 6, 8, 8]) +gap> Transformation([7, 2, 5, 4, 3, 6, 8, 8]) > in RClass(s, Transformation([7, 2, 5, 4, 3, 6, 8, 8])); true gap> r := R[10];; gap> HClassReps(r); -[ Transformation( [ 7, 2, 5, 4, 3, 6, 8, 8 ] ), - Transformation( [ 3, 7, 1, 6, 4, 2, 8, 8 ] ), - Transformation( [ 4, 3, 5, 2, 6, 7, 8, 8 ] ), - Transformation( [ 6, 4, 1, 7, 2, 3, 8, 8 ] ), - Transformation( [ 2, 6, 5, 3, 7, 4, 8, 8 ] ), - Transformation( [ 7, 2, 1, 4, 3, 6, 8, 8 ] ), - Transformation( [ 3, 7, 5, 6, 4, 2, 8, 8 ] ), - Transformation( [ 4, 3, 1, 2, 6, 7, 8, 8 ] ), - Transformation( [ 6, 4, 5, 7, 2, 3, 8, 8 ] ), +[ Transformation( [ 7, 2, 5, 4, 3, 6, 8, 8 ] ), + Transformation( [ 3, 7, 1, 6, 4, 2, 8, 8 ] ), + Transformation( [ 4, 3, 5, 2, 6, 7, 8, 8 ] ), + Transformation( [ 6, 4, 1, 7, 2, 3, 8, 8 ] ), + Transformation( [ 2, 6, 5, 3, 7, 4, 8, 8 ] ), + Transformation( [ 7, 2, 1, 4, 3, 6, 8, 8 ] ), + Transformation( [ 3, 7, 5, 6, 4, 2, 8, 8 ] ), + Transformation( [ 4, 3, 1, 2, 6, 7, 8, 8 ] ), + Transformation( [ 6, 4, 5, 7, 2, 3, 8, 8 ] ), Transformation( [ 2, 6, 1, 3, 7, 4, 8, 8 ] ) ] # GreensTest2 @@ -1876,67 +1876,67 @@ true gap> S := Semigroup(Transformation([3, 4, 4, 4]), > Transformation([4, 3, 1, 2]));; gap> GreensDClasses(S); -[ , - , +[ , + , ] gap> GreensHClasses(S); -[ , - , - , - , - , - , - , - , - , - , - , - , +[ , + , + , + , + , + , + , + , + , + , + , + , ] gap> GreensLClasses(S); -[ , - , - , - , - , - , +[ , + , + , + , + , + , ] gap> GreensRClasses(S); -[ , - , - , - , - , +[ , + , + , + , + , ] gap> D := GreensDClasses(S)[1]; gap> Transformation([3, 4, 4, 4]) in D; true gap> GreensLClasses(D); -[ , +[ , ] gap> GreensRClasses(D); -[ , - , - , +[ , + , + , ] gap> GreensHClasses(D); -[ , - , - , - , - , - , - , +[ , + , + , + , + , + , + , ] gap> R := GreensRClasses(D)[1]; gap> Transformation([3, 4, 4, 4]) in last; true gap> GreensHClasses(R); -[ , +[ , ] -gap> Transformation([1, 2, 2, 2]) +gap> Transformation([1, 2, 2, 2]) > in HClass(R, Transformation([1, 2, 2, 2])); true gap> L := GreensLClasses(D)[1]; @@ -1944,33 +1944,33 @@ gap> L := GreensLClasses(D)[1]; gap> Transformation([3, 4, 4, 4]) in L; true gap> GreensHClasses(L); -[ , - , - , +[ , + , + , ] # GreensTest6 gap> S := Semigroup(Transformation([3, 4, 4, 4]), > Transformation([4, 3, 1, 2]));; gap> DClassReps(S); -[ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 4, 3, 1, 2 ] ), +[ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 4, 3, 1, 2 ] ), Transformation( [ 4, 4, 4, 4 ] ) ] gap> HClassReps(S); -[ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 1, 2, 2, 2 ] ), - Transformation( [ 4, 3, 1, 2 ] ), Transformation( [ 4, 4, 4, 4 ] ), - Transformation( [ 2, 2, 2, 2 ] ), Transformation( [ 3, 3, 3, 3 ] ), - Transformation( [ 1, 1, 1, 1 ] ), Transformation( [ 4, 4, 3, 4 ] ), - Transformation( [ 2, 2, 1, 2 ] ), Transformation( [ 4, 3, 4, 4 ] ), - Transformation( [ 2, 1, 2, 2 ] ), Transformation( [ 4, 4, 4, 3 ] ), +[ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 1, 2, 2, 2 ] ), + Transformation( [ 4, 3, 1, 2 ] ), Transformation( [ 4, 4, 4, 4 ] ), + Transformation( [ 2, 2, 2, 2 ] ), Transformation( [ 3, 3, 3, 3 ] ), + Transformation( [ 1, 1, 1, 1 ] ), Transformation( [ 4, 4, 3, 4 ] ), + Transformation( [ 2, 2, 1, 2 ] ), Transformation( [ 4, 3, 4, 4 ] ), + Transformation( [ 2, 1, 2, 2 ] ), Transformation( [ 4, 4, 4, 3 ] ), Transformation( [ 2, 2, 2, 1 ] ) ] gap> LClassReps(S); -[ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 1, 2, 2, 2 ] ), - Transformation( [ 4, 3, 1, 2 ] ), Transformation( [ 4, 4, 4, 4 ] ), - Transformation( [ 2, 2, 2, 2 ] ), Transformation( [ 3, 3, 3, 3 ] ), +[ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 1, 2, 2, 2 ] ), + Transformation( [ 4, 3, 1, 2 ] ), Transformation( [ 4, 4, 4, 4 ] ), + Transformation( [ 2, 2, 2, 2 ] ), Transformation( [ 3, 3, 3, 3 ] ), Transformation( [ 1, 1, 1, 1 ] ) ] gap> RClassReps(S); -[ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 4, 3, 1, 2 ] ), - Transformation( [ 4, 4, 4, 4 ] ), Transformation( [ 4, 4, 3, 4 ] ), +[ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 4, 3, 1, 2 ] ), + Transformation( [ 4, 4, 4, 4 ] ), Transformation( [ 4, 4, 3, 4 ] ), Transformation( [ 4, 3, 4, 4 ] ), Transformation( [ 4, 4, 4, 3 ] ) ] gap> D := GreensDClasses(S)[1]; @@ -1979,21 +1979,21 @@ true gap> LClassReps(D); [ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 1, 2, 2, 2 ] ) ] gap> HClassReps(D); -[ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 1, 2, 2, 2 ] ), - Transformation( [ 4, 4, 3, 4 ] ), Transformation( [ 2, 2, 1, 2 ] ), - Transformation( [ 4, 3, 4, 4 ] ), Transformation( [ 2, 1, 2, 2 ] ), +[ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 1, 2, 2, 2 ] ), + Transformation( [ 4, 4, 3, 4 ] ), Transformation( [ 2, 2, 1, 2 ] ), + Transformation( [ 4, 3, 4, 4 ] ), Transformation( [ 2, 1, 2, 2 ] ), Transformation( [ 4, 4, 4, 3 ] ), Transformation( [ 2, 2, 2, 1 ] ) ] gap> RClassReps(D); -[ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 4, 4, 3, 4 ] ), +[ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 4, 4, 3, 4 ] ), Transformation( [ 4, 3, 4, 4 ] ), Transformation( [ 4, 4, 4, 3 ] ) ] gap> R := GreensRClasses(D)[1];; gap> HClassReps(R); [ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 1, 2, 2, 2 ] ) ] gap> L := GreensLClasses(D)[1];; gap> HClassReps(L); -[ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 4, 4, 3, 4 ] ), +[ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 4, 4, 3, 4 ] ), Transformation( [ 4, 3, 4, 4 ] ), Transformation( [ 4, 4, 4, 3 ] ) ] -# +# gap> SEMIGROUPS.StopTest(); gap> STOP_TEST("Semigroups package: extreme/greens-acting.tst"); diff --git a/tst/extreme/monoid_pkg.tst b/tst/extreme/monoid_pkg.tst index 3f2ee0025..022ebce97 100644 --- a/tst/extreme/monoid_pkg.tst +++ b/tst/extreme/monoid_pkg.tst @@ -7,7 +7,7 @@ # ############################################################################# ## -## a concatenation of relevant tests from the monoid/tst. +## a concatenation of relevant tests from the monoid/tst. #@local BigMonoids, C, D, H, I, M, S, SmallMonoids, T, a, acting, b, c, c3, c4 #@local cs1, cs2, cs3, cs4, cs5, d, dc, dr, f, g, g1, g2, g3, g4, g5, g6, g7 @@ -48,12 +48,12 @@ IdentityTransformation gap> h := List(s, x -> InversesOfSemigroupElement(s, x));; gap> Sort(h); gap> h; -[ [ Transformation( [ 1, 1, 1, 1, 1, 1, 1, 1 ] ) ], +[ [ Transformation( [ 1, 1, 1, 1, 1, 1, 1, 1 ] ) ], [ IdentityTransformation ], [ Transformation( [ 1, 3, 5, 1, 7, 7, 3, 5 ] ) ] - , [ Transformation( [ 1, 4, 1, 4, 1, 4, 1, 4 ] ) ], - [ Transformation( [ 1, 5, 7, 1, 3, 3, 5, 7 ] ) ], - [ Transformation( [ 1, 6, 7, 4, 3, 8, 5, 2 ] ) ], - [ Transformation( [ 1, 7, 3, 1, 5, 5, 7, 3 ] ) ], + , [ Transformation( [ 1, 4, 1, 4, 1, 4, 1, 4 ] ) ], + [ Transformation( [ 1, 5, 7, 1, 3, 3, 5, 7 ] ) ], + [ Transformation( [ 1, 6, 7, 4, 3, 8, 5, 2 ] ) ], + [ Transformation( [ 1, 7, 3, 1, 5, 5, 7, 3 ] ) ], [ Transformation( [ 1, 8, 5, 4, 7, 2, 3, 6 ] ) ] ] gap> IsMonoidAsSemigroup(s); true @@ -68,7 +68,7 @@ Transformation( [ 1, 1, 1, 1, 1, 1, 1, 1 ] ) gap> MultiplicativeZero(s) in i; true gap> h := List(GreensDClasses(s), GroupHClass);; -gap> h := List(h, x -> StructureDescription(x));; +gap> h := List(h, StructureDescription);; gap> Sort(h); gap> h; [ "1", "1", "C3", "C3" ] @@ -134,10 +134,10 @@ fail gap> MultiplicativeZero(S); Transformation( [ 8, 8, 8, 8, 8, 8, 8, 8 ] ) gap> h := Filtered(h, x -> not x = fail); -[ , - , - , - , +[ , + , + , + , ] gap> List(h, StructureDescription); [ "1", "1", "1", "1", "1" ] @@ -166,41 +166,41 @@ gap> gens := [Transformation([4, 5, 7, 1, 8, 6, 1, 7]), gap> m := Semigroup(gens);; gap> o := LambdaOrb(m);; Enumerate(o);; gap> AsSet(o); -[ [ 0 ], [ 1 ], [ 1, 3 ], [ 1, 3, 4 ], [ 1, 3, 4, 6, 7 ], [ 1, 3, 4, 7 ], - [ 1, 3, 6 ], [ 1, 3, 6, 7 ], [ 1, 3, 7 ], [ 1, 4 ], [ 1, 4, 5 ], - [ 1, 4, 5, 6, 7, 8 ], [ 1, 4, 5, 7 ], [ 1, 4, 6 ], [ 1, 4, 6, 7 ], - [ 1, 4, 6, 7, 8 ], [ 1, 4, 7 ], [ 1, 4, 8 ], [ 1, 6 ], [ 1, 6, 7 ], - [ 1, 6, 7, 8 ], [ 1, 6, 8 ], [ 1, 7 ], [ 1, 7, 8 ], [ 1, 8 ], [ 3 ], - [ 3, 4 ], [ 3, 4, 5 ], [ 3, 4, 5, 6, 7, 8 ], [ 3, 4, 5, 7 ], - [ 3, 4, 5, 7, 8 ], [ 3, 4, 5, 8 ], [ 3, 4, 6 ], [ 3, 4, 6, 7 ], - [ 3, 4, 6, 7, 8 ], [ 3, 4, 6, 8 ], [ 3, 4, 7 ], [ 3, 4, 7, 8 ], - [ 3, 4, 8 ], [ 3, 5 ], [ 3, 5, 7 ], [ 3, 5, 8 ], [ 3, 6 ], [ 3, 6, 7 ], - [ 3, 6, 7, 8 ], [ 3, 6, 8 ], [ 3, 7 ], [ 3, 7, 8 ], [ 3, 8 ], [ 4 ], - [ 4, 5 ], [ 4, 5, 6 ], [ 4, 5, 6, 7 ], [ 4, 5, 6, 7, 8 ], [ 4, 5, 7 ], - [ 4, 5, 7, 8 ], [ 4, 5, 8 ], [ 4, 6 ], [ 4, 6, 7 ], [ 4, 6, 8 ], [ 4, 7 ], - [ 4, 7, 8 ], [ 4, 8 ], [ 5 ], [ 5, 6 ], [ 5, 6, 7 ], [ 5, 6, 8 ], [ 5, 7 ], - [ 5, 7, 8 ], [ 5, 8 ], [ 6 ], [ 6, 7 ], [ 6, 7, 8 ], [ 6, 8 ], [ 7 ], +[ [ 0 ], [ 1 ], [ 1, 3 ], [ 1, 3, 4 ], [ 1, 3, 4, 6, 7 ], [ 1, 3, 4, 7 ], + [ 1, 3, 6 ], [ 1, 3, 6, 7 ], [ 1, 3, 7 ], [ 1, 4 ], [ 1, 4, 5 ], + [ 1, 4, 5, 6, 7, 8 ], [ 1, 4, 5, 7 ], [ 1, 4, 6 ], [ 1, 4, 6, 7 ], + [ 1, 4, 6, 7, 8 ], [ 1, 4, 7 ], [ 1, 4, 8 ], [ 1, 6 ], [ 1, 6, 7 ], + [ 1, 6, 7, 8 ], [ 1, 6, 8 ], [ 1, 7 ], [ 1, 7, 8 ], [ 1, 8 ], [ 3 ], + [ 3, 4 ], [ 3, 4, 5 ], [ 3, 4, 5, 6, 7, 8 ], [ 3, 4, 5, 7 ], + [ 3, 4, 5, 7, 8 ], [ 3, 4, 5, 8 ], [ 3, 4, 6 ], [ 3, 4, 6, 7 ], + [ 3, 4, 6, 7, 8 ], [ 3, 4, 6, 8 ], [ 3, 4, 7 ], [ 3, 4, 7, 8 ], + [ 3, 4, 8 ], [ 3, 5 ], [ 3, 5, 7 ], [ 3, 5, 8 ], [ 3, 6 ], [ 3, 6, 7 ], + [ 3, 6, 7, 8 ], [ 3, 6, 8 ], [ 3, 7 ], [ 3, 7, 8 ], [ 3, 8 ], [ 4 ], + [ 4, 5 ], [ 4, 5, 6 ], [ 4, 5, 6, 7 ], [ 4, 5, 6, 7, 8 ], [ 4, 5, 7 ], + [ 4, 5, 7, 8 ], [ 4, 5, 8 ], [ 4, 6 ], [ 4, 6, 7 ], [ 4, 6, 8 ], [ 4, 7 ], + [ 4, 7, 8 ], [ 4, 8 ], [ 5 ], [ 5, 6 ], [ 5, 6, 7 ], [ 5, 6, 8 ], [ 5, 7 ], + [ 5, 7, 8 ], [ 5, 8 ], [ 6 ], [ 6, 7 ], [ 6, 7, 8 ], [ 6, 8 ], [ 7 ], [ 7, 8 ], [ 8 ] ] gap> gens := [Transformation([1, 5, 2, 2, 3, 5, 2]), > Transformation([7, 3, 6, 5, 2, 4, 1]), > Transformation([7, 5, 3, 2, 5, 5, 6])];; gap> m := Monoid(gens);; gap> o := LambdaOrb(m);; Enumerate(o);; AsSet(o); -[ [ 0 ], [ 1, 2 ], [ 1, 2, 3 ], [ 1, 2, 3, 4, 5 ], [ 1, 2, 3, 4, 5, 6, 7 ], - [ 1, 2, 3, 4, 6 ], [ 1, 2, 3, 5 ], [ 1, 2, 3, 5, 6 ], [ 1, 2, 3, 6 ], - [ 1, 2, 4 ], [ 1, 2, 4, 5 ], [ 1, 2, 4, 5, 6 ], [ 1, 2, 5 ], [ 1, 2, 6 ], - [ 1, 3 ], [ 1, 3, 4 ], [ 1, 3, 4, 5, 6 ], [ 1, 3, 4, 6 ], [ 1, 3, 5 ], - [ 1, 3, 6 ], [ 1, 4 ], [ 1, 4, 5 ], [ 1, 4, 5, 6 ], [ 1, 4, 6 ], [ 1, 5 ], - [ 1, 5, 6 ], [ 1, 6 ], [ 2 ], [ 2, 3 ], [ 2, 3, 4 ], [ 2, 3, 4, 5 ], - [ 2, 3, 4, 5, 7 ], [ 2, 3, 4, 6 ], [ 2, 3, 4, 6, 7 ], [ 2, 3, 5 ], - [ 2, 3, 5, 6 ], [ 2, 3, 5, 6, 7 ], [ 2, 3, 5, 7 ], [ 2, 3, 6 ], - [ 2, 3, 6, 7 ], [ 2, 3, 7 ], [ 2, 4 ], [ 2, 4, 5 ], [ 2, 4, 5, 6 ], - [ 2, 4, 5, 6, 7 ], [ 2, 4, 5, 7 ], [ 2, 4, 6 ], [ 2, 4, 7 ], [ 2, 5 ], - [ 2, 5, 6 ], [ 2, 5, 7 ], [ 2, 6 ], [ 2, 6, 7 ], [ 2, 7 ], [ 3 ], [ 3, 4 ], - [ 3, 4, 5 ], [ 3, 4, 5, 6 ], [ 3, 4, 5, 6, 7 ], [ 3, 4, 6 ], - [ 3, 4, 6, 7 ], [ 3, 4, 7 ], [ 3, 5 ], [ 3, 5, 6 ], [ 3, 5, 7 ], [ 3, 6 ], - [ 3, 6, 7 ], [ 3, 7 ], [ 4 ], [ 4, 5 ], [ 4, 5, 6 ], [ 4, 5, 6, 7 ], - [ 4, 5, 7 ], [ 4, 6 ], [ 4, 6, 7 ], [ 4, 7 ], [ 5 ], [ 5, 6 ], [ 5, 6, 7 ], +[ [ 0 ], [ 1, 2 ], [ 1, 2, 3 ], [ 1, 2, 3, 4, 5 ], [ 1, 2, 3, 4, 5, 6, 7 ], + [ 1, 2, 3, 4, 6 ], [ 1, 2, 3, 5 ], [ 1, 2, 3, 5, 6 ], [ 1, 2, 3, 6 ], + [ 1, 2, 4 ], [ 1, 2, 4, 5 ], [ 1, 2, 4, 5, 6 ], [ 1, 2, 5 ], [ 1, 2, 6 ], + [ 1, 3 ], [ 1, 3, 4 ], [ 1, 3, 4, 5, 6 ], [ 1, 3, 4, 6 ], [ 1, 3, 5 ], + [ 1, 3, 6 ], [ 1, 4 ], [ 1, 4, 5 ], [ 1, 4, 5, 6 ], [ 1, 4, 6 ], [ 1, 5 ], + [ 1, 5, 6 ], [ 1, 6 ], [ 2 ], [ 2, 3 ], [ 2, 3, 4 ], [ 2, 3, 4, 5 ], + [ 2, 3, 4, 5, 7 ], [ 2, 3, 4, 6 ], [ 2, 3, 4, 6, 7 ], [ 2, 3, 5 ], + [ 2, 3, 5, 6 ], [ 2, 3, 5, 6, 7 ], [ 2, 3, 5, 7 ], [ 2, 3, 6 ], + [ 2, 3, 6, 7 ], [ 2, 3, 7 ], [ 2, 4 ], [ 2, 4, 5 ], [ 2, 4, 5, 6 ], + [ 2, 4, 5, 6, 7 ], [ 2, 4, 5, 7 ], [ 2, 4, 6 ], [ 2, 4, 7 ], [ 2, 5 ], + [ 2, 5, 6 ], [ 2, 5, 7 ], [ 2, 6 ], [ 2, 6, 7 ], [ 2, 7 ], [ 3 ], [ 3, 4 ], + [ 3, 4, 5 ], [ 3, 4, 5, 6 ], [ 3, 4, 5, 6, 7 ], [ 3, 4, 6 ], + [ 3, 4, 6, 7 ], [ 3, 4, 7 ], [ 3, 5 ], [ 3, 5, 6 ], [ 3, 5, 7 ], [ 3, 6 ], + [ 3, 6, 7 ], [ 3, 7 ], [ 4 ], [ 4, 5 ], [ 4, 5, 6 ], [ 4, 5, 6, 7 ], + [ 4, 5, 7 ], [ 4, 6 ], [ 4, 6, 7 ], [ 4, 7 ], [ 5 ], [ 5, 6 ], [ 5, 6, 7 ], [ 5, 7 ], [ 6 ], [ 6, 7 ] ] gap> Length(Enumerate(RhoOrb(m))); 207 @@ -438,25 +438,25 @@ gap> gens := [[Transformation([3, 4, 4, 3, 1, 1, 5])], > [Transformation([2, 3, 4, 3, 3]), Transformation([3, 5, 2, 4, 2]), > Transformation([3, 5, 2, 5, 2]), > Transformation([5, 3, 3, 5, 2])]];; -gap> semis := List(gens, x -> Semigroup(x));; +gap> semis := List(gens, Semigroup);; gap> res := List(semis, x -> [NrRClasses(x), Size(x)]); -[ [ 3, 4 ], [ 2, 10 ], [ 3, 14 ], [ 12, 211 ], [ 4, 28 ], [ 378, 4818 ], - [ 2, 5 ], [ 92, 7142 ], [ 81, 615 ], [ 2, 4 ], [ 158, 2255 ], [ 18, 99 ], - [ 9, 50 ], [ 16, 76 ], [ 17, 77 ], [ 6, 13 ], [ 19, 330 ], [ 120, 1263 ], - [ 1, 1 ], [ 14, 53 ], [ 216, 1306 ], [ 6, 12 ], [ 15, 235 ], [ 23, 235 ], - [ 2, 2 ], [ 3, 9 ], [ 2, 2 ], [ 17, 206 ], [ 22, 506 ], [ 24, 340 ], - [ 7, 39 ], [ 99, 495 ], [ 10, 18 ], [ 10, 100 ], [ 34, 843 ], [ 14, 210 ], - [ 546, 3538 ], [ 2, 3 ], [ 2, 3 ], [ 35, 448 ], [ 21, 515 ], [ 9, 14 ], - [ 5, 11 ], [ 17, 23 ], [ 28, 763 ], [ 15, 199 ], [ 21, 170 ], [ 11, 142 ], - [ 2, 2 ], [ 33, 1259 ], [ 6, 25 ], [ 64, 426 ], [ 9, 40 ], [ 46, 388 ], - [ 6, 25 ], [ 11, 49 ], [ 48, 391 ], [ 7, 40 ], [ 13, 18 ], [ 6, 48 ], - [ 30, 792 ], [ 7, 11 ], [ 1, 3 ], [ 2, 3 ], [ 8, 17 ], [ 15, 115 ], - [ 49, 1724 ], [ 8, 45 ], [ 6, 46 ], [ 8, 66 ], [ 2, 4 ], [ 1, 3 ], - [ 322, 4344 ], [ 30, 661 ], [ 1597, 63890 ], [ 10, 76 ], [ 173, 9084 ], - [ 74, 3931 ], [ 15, 117 ], [ 163, 4804 ], [ 14, 106 ], [ 10, 28 ], - [ 1, 2 ], [ 53, 328 ], [ 1, 1 ], [ 17, 26 ], [ 172, 1443 ], [ 230, 15176 ], - [ 83, 1382 ], [ 158, 1074 ], [ 2, 2 ], [ 26, 535 ], [ 3, 6 ], [ 3, 3 ], - [ 44, 1834 ], [ 158, 1776 ], [ 19, 326 ], [ 9, 45 ], [ 32, 379 ], +[ [ 3, 4 ], [ 2, 10 ], [ 3, 14 ], [ 12, 211 ], [ 4, 28 ], [ 378, 4818 ], + [ 2, 5 ], [ 92, 7142 ], [ 81, 615 ], [ 2, 4 ], [ 158, 2255 ], [ 18, 99 ], + [ 9, 50 ], [ 16, 76 ], [ 17, 77 ], [ 6, 13 ], [ 19, 330 ], [ 120, 1263 ], + [ 1, 1 ], [ 14, 53 ], [ 216, 1306 ], [ 6, 12 ], [ 15, 235 ], [ 23, 235 ], + [ 2, 2 ], [ 3, 9 ], [ 2, 2 ], [ 17, 206 ], [ 22, 506 ], [ 24, 340 ], + [ 7, 39 ], [ 99, 495 ], [ 10, 18 ], [ 10, 100 ], [ 34, 843 ], [ 14, 210 ], + [ 546, 3538 ], [ 2, 3 ], [ 2, 3 ], [ 35, 448 ], [ 21, 515 ], [ 9, 14 ], + [ 5, 11 ], [ 17, 23 ], [ 28, 763 ], [ 15, 199 ], [ 21, 170 ], [ 11, 142 ], + [ 2, 2 ], [ 33, 1259 ], [ 6, 25 ], [ 64, 426 ], [ 9, 40 ], [ 46, 388 ], + [ 6, 25 ], [ 11, 49 ], [ 48, 391 ], [ 7, 40 ], [ 13, 18 ], [ 6, 48 ], + [ 30, 792 ], [ 7, 11 ], [ 1, 3 ], [ 2, 3 ], [ 8, 17 ], [ 15, 115 ], + [ 49, 1724 ], [ 8, 45 ], [ 6, 46 ], [ 8, 66 ], [ 2, 4 ], [ 1, 3 ], + [ 322, 4344 ], [ 30, 661 ], [ 1597, 63890 ], [ 10, 76 ], [ 173, 9084 ], + [ 74, 3931 ], [ 15, 117 ], [ 163, 4804 ], [ 14, 106 ], [ 10, 28 ], + [ 1, 2 ], [ 53, 328 ], [ 1, 1 ], [ 17, 26 ], [ 172, 1443 ], [ 230, 15176 ], + [ 83, 1382 ], [ 158, 1074 ], [ 2, 2 ], [ 26, 535 ], [ 3, 6 ], [ 3, 3 ], + [ 44, 1834 ], [ 158, 1776 ], [ 19, 326 ], [ 9, 45 ], [ 32, 379 ], [ 23, 149 ] ] gap> m := semis[32];; gap> Size(m); @@ -464,97 +464,97 @@ gap> Size(m); gap> ForAll(GreensRClasses(m), x -> ForAll(Idempotents(x), y -> y in x)); true gap> idem := Set(Concatenation(List(GreensRClasses(m), Idempotents))); -[ Transformation( [ 1, 1, 1, 1, 1, 1, 1 ] ), - Transformation( [ 1, 1, 1, 1, 1, 1 ] ), - Transformation( [ 1, 1, 1, 4, 1, 1, 1 ] ), - Transformation( [ 1, 1, 3, 1, 1, 1, 1 ] ), - Transformation( [ 1, 1, 3, 1, 1, 1, 3 ] ), - Transformation( [ 1, 1, 3, 1, 1, 1 ] ), - Transformation( [ 1, 1, 3, 3, 1, 1, 1 ] ), - Transformation( [ 1, 1, 3, 3, 1, 1, 3 ] ), - Transformation( [ 1, 1, 3, 3, 1, 1 ] ), - Transformation( [ 1, 1, 3, 6, 6, 6 ] ), - Transformation( [ 1, 1, 4, 4, 1, 1, 1 ] ), - Transformation( [ 1, 1, 4, 4, 1, 1, 4 ] ), - Transformation( [ 1, 1, 7, 1, 1, 1, 7 ] ), - Transformation( [ 1, 1, 7, 7, 1, 1, 7 ] ), - Transformation( [ 1, 2, 1, 1, 1, 1, 1 ] ), - Transformation( [ 1, 2, 1, 1, 1, 1, 2 ] ), - Transformation( [ 1, 2, 1, 1, 1, 1 ] ), - Transformation( [ 1, 2, 2, 2, 1, 1, 2 ] ), - Transformation( [ 1, 2, 2, 2, 2, 1, 2 ] ), - Transformation( [ 1, 2, 3, 3, 1, 1 ] ), - Transformation( [ 1, 2, 7, 7, 1, 1, 7 ] ), - Transformation( [ 1, 3, 3, 3, 1, 1, 3 ] ), - Transformation( [ 1, 3, 3, 3, 3, 1, 3 ] ), - Transformation( [ 1, 4, 4, 4, 1, 1, 4 ] ), - Transformation( [ 1, 4, 4, 4, 4, 1, 4 ] ), - Transformation( [ 1, 5, 5, 5, 5, 1, 5 ] ), - Transformation( [ 1, 7, 1, 1, 1, 1, 7 ] ), - Transformation( [ 1, 7, 3, 3, 1, 1, 7 ] ), - Transformation( [ 1, 7, 7, 7, 1, 1, 7 ] ), - Transformation( [ 1, 7, 7, 7, 7, 1, 7 ] ), - Transformation( [ 2, 2, 2, 2, 2, 2, 2 ] ), - Transformation( [ 2, 2, 2, 2, 2, 2 ] ), - Transformation( [ 2, 2, 7, 2, 2, 2, 7 ] ), - Transformation( [ 2, 2, 7, 7, 2, 2, 7 ] ), - Transformation( [ 3, 3, 3, 3, 3, 3, 3 ] ), - Transformation( [ 3, 3, 3, 3, 3, 3 ] ), - Transformation( [ 3, 3, 3, 4, 3, 3, 3 ] ), - Transformation( [ 3, 7, 3, 3, 3, 3, 7 ] ), - Transformation( [ 4, 4, 3, 4, 4, 4, 3 ] ), - Transformation( [ 4, 4, 3, 4, 4, 4, 4 ] ), - Transformation( [ 4, 4, 4, 4, 4, 4, 4 ] ), - Transformation( [ 5, 3, 3, 3, 5, 5, 3 ] ), - Transformation( [ 5, 4, 4, 4, 5, 5, 4 ] ), - Transformation( [ 5, 5, 3, 3, 5, 5, 3 ] ), - Transformation( [ 5, 5, 3, 3, 5, 5, 5 ] ), - Transformation( [ 5, 5, 3, 3, 5, 5 ] ), - Transformation( [ 5, 5, 3, 4, 5, 5, 3 ] ), - Transformation( [ 5, 5, 3, 4, 5, 5, 5 ] ), - Transformation( [ 5, 5, 3, 4, 5, 5 ] ), - Transformation( [ 5, 5, 3, 5, 5, 5, 3 ] ), - Transformation( [ 5, 5, 3, 5, 5, 5, 5 ] ), - Transformation( [ 5, 5, 3, 5, 5, 5 ] ), - Transformation( [ 5, 5, 4, 4, 5, 5, 4 ] ), - Transformation( [ 5, 5, 4, 4, 5, 5, 5 ] ), - Transformation( [ 5, 5, 5, 4, 5, 5, 5 ] ), - Transformation( [ 5, 5, 5, 5, 5, 5, 5 ] ), - Transformation( [ 5, 5, 5, 5, 5, 5 ] ), - Transformation( [ 5, 5, 7, 5, 5, 5, 7 ] ), - Transformation( [ 5, 5, 7, 7, 5, 5, 7 ] ), - Transformation( [ 5, 7, 3, 3, 5, 5, 7 ] ), - Transformation( [ 5, 7, 5, 5, 5, 5, 7 ] ), - Transformation( [ 5, 7, 7, 7, 5, 5, 7 ] ), - Transformation( [ 6, 2, 2, 2, 2, 6, 2 ] ), - Transformation( [ 6, 2, 2, 2, 6, 6, 2 ] ), - Transformation( [ 6, 2, 6, 6, 6, 6, 2 ] ), - Transformation( [ 6, 2, 6, 6, 6, 6, 6 ] ), - Transformation( [ 6, 3, 3, 3, 3, 6, 3 ] ), - Transformation( [ 6, 3, 3, 3, 6, 6, 3 ] ), - Transformation( [ 6, 4, 4, 4, 4, 6, 4 ] ), - Transformation( [ 6, 4, 4, 4, 6, 6, 4 ] ), - Transformation( [ 6, 5, 5, 5, 5, 6, 5 ] ), - Transformation( [ 6, 6, 3, 3, 6, 6, 3 ] ), - Transformation( [ 6, 6, 3, 3, 6, 6, 6 ] ), - Transformation( [ 6, 6, 3, 3, 6, 6 ] ), - Transformation( [ 6, 6, 3, 6, 6, 6, 3 ] ), - Transformation( [ 6, 6, 3, 6, 6, 6, 6 ] ), - Transformation( [ 6, 6, 3, 6, 6, 6 ] ), - Transformation( [ 6, 6, 4, 4, 6, 6, 4 ] ), - Transformation( [ 6, 6, 4, 4, 6, 6, 6 ] ), - Transformation( [ 6, 6, 6, 4, 6, 6, 6 ] ), - Transformation( [ 6, 6, 6, 6, 6, 6, 6 ] ), - Transformation( [ 6, 6, 6, 6, 6, 6 ] ), - Transformation( [ 6, 6, 7, 6, 6, 6, 7 ] ), - Transformation( [ 6, 6, 7, 7, 6, 6, 7 ] ), - Transformation( [ 6, 7, 3, 3, 6, 6, 7 ] ), - Transformation( [ 6, 7, 6, 6, 6, 6, 7 ] ), - Transformation( [ 6, 7, 7, 7, 6, 6, 7 ] ), - Transformation( [ 6, 7, 7, 7, 7, 6, 7 ] ), - Transformation( [ 7, 2, 7, 7, 7, 7, 7 ] ), - Transformation( [ 7, 7, 3, 3, 7, 7, 7 ] ), - Transformation( [ 7, 7, 3, 7, 7, 7, 7 ] ), +[ Transformation( [ 1, 1, 1, 1, 1, 1, 1 ] ), + Transformation( [ 1, 1, 1, 1, 1, 1 ] ), + Transformation( [ 1, 1, 1, 4, 1, 1, 1 ] ), + Transformation( [ 1, 1, 3, 1, 1, 1, 1 ] ), + Transformation( [ 1, 1, 3, 1, 1, 1, 3 ] ), + Transformation( [ 1, 1, 3, 1, 1, 1 ] ), + Transformation( [ 1, 1, 3, 3, 1, 1, 1 ] ), + Transformation( [ 1, 1, 3, 3, 1, 1, 3 ] ), + Transformation( [ 1, 1, 3, 3, 1, 1 ] ), + Transformation( [ 1, 1, 3, 6, 6, 6 ] ), + Transformation( [ 1, 1, 4, 4, 1, 1, 1 ] ), + Transformation( [ 1, 1, 4, 4, 1, 1, 4 ] ), + Transformation( [ 1, 1, 7, 1, 1, 1, 7 ] ), + Transformation( [ 1, 1, 7, 7, 1, 1, 7 ] ), + Transformation( [ 1, 2, 1, 1, 1, 1, 1 ] ), + Transformation( [ 1, 2, 1, 1, 1, 1, 2 ] ), + Transformation( [ 1, 2, 1, 1, 1, 1 ] ), + Transformation( [ 1, 2, 2, 2, 1, 1, 2 ] ), + Transformation( [ 1, 2, 2, 2, 2, 1, 2 ] ), + Transformation( [ 1, 2, 3, 3, 1, 1 ] ), + Transformation( [ 1, 2, 7, 7, 1, 1, 7 ] ), + Transformation( [ 1, 3, 3, 3, 1, 1, 3 ] ), + Transformation( [ 1, 3, 3, 3, 3, 1, 3 ] ), + Transformation( [ 1, 4, 4, 4, 1, 1, 4 ] ), + Transformation( [ 1, 4, 4, 4, 4, 1, 4 ] ), + Transformation( [ 1, 5, 5, 5, 5, 1, 5 ] ), + Transformation( [ 1, 7, 1, 1, 1, 1, 7 ] ), + Transformation( [ 1, 7, 3, 3, 1, 1, 7 ] ), + Transformation( [ 1, 7, 7, 7, 1, 1, 7 ] ), + Transformation( [ 1, 7, 7, 7, 7, 1, 7 ] ), + Transformation( [ 2, 2, 2, 2, 2, 2, 2 ] ), + Transformation( [ 2, 2, 2, 2, 2, 2 ] ), + Transformation( [ 2, 2, 7, 2, 2, 2, 7 ] ), + Transformation( [ 2, 2, 7, 7, 2, 2, 7 ] ), + Transformation( [ 3, 3, 3, 3, 3, 3, 3 ] ), + Transformation( [ 3, 3, 3, 3, 3, 3 ] ), + Transformation( [ 3, 3, 3, 4, 3, 3, 3 ] ), + Transformation( [ 3, 7, 3, 3, 3, 3, 7 ] ), + Transformation( [ 4, 4, 3, 4, 4, 4, 3 ] ), + Transformation( [ 4, 4, 3, 4, 4, 4, 4 ] ), + Transformation( [ 4, 4, 4, 4, 4, 4, 4 ] ), + Transformation( [ 5, 3, 3, 3, 5, 5, 3 ] ), + Transformation( [ 5, 4, 4, 4, 5, 5, 4 ] ), + Transformation( [ 5, 5, 3, 3, 5, 5, 3 ] ), + Transformation( [ 5, 5, 3, 3, 5, 5, 5 ] ), + Transformation( [ 5, 5, 3, 3, 5, 5 ] ), + Transformation( [ 5, 5, 3, 4, 5, 5, 3 ] ), + Transformation( [ 5, 5, 3, 4, 5, 5, 5 ] ), + Transformation( [ 5, 5, 3, 4, 5, 5 ] ), + Transformation( [ 5, 5, 3, 5, 5, 5, 3 ] ), + Transformation( [ 5, 5, 3, 5, 5, 5, 5 ] ), + Transformation( [ 5, 5, 3, 5, 5, 5 ] ), + Transformation( [ 5, 5, 4, 4, 5, 5, 4 ] ), + Transformation( [ 5, 5, 4, 4, 5, 5, 5 ] ), + Transformation( [ 5, 5, 5, 4, 5, 5, 5 ] ), + Transformation( [ 5, 5, 5, 5, 5, 5, 5 ] ), + Transformation( [ 5, 5, 5, 5, 5, 5 ] ), + Transformation( [ 5, 5, 7, 5, 5, 5, 7 ] ), + Transformation( [ 5, 5, 7, 7, 5, 5, 7 ] ), + Transformation( [ 5, 7, 3, 3, 5, 5, 7 ] ), + Transformation( [ 5, 7, 5, 5, 5, 5, 7 ] ), + Transformation( [ 5, 7, 7, 7, 5, 5, 7 ] ), + Transformation( [ 6, 2, 2, 2, 2, 6, 2 ] ), + Transformation( [ 6, 2, 2, 2, 6, 6, 2 ] ), + Transformation( [ 6, 2, 6, 6, 6, 6, 2 ] ), + Transformation( [ 6, 2, 6, 6, 6, 6, 6 ] ), + Transformation( [ 6, 3, 3, 3, 3, 6, 3 ] ), + Transformation( [ 6, 3, 3, 3, 6, 6, 3 ] ), + Transformation( [ 6, 4, 4, 4, 4, 6, 4 ] ), + Transformation( [ 6, 4, 4, 4, 6, 6, 4 ] ), + Transformation( [ 6, 5, 5, 5, 5, 6, 5 ] ), + Transformation( [ 6, 6, 3, 3, 6, 6, 3 ] ), + Transformation( [ 6, 6, 3, 3, 6, 6, 6 ] ), + Transformation( [ 6, 6, 3, 3, 6, 6 ] ), + Transformation( [ 6, 6, 3, 6, 6, 6, 3 ] ), + Transformation( [ 6, 6, 3, 6, 6, 6, 6 ] ), + Transformation( [ 6, 6, 3, 6, 6, 6 ] ), + Transformation( [ 6, 6, 4, 4, 6, 6, 4 ] ), + Transformation( [ 6, 6, 4, 4, 6, 6, 6 ] ), + Transformation( [ 6, 6, 6, 4, 6, 6, 6 ] ), + Transformation( [ 6, 6, 6, 6, 6, 6, 6 ] ), + Transformation( [ 6, 6, 6, 6, 6, 6 ] ), + Transformation( [ 6, 6, 7, 6, 6, 6, 7 ] ), + Transformation( [ 6, 6, 7, 7, 6, 6, 7 ] ), + Transformation( [ 6, 7, 3, 3, 6, 6, 7 ] ), + Transformation( [ 6, 7, 6, 6, 6, 6, 7 ] ), + Transformation( [ 6, 7, 7, 7, 6, 6, 7 ] ), + Transformation( [ 6, 7, 7, 7, 7, 6, 7 ] ), + Transformation( [ 7, 2, 7, 7, 7, 7, 7 ] ), + Transformation( [ 7, 7, 3, 3, 7, 7, 7 ] ), + Transformation( [ 7, 7, 3, 7, 7, 7, 7 ] ), Transformation( [ 7, 7, 7, 7, 7, 7, 7 ] ) ] gap> idem = Set(Idempotents(m)); true @@ -583,157 +583,157 @@ gap> r2 := First(dr, x -> x = r);; gap> DClassOfRClass(r2) = d; true gap> res := List(semis, x -> [Length(GreensLClasses(x)), Size(x)]); -[ [ 3, 4 ], [ 5, 10 ], [ 2, 14 ], [ 19, 211 ], [ 9, 28 ], [ 46, 4818 ], - [ 2, 5 ], [ 39, 7142 ], [ 25, 615 ], [ 2, 4 ], [ 789, 2255 ], [ 21, 99 ], - [ 11, 50 ], [ 25, 76 ], [ 42, 77 ], [ 10, 13 ], [ 23, 330 ], [ 87, 1263 ], - [ 1, 1 ], [ 24, 53 ], [ 195, 1306 ], [ 9, 12 ], [ 15, 235 ], [ 28, 235 ], - [ 2, 2 ], [ 7, 9 ], [ 2, 2 ], [ 18, 206 ], [ 26, 506 ], [ 25, 340 ], - [ 10, 39 ], [ 45, 495 ], [ 13, 18 ], [ 11, 100 ], [ 94, 843 ], [ 15, 210 ], - [ 80, 3538 ], [ 2, 3 ], [ 2, 3 ], [ 103, 448 ], [ 21, 515 ], [ 10, 14 ], - [ 7, 11 ], [ 14, 23 ], [ 27, 763 ], [ 14, 199 ], [ 20, 170 ], [ 13, 142 ], - [ 2, 2 ], [ 30, 1259 ], [ 9, 25 ], [ 23, 426 ], [ 17, 40 ], [ 34, 388 ], - [ 8, 25 ], [ 13, 49 ], [ 31, 391 ], [ 10, 40 ], [ 17, 18 ], [ 12, 48 ], - [ 68, 792 ], [ 10, 11 ], [ 1, 3 ], [ 2, 3 ], [ 8, 17 ], [ 22, 115 ], - [ 201, 1724 ], [ 7, 45 ], [ 10, 46 ], [ 11, 66 ], [ 2, 4 ], [ 1, 3 ], - [ 363, 4344 ], [ 68, 661 ], [ 2423, 63890 ], [ 11, 76 ], [ 57, 9084 ], - [ 84, 3931 ], [ 12, 117 ], [ 156, 4804 ], [ 16, 106 ], [ 10, 28 ], - [ 1, 2 ], [ 52, 328 ], [ 1, 1 ], [ 20, 26 ], [ 257, 1443 ], [ 74, 15176 ], - [ 333, 1382 ], [ 74, 1074 ], [ 2, 2 ], [ 28, 535 ], [ 3, 6 ], [ 3, 3 ], - [ 35, 1834 ], [ 93, 1776 ], [ 18, 326 ], [ 16, 45 ], [ 25, 379 ], +[ [ 3, 4 ], [ 5, 10 ], [ 2, 14 ], [ 19, 211 ], [ 9, 28 ], [ 46, 4818 ], + [ 2, 5 ], [ 39, 7142 ], [ 25, 615 ], [ 2, 4 ], [ 789, 2255 ], [ 21, 99 ], + [ 11, 50 ], [ 25, 76 ], [ 42, 77 ], [ 10, 13 ], [ 23, 330 ], [ 87, 1263 ], + [ 1, 1 ], [ 24, 53 ], [ 195, 1306 ], [ 9, 12 ], [ 15, 235 ], [ 28, 235 ], + [ 2, 2 ], [ 7, 9 ], [ 2, 2 ], [ 18, 206 ], [ 26, 506 ], [ 25, 340 ], + [ 10, 39 ], [ 45, 495 ], [ 13, 18 ], [ 11, 100 ], [ 94, 843 ], [ 15, 210 ], + [ 80, 3538 ], [ 2, 3 ], [ 2, 3 ], [ 103, 448 ], [ 21, 515 ], [ 10, 14 ], + [ 7, 11 ], [ 14, 23 ], [ 27, 763 ], [ 14, 199 ], [ 20, 170 ], [ 13, 142 ], + [ 2, 2 ], [ 30, 1259 ], [ 9, 25 ], [ 23, 426 ], [ 17, 40 ], [ 34, 388 ], + [ 8, 25 ], [ 13, 49 ], [ 31, 391 ], [ 10, 40 ], [ 17, 18 ], [ 12, 48 ], + [ 68, 792 ], [ 10, 11 ], [ 1, 3 ], [ 2, 3 ], [ 8, 17 ], [ 22, 115 ], + [ 201, 1724 ], [ 7, 45 ], [ 10, 46 ], [ 11, 66 ], [ 2, 4 ], [ 1, 3 ], + [ 363, 4344 ], [ 68, 661 ], [ 2423, 63890 ], [ 11, 76 ], [ 57, 9084 ], + [ 84, 3931 ], [ 12, 117 ], [ 156, 4804 ], [ 16, 106 ], [ 10, 28 ], + [ 1, 2 ], [ 52, 328 ], [ 1, 1 ], [ 20, 26 ], [ 257, 1443 ], [ 74, 15176 ], + [ 333, 1382 ], [ 74, 1074 ], [ 2, 2 ], [ 28, 535 ], [ 3, 6 ], [ 3, 3 ], + [ 35, 1834 ], [ 93, 1776 ], [ 18, 326 ], [ 16, 45 ], [ 25, 379 ], [ 33, 149 ] ] gap> ForAll(GreensLClasses(m), x -> > ForAll(Idempotents(x), y -> y in x)); true gap> idem := Set(Concatenation(List(GreensLClasses(m), Idempotents))); -[ Transformation( [ 1, 1, 1, 1, 1, 1, 1 ] ), - Transformation( [ 1, 1, 1, 1, 5, 1, 1 ] ), - Transformation( [ 1, 1, 1, 1, 5, 1, 5 ] ), - Transformation( [ 1, 1, 1, 1, 5, 5, 1 ] ), - Transformation( [ 1, 1, 1, 4, 1, 1, 1 ] ), - Transformation( [ 1, 1, 1, 4, 1, 4, 1 ] ), - Transformation( [ 1, 1, 1, 4, 4, 1, 4 ] ), - Transformation( [ 1, 1, 1, 4, 5, 1, 5 ] ), - Transformation( [ 1, 1, 1, 5, 5, 1, 5 ] ), - Transformation( [ 1, 1, 4, 4, 1, 1, 1 ] ), - Transformation( [ 1, 1, 4, 4, 4, 1, 4 ] ), - Transformation( [ 1, 1, 5, 5, 5, 1, 5 ] ), - Transformation( [ 1, 2, 1, 1, 1, 1, 1 ] ), - Transformation( [ 1, 2, 1, 1, 2, 1, 1 ] ), - Transformation( [ 1, 2, 1, 1, 2, 1, 2 ] ), - Transformation( [ 1, 2, 1, 1, 2, 2, 2 ] ), - Transformation( [ 1, 2, 1, 1, 5, 1, 1 ] ), - Transformation( [ 1, 2, 1, 2, 2, 1, 2 ] ), - Transformation( [ 1, 2, 1, 2, 2, 2, 2 ] ), - Transformation( [ 1, 2, 2, 1, 1, 1, 1 ] ), - Transformation( [ 1, 2, 2, 1, 1, 2, 1 ] ), - Transformation( [ 1, 2, 2, 1, 2, 2, 1 ] ), - Transformation( [ 1, 2, 2, 1, 5, 5, 1 ] ), - Transformation( [ 1, 4, 1, 4, 4, 1, 4 ] ), - Transformation( [ 1, 4, 1, 4, 4, 4, 4 ] ), - Transformation( [ 1, 5, 1, 1, 5, 1, 1 ] ), - Transformation( [ 1, 5, 1, 1, 5, 1, 5 ] ), - Transformation( [ 1, 5, 1, 1, 5, 5, 5 ] ), - Transformation( [ 1, 5, 1, 4, 5, 4, 5 ] ), - Transformation( [ 1, 5, 1, 5, 5, 1, 5 ] ), - Transformation( [ 1, 5, 1, 5, 5, 5, 5 ] ), - Transformation( [ 1, 5, 5, 1, 5, 5, 1 ] ), - Transformation( [ 2, 2, 2, 2, 2, 2, 2 ] ), - Transformation( [ 2, 2, 2, 2, 2, 6, 2 ] ), - Transformation( [ 2, 2, 2, 2, 5, 2, 2 ] ), - Transformation( [ 2, 2, 2, 2, 5, 2, 5 ] ), - Transformation( [ 2, 2, 2, 2, 5, 5, 2 ] ), - Transformation( [ 2, 2, 2, 2, 6, 6, 2 ] ), - Transformation( [ 2, 2, 2, 2, 7, 2, 7 ] ), - Transformation( [ 2, 2, 2, 5, 5, 2, 5 ] ), - Transformation( [ 2, 2, 2, 6, 2, 6, 2 ] ), - Transformation( [ 2, 2, 2, 7, 7, 2, 7 ] ), - Transformation( [ 2, 2, 5, 5, 5, 2, 5 ] ), - Transformation( [ 2, 2, 7, 7, 7, 2, 7 ] ), - Transformation( [ 3, 3, 3, 3, 3, 3, 3 ] ), - Transformation( [ 3, 3, 3, 3, 5, 3, 3 ] ), - Transformation( [ 3, 3, 3, 3, 5, 3, 5 ] ), - Transformation( [ 3, 3, 3, 3, 5, 5, 3 ] ), - Transformation( [ 3, 3, 3, 3, 7, 3, 7 ] ), - Transformation( [ 3, 3, 3, 4, 3, 3, 3 ] ), - Transformation( [ 3, 3, 3, 4, 3, 4, 3 ] ), - Transformation( [ 3, 3, 3, 4, 4, 3, 4 ] ), - Transformation( [ 3, 3, 3, 4, 5, 3, 5 ] ), - Transformation( [ 3, 3, 3, 4, 7, 3, 7 ] ), - Transformation( [ 3, 3, 3, 5, 5, 3, 5 ] ), - Transformation( [ 3, 3, 3, 7, 7, 3, 7 ] ), - Transformation( [ 3, 4, 3, 4, 4, 3, 4 ] ), - Transformation( [ 3, 4, 3, 4, 4, 4, 4 ] ), - Transformation( [ 3, 5, 3, 3, 5, 3, 3 ] ), - Transformation( [ 3, 5, 3, 3, 5, 3, 5 ] ), - Transformation( [ 3, 5, 3, 3, 5, 5, 5 ] ), - Transformation( [ 3, 5, 3, 4, 5, 4, 5 ] ), - Transformation( [ 3, 5, 3, 5, 5, 3, 5 ] ), - Transformation( [ 3, 5, 3, 5, 5, 5, 5 ] ), - Transformation( [ 3, 7, 3, 3, 7, 3, 7 ] ), - Transformation( [ 3, 7, 3, 3, 7, 7, 7 ] ), - Transformation( [ 3, 7, 3, 4, 7, 4, 7 ] ), - Transformation( [ 3, 7, 3, 7, 7, 3, 7 ] ), - Transformation( [ 3, 7, 3, 7, 7, 7, 7 ] ), - Transformation( [ 4, 3, 3, 4, 3, 3, 4 ] ), - Transformation( [ 4, 3, 3, 4, 4, 3, 4 ] ), - Transformation( [ 4, 3, 3, 4, 4, 4, 4 ] ), - Transformation( [ 4, 3, 3, 4, 5, 5, 4 ] ), - Transformation( [ 4, 4, 4, 4, 4, 4, 4 ] ), - Transformation( [ 4, 4, 4, 4, 5, 4, 4 ] ), - Transformation( [ 4, 4, 4, 4, 5, 4, 5 ] ), - Transformation( [ 4, 4, 4, 4, 5, 5, 4 ] ), - Transformation( [ 4, 4, 4, 4, 7, 4, 7 ] ), - Transformation( [ 4, 5, 4, 4, 5, 4, 4 ] ), - Transformation( [ 4, 5, 4, 4, 5, 4, 5 ] ), - Transformation( [ 4, 5, 4, 4, 5, 5, 5 ] ), - Transformation( [ 4, 5, 5, 4, 5, 5, 4 ] ), - Transformation( [ 4, 7, 4, 4, 7, 4, 7 ] ), - Transformation( [ 4, 7, 4, 4, 7, 7, 7 ] ), - Transformation( [ 5, 2, 2, 5, 5, 2, 5 ] ), - Transformation( [ 5, 2, 2, 5, 5, 5, 5 ] ), - Transformation( [ 5, 2, 5, 5, 5, 5, 5 ] ), - Transformation( [ 5, 3, 3, 5, 5, 3, 5 ] ), - Transformation( [ 5, 3, 3, 5, 5, 5, 5 ] ), - Transformation( [ 5, 5, 3, 3, 5, 5, 5 ] ), - Transformation( [ 5, 5, 4, 4, 5, 5, 5 ] ), - Transformation( [ 5, 5, 5, 4, 5, 4, 5 ] ), - Transformation( [ 5, 5, 5, 4, 5, 5, 5 ] ), - Transformation( [ 5, 5, 5, 5, 5, 5, 5 ] ), - Transformation( [ 6, 2, 2, 6, 6, 6, 6 ] ), - Transformation( [ 6, 2, 6, 2, 2, 6, 2 ] ), - Transformation( [ 6, 2, 6, 6, 2, 6, 2 ] ), - Transformation( [ 6, 2, 6, 6, 2, 6, 6 ] ), - Transformation( [ 6, 2, 6, 6, 6, 6, 6 ] ), - Transformation( [ 6, 6, 6, 6, 6, 6, 6 ] ), - Transformation( [ 6, 6, 6, 6, 7, 6, 7 ] ), - Transformation( [ 6, 6, 6, 7, 7, 6, 7 ] ), - Transformation( [ 6, 6, 7, 7, 7, 6, 7 ] ), - Transformation( [ 6, 7, 6, 6, 7, 6, 7 ] ), - Transformation( [ 6, 7, 6, 7, 7, 6, 7 ] ), - Transformation( [ 7, 2, 2, 7, 2, 2, 7 ] ), - Transformation( [ 7, 2, 2, 7, 5, 5, 7 ] ), - Transformation( [ 7, 2, 2, 7, 6, 6, 7 ] ), - Transformation( [ 7, 2, 2, 7, 7, 2, 7 ] ), - Transformation( [ 7, 2, 2, 7, 7, 7, 7 ] ), - Transformation( [ 7, 2, 7, 7, 2, 7, 7 ] ), - Transformation( [ 7, 2, 7, 7, 5, 7, 7 ] ), - Transformation( [ 7, 2, 7, 7, 7, 7, 7 ] ), - Transformation( [ 7, 3, 3, 7, 3, 3, 7 ] ), - Transformation( [ 7, 3, 3, 7, 7, 3, 7 ] ), - Transformation( [ 7, 3, 3, 7, 7, 7, 7 ] ), - Transformation( [ 7, 5, 5, 7, 5, 5, 7 ] ), - Transformation( [ 7, 5, 7, 7, 5, 7, 7 ] ), - Transformation( [ 7, 6, 6, 7, 6, 6, 7 ] ), - Transformation( [ 7, 6, 6, 7, 7, 6, 7 ] ), - Transformation( [ 7, 7, 3, 3, 7, 7, 7 ] ), - Transformation( [ 7, 7, 4, 4, 7, 7, 7 ] ), - Transformation( [ 7, 7, 7, 4, 7, 4, 7 ] ), - Transformation( [ 7, 7, 7, 4, 7, 7, 7 ] ), - Transformation( [ 7, 7, 7, 6, 7, 6, 7 ] ), - Transformation( [ 7, 7, 7, 7, 5, 5, 7 ] ), - Transformation( [ 7, 7, 7, 7, 5, 7, 7 ] ), - Transformation( [ 7, 7, 7, 7, 6, 6, 7 ] ), - Transformation( [ 7, 7, 7, 7, 7, 6, 7 ] ), +[ Transformation( [ 1, 1, 1, 1, 1, 1, 1 ] ), + Transformation( [ 1, 1, 1, 1, 5, 1, 1 ] ), + Transformation( [ 1, 1, 1, 1, 5, 1, 5 ] ), + Transformation( [ 1, 1, 1, 1, 5, 5, 1 ] ), + Transformation( [ 1, 1, 1, 4, 1, 1, 1 ] ), + Transformation( [ 1, 1, 1, 4, 1, 4, 1 ] ), + Transformation( [ 1, 1, 1, 4, 4, 1, 4 ] ), + Transformation( [ 1, 1, 1, 4, 5, 1, 5 ] ), + Transformation( [ 1, 1, 1, 5, 5, 1, 5 ] ), + Transformation( [ 1, 1, 4, 4, 1, 1, 1 ] ), + Transformation( [ 1, 1, 4, 4, 4, 1, 4 ] ), + Transformation( [ 1, 1, 5, 5, 5, 1, 5 ] ), + Transformation( [ 1, 2, 1, 1, 1, 1, 1 ] ), + Transformation( [ 1, 2, 1, 1, 2, 1, 1 ] ), + Transformation( [ 1, 2, 1, 1, 2, 1, 2 ] ), + Transformation( [ 1, 2, 1, 1, 2, 2, 2 ] ), + Transformation( [ 1, 2, 1, 1, 5, 1, 1 ] ), + Transformation( [ 1, 2, 1, 2, 2, 1, 2 ] ), + Transformation( [ 1, 2, 1, 2, 2, 2, 2 ] ), + Transformation( [ 1, 2, 2, 1, 1, 1, 1 ] ), + Transformation( [ 1, 2, 2, 1, 1, 2, 1 ] ), + Transformation( [ 1, 2, 2, 1, 2, 2, 1 ] ), + Transformation( [ 1, 2, 2, 1, 5, 5, 1 ] ), + Transformation( [ 1, 4, 1, 4, 4, 1, 4 ] ), + Transformation( [ 1, 4, 1, 4, 4, 4, 4 ] ), + Transformation( [ 1, 5, 1, 1, 5, 1, 1 ] ), + Transformation( [ 1, 5, 1, 1, 5, 1, 5 ] ), + Transformation( [ 1, 5, 1, 1, 5, 5, 5 ] ), + Transformation( [ 1, 5, 1, 4, 5, 4, 5 ] ), + Transformation( [ 1, 5, 1, 5, 5, 1, 5 ] ), + Transformation( [ 1, 5, 1, 5, 5, 5, 5 ] ), + Transformation( [ 1, 5, 5, 1, 5, 5, 1 ] ), + Transformation( [ 2, 2, 2, 2, 2, 2, 2 ] ), + Transformation( [ 2, 2, 2, 2, 2, 6, 2 ] ), + Transformation( [ 2, 2, 2, 2, 5, 2, 2 ] ), + Transformation( [ 2, 2, 2, 2, 5, 2, 5 ] ), + Transformation( [ 2, 2, 2, 2, 5, 5, 2 ] ), + Transformation( [ 2, 2, 2, 2, 6, 6, 2 ] ), + Transformation( [ 2, 2, 2, 2, 7, 2, 7 ] ), + Transformation( [ 2, 2, 2, 5, 5, 2, 5 ] ), + Transformation( [ 2, 2, 2, 6, 2, 6, 2 ] ), + Transformation( [ 2, 2, 2, 7, 7, 2, 7 ] ), + Transformation( [ 2, 2, 5, 5, 5, 2, 5 ] ), + Transformation( [ 2, 2, 7, 7, 7, 2, 7 ] ), + Transformation( [ 3, 3, 3, 3, 3, 3, 3 ] ), + Transformation( [ 3, 3, 3, 3, 5, 3, 3 ] ), + Transformation( [ 3, 3, 3, 3, 5, 3, 5 ] ), + Transformation( [ 3, 3, 3, 3, 5, 5, 3 ] ), + Transformation( [ 3, 3, 3, 3, 7, 3, 7 ] ), + Transformation( [ 3, 3, 3, 4, 3, 3, 3 ] ), + Transformation( [ 3, 3, 3, 4, 3, 4, 3 ] ), + Transformation( [ 3, 3, 3, 4, 4, 3, 4 ] ), + Transformation( [ 3, 3, 3, 4, 5, 3, 5 ] ), + Transformation( [ 3, 3, 3, 4, 7, 3, 7 ] ), + Transformation( [ 3, 3, 3, 5, 5, 3, 5 ] ), + Transformation( [ 3, 3, 3, 7, 7, 3, 7 ] ), + Transformation( [ 3, 4, 3, 4, 4, 3, 4 ] ), + Transformation( [ 3, 4, 3, 4, 4, 4, 4 ] ), + Transformation( [ 3, 5, 3, 3, 5, 3, 3 ] ), + Transformation( [ 3, 5, 3, 3, 5, 3, 5 ] ), + Transformation( [ 3, 5, 3, 3, 5, 5, 5 ] ), + Transformation( [ 3, 5, 3, 4, 5, 4, 5 ] ), + Transformation( [ 3, 5, 3, 5, 5, 3, 5 ] ), + Transformation( [ 3, 5, 3, 5, 5, 5, 5 ] ), + Transformation( [ 3, 7, 3, 3, 7, 3, 7 ] ), + Transformation( [ 3, 7, 3, 3, 7, 7, 7 ] ), + Transformation( [ 3, 7, 3, 4, 7, 4, 7 ] ), + Transformation( [ 3, 7, 3, 7, 7, 3, 7 ] ), + Transformation( [ 3, 7, 3, 7, 7, 7, 7 ] ), + Transformation( [ 4, 3, 3, 4, 3, 3, 4 ] ), + Transformation( [ 4, 3, 3, 4, 4, 3, 4 ] ), + Transformation( [ 4, 3, 3, 4, 4, 4, 4 ] ), + Transformation( [ 4, 3, 3, 4, 5, 5, 4 ] ), + Transformation( [ 4, 4, 4, 4, 4, 4, 4 ] ), + Transformation( [ 4, 4, 4, 4, 5, 4, 4 ] ), + Transformation( [ 4, 4, 4, 4, 5, 4, 5 ] ), + Transformation( [ 4, 4, 4, 4, 5, 5, 4 ] ), + Transformation( [ 4, 4, 4, 4, 7, 4, 7 ] ), + Transformation( [ 4, 5, 4, 4, 5, 4, 4 ] ), + Transformation( [ 4, 5, 4, 4, 5, 4, 5 ] ), + Transformation( [ 4, 5, 4, 4, 5, 5, 5 ] ), + Transformation( [ 4, 5, 5, 4, 5, 5, 4 ] ), + Transformation( [ 4, 7, 4, 4, 7, 4, 7 ] ), + Transformation( [ 4, 7, 4, 4, 7, 7, 7 ] ), + Transformation( [ 5, 2, 2, 5, 5, 2, 5 ] ), + Transformation( [ 5, 2, 2, 5, 5, 5, 5 ] ), + Transformation( [ 5, 2, 5, 5, 5, 5, 5 ] ), + Transformation( [ 5, 3, 3, 5, 5, 3, 5 ] ), + Transformation( [ 5, 3, 3, 5, 5, 5, 5 ] ), + Transformation( [ 5, 5, 3, 3, 5, 5, 5 ] ), + Transformation( [ 5, 5, 4, 4, 5, 5, 5 ] ), + Transformation( [ 5, 5, 5, 4, 5, 4, 5 ] ), + Transformation( [ 5, 5, 5, 4, 5, 5, 5 ] ), + Transformation( [ 5, 5, 5, 5, 5, 5, 5 ] ), + Transformation( [ 6, 2, 2, 6, 6, 6, 6 ] ), + Transformation( [ 6, 2, 6, 2, 2, 6, 2 ] ), + Transformation( [ 6, 2, 6, 6, 2, 6, 2 ] ), + Transformation( [ 6, 2, 6, 6, 2, 6, 6 ] ), + Transformation( [ 6, 2, 6, 6, 6, 6, 6 ] ), + Transformation( [ 6, 6, 6, 6, 6, 6, 6 ] ), + Transformation( [ 6, 6, 6, 6, 7, 6, 7 ] ), + Transformation( [ 6, 6, 6, 7, 7, 6, 7 ] ), + Transformation( [ 6, 6, 7, 7, 7, 6, 7 ] ), + Transformation( [ 6, 7, 6, 6, 7, 6, 7 ] ), + Transformation( [ 6, 7, 6, 7, 7, 6, 7 ] ), + Transformation( [ 7, 2, 2, 7, 2, 2, 7 ] ), + Transformation( [ 7, 2, 2, 7, 5, 5, 7 ] ), + Transformation( [ 7, 2, 2, 7, 6, 6, 7 ] ), + Transformation( [ 7, 2, 2, 7, 7, 2, 7 ] ), + Transformation( [ 7, 2, 2, 7, 7, 7, 7 ] ), + Transformation( [ 7, 2, 7, 7, 2, 7, 7 ] ), + Transformation( [ 7, 2, 7, 7, 5, 7, 7 ] ), + Transformation( [ 7, 2, 7, 7, 7, 7, 7 ] ), + Transformation( [ 7, 3, 3, 7, 3, 3, 7 ] ), + Transformation( [ 7, 3, 3, 7, 7, 3, 7 ] ), + Transformation( [ 7, 3, 3, 7, 7, 7, 7 ] ), + Transformation( [ 7, 5, 5, 7, 5, 5, 7 ] ), + Transformation( [ 7, 5, 7, 7, 5, 7, 7 ] ), + Transformation( [ 7, 6, 6, 7, 6, 6, 7 ] ), + Transformation( [ 7, 6, 6, 7, 7, 6, 7 ] ), + Transformation( [ 7, 7, 3, 3, 7, 7, 7 ] ), + Transformation( [ 7, 7, 4, 4, 7, 7, 7 ] ), + Transformation( [ 7, 7, 7, 4, 7, 4, 7 ] ), + Transformation( [ 7, 7, 7, 4, 7, 7, 7 ] ), + Transformation( [ 7, 7, 7, 6, 7, 6, 7 ] ), + Transformation( [ 7, 7, 7, 7, 5, 5, 7 ] ), + Transformation( [ 7, 7, 7, 7, 5, 7, 7 ] ), + Transformation( [ 7, 7, 7, 7, 6, 6, 7 ] ), + Transformation( [ 7, 7, 7, 7, 7, 6, 7 ] ), Transformation( [ 7, 7, 7, 7, 7, 7, 7 ] ) ] gap> idem = Set(Idempotents(m)); true @@ -756,62 +756,62 @@ gap> r2 := First(dr, x -> x = r);; gap> DClassOfLClass(r2) = d; true gap> List(semis, s -> Length(GreensHClasses(s))); -[ 3, 5, 3, 77, 13, 1281, 2, 1032, 231, 2, 1355, 57, 28, 48, 57, 12, 139, 508, - 1, 36, 801, 10, 71, 130, 2, 7, 2, 83, 158, 172, 22, 285, 17, 40, 377, 67, - 1285, 2, 2, 212, 153, 14, 9, 22, 239, 65, 91, 55, 2, 367, 15, 168, 26, 207, - 14, 29, 274, 22, 17, 26, 253, 10, 1, 2, 13, 64, 605, 20, 25, 33, 2, 1, - 1520, 307, 9625, 41, 1885, 945, 54, 1297, 58, 18, 1, 173, 1, 25, 737, 2807, +[ 3, 5, 3, 77, 13, 1281, 2, 1032, 231, 2, 1355, 57, 28, 48, 57, 12, 139, 508, + 1, 36, 801, 10, 71, 130, 2, 7, 2, 83, 158, 172, 22, 285, 17, 40, 377, 67, + 1285, 2, 2, 212, 153, 14, 9, 22, 239, 65, 91, 55, 2, 367, 15, 168, 26, 207, + 14, 29, 274, 22, 17, 26, 253, 10, 1, 2, 13, 64, 605, 20, 25, 33, 2, 1, + 1520, 307, 9625, 41, 1885, 945, 54, 1297, 58, 18, 1, 173, 1, 25, 737, 2807, 636, 495, 2, 201, 3, 3, 471, 715, 118, 28, 197, 88 ] gap> ForAll(semis, s -> > Number(GreensHClasses(s), IsGroupHClass) = Length(Idempotents(s))); true gap> List(semis, s -> Number(GreensDClasses(s), IsRegularDClass)); -[ 1, 2, 2, 4, 3, 6, 1, 5, 4, 1, 6, 3, 3, 4, 3, 3, 4, 4, 1, 4, 6, 4, 4, 4, 1, - 2, 1, 3, 5, 5, 3, 5, 3, 3, 5, 4, 6, 1, 1, 4, 4, 3, 3, 4, 4, 4, 4, 3, 1, 4, - 3, 4, 4, 4, 4, 3, 6, 3, 3, 3, 4, 3, 1, 2, 2, 4, 4, 3, 3, 3, 1, 1, 5, 3, 7, +[ 1, 2, 2, 4, 3, 6, 1, 5, 4, 1, 6, 3, 3, 4, 3, 3, 4, 4, 1, 4, 6, 4, 4, 4, 1, + 2, 1, 3, 5, 5, 3, 5, 3, 3, 5, 4, 6, 1, 1, 4, 4, 3, 3, 4, 4, 4, 4, 3, 1, 4, + 3, 4, 4, 4, 4, 3, 6, 3, 3, 3, 4, 3, 1, 2, 2, 4, 4, 3, 3, 3, 1, 1, 5, 3, 7, 3, 5, 5, 5, 5, 2, 3, 1, 4, 1, 4, 5, 6, 5, 5, 1, 3, 1, 1, 6, 4, 3, 3, 4, 3 ] gap> List(semis, s -> Set(GreensDClasses(s), x -> Length(Idempotents(x)))); -[ [ 0, 1 ], [ 1, 4 ], [ 1, 2 ], [ 1, 5, 7, 30 ], [ 1, 4 ], - [ 0, 1, 6, 11, 167, 168 ], [ 0, 1 ], [ 2, 6, 42, 169, 197 ], - [ 0, 2, 5, 18, 58 ], [ 0, 1 ], [ 0, 1, 5, 8, 46, 159 ], [ 0, 1, 5, 19 ], - [ 0, 2, 4, 11 ], [ 0, 1, 2, 4, 14 ], [ 0, 1, 3, 12 ], [ 0, 1, 2, 3 ], - [ 2, 5, 17, 39 ], [ 0, 1, 6, 24, 137 ], [ 1 ], [ 0, 1, 3, 10 ], - [ 0, 1, 4, 6, 7, 221 ], [ 0, 1, 2, 3 ], [ 1, 4, 12, 24 ], [ 0, 1, 7, 34 ], - [ 0, 1 ], [ 0, 1, 3 ], [ 0, 1 ], [ 0, 5, 9, 36 ], [ 0, 1, 5, 17, 50 ], - [ 0, 1, 7, 63 ], [ 0, 1, 4, 8 ], [ 0, 1, 2, 7, 13, 69 ], [ 0, 1, 2, 4 ], - [ 4, 17 ], [ 0, 1, 2, 6, 20, 93 ], [ 1, 4, 10, 24 ], [ 0, 1, 7, 105, 199 ], - [ 0, 1 ], [ 0, 1 ], [ 0, 1, 5, 13, 48 ], [ 1, 5, 20, 51 ], [ 0, 1, 2, 3 ], - [ 0, 1, 3 ], [ 0, 1, 2, 3 ], [ 2, 7, 27, 82 ], [ 1, 4, 9, 24 ], - [ 0, 1, 3, 5, 38 ], [ 4, 6, 24 ], [ 0, 1 ], [ 1, 6, 47, 121 ], - [ 0, 1, 4, 5 ], [ 0, 1, 5, 14, 42 ], [ 0, 1, 3, 8 ], [ 0, 1, 6, 80 ], - [ 1, 3, 6 ], [ 0, 1, 4, 11 ], [ 0, 1, 4, 6, 20, 65 ], [ 0, 1, 4, 10 ], - [ 0, 1, 2 ], [ 2, 4, 10 ], [ 0, 1, 5, 34, 62 ], [ 0, 1, 2 ], [ 1 ], [ 1 ], - [ 0, 3, 4 ], [ 0, 1, 6, 26 ], [ 0, 2, 6, 47, 121 ], [ 2, 3, 10 ], - [ 1, 4, 11 ], [ 3, 4, 15 ], [ 0, 1 ], [ 1 ], [ 0, 1, 3, 7, 122, 248 ], - [ 0, 7, 12, 111 ], [ 0, 1, 7, 9, 258, 430, 889 ], [ 0, 1, 4, 20 ], - [ 0, 1, 6, 12, 231, 324 ], [ 0, 1, 3, 6, 143, 163 ], [ 1, 3, 4, 24 ], +[ [ 0, 1 ], [ 1, 4 ], [ 1, 2 ], [ 1, 5, 7, 30 ], [ 1, 4 ], + [ 0, 1, 6, 11, 167, 168 ], [ 0, 1 ], [ 2, 6, 42, 169, 197 ], + [ 0, 2, 5, 18, 58 ], [ 0, 1 ], [ 0, 1, 5, 8, 46, 159 ], [ 0, 1, 5, 19 ], + [ 0, 2, 4, 11 ], [ 0, 1, 2, 4, 14 ], [ 0, 1, 3, 12 ], [ 0, 1, 2, 3 ], + [ 2, 5, 17, 39 ], [ 0, 1, 6, 24, 137 ], [ 1 ], [ 0, 1, 3, 10 ], + [ 0, 1, 4, 6, 7, 221 ], [ 0, 1, 2, 3 ], [ 1, 4, 12, 24 ], [ 0, 1, 7, 34 ], + [ 0, 1 ], [ 0, 1, 3 ], [ 0, 1 ], [ 0, 5, 9, 36 ], [ 0, 1, 5, 17, 50 ], + [ 0, 1, 7, 63 ], [ 0, 1, 4, 8 ], [ 0, 1, 2, 7, 13, 69 ], [ 0, 1, 2, 4 ], + [ 4, 17 ], [ 0, 1, 2, 6, 20, 93 ], [ 1, 4, 10, 24 ], [ 0, 1, 7, 105, 199 ], + [ 0, 1 ], [ 0, 1 ], [ 0, 1, 5, 13, 48 ], [ 1, 5, 20, 51 ], [ 0, 1, 2, 3 ], + [ 0, 1, 3 ], [ 0, 1, 2, 3 ], [ 2, 7, 27, 82 ], [ 1, 4, 9, 24 ], + [ 0, 1, 3, 5, 38 ], [ 4, 6, 24 ], [ 0, 1 ], [ 1, 6, 47, 121 ], + [ 0, 1, 4, 5 ], [ 0, 1, 5, 14, 42 ], [ 0, 1, 3, 8 ], [ 0, 1, 6, 80 ], + [ 1, 3, 6 ], [ 0, 1, 4, 11 ], [ 0, 1, 4, 6, 20, 65 ], [ 0, 1, 4, 10 ], + [ 0, 1, 2 ], [ 2, 4, 10 ], [ 0, 1, 5, 34, 62 ], [ 0, 1, 2 ], [ 1 ], [ 1 ], + [ 0, 3, 4 ], [ 0, 1, 6, 26 ], [ 0, 2, 6, 47, 121 ], [ 2, 3, 10 ], + [ 1, 4, 11 ], [ 3, 4, 15 ], [ 0, 1 ], [ 1 ], [ 0, 1, 3, 7, 122, 248 ], + [ 0, 7, 12, 111 ], [ 0, 1, 7, 9, 258, 430, 889 ], [ 0, 1, 4, 20 ], + [ 0, 1, 6, 12, 231, 324 ], [ 0, 1, 3, 6, 143, 163 ], [ 1, 3, 4, 24 ], [ 0, 1, 5, 7, 140, 277 ], [ 0, 5, 23 ], [ 0, 1, 4 ], [ 1 ], [ 0, 1, 5, 52 ], - [ 1 ], [ 0, 1, 2 ], [ 0, 1, 7, 11, 177 ], [ 0, 1, 2, 7, 38, 390, 434 ], - [ 0, 5, 9, 40, 114 ], [ 0, 1, 2, 6, 32, 65 ], [ 0, 1 ], [ 0, 6, 16, 74 ], - [ 0, 1 ], [ 0, 1 ], [ 1, 4, 6, 65, 114 ], [ 0, 1, 7, 40, 200 ], + [ 1 ], [ 0, 1, 2 ], [ 0, 1, 7, 11, 177 ], [ 0, 1, 2, 7, 38, 390, 434 ], + [ 0, 5, 9, 40, 114 ], [ 0, 1, 2, 6, 32, 65 ], [ 0, 1 ], [ 0, 6, 16, 74 ], + [ 0, 1 ], [ 0, 1 ], [ 1, 4, 6, 65, 114 ], [ 0, 1, 7, 40, 200 ], [ 0, 5, 8, 44 ], [ 0, 1, 3, 10 ], [ 0, 1, 6, 73 ], [ 0, 1, 4, 33 ] ] gap> List(semis, x -> [Length(GreensDClasses(x))]); -[ [ 3 ], [ 2 ], [ 2 ], [ 4 ], [ 3 ], [ 9 ], [ 2 ], [ 5 ], [ 6 ], [ 2 ], - [ 75 ], [ 10 ], [ 4 ], [ 8 ], [ 12 ], [ 5 ], [ 4 ], [ 16 ], [ 1 ], [ 10 ], - [ 101 ], [ 5 ], [ 4 ], [ 8 ], [ 2 ], [ 3 ], [ 2 ], [ 6 ], [ 7 ], [ 6 ], - [ 4 ], [ 19 ], [ 8 ], [ 3 ], [ 13 ], [ 4 ], [ 36 ], [ 2 ], [ 2 ], [ 14 ], - [ 4 ], [ 7 ], [ 4 ], [ 11 ], [ 4 ], [ 4 ], [ 7 ], [ 3 ], [ 2 ], [ 4 ], - [ 4 ], [ 7 ], [ 6 ], [ 16 ], [ 4 ], [ 7 ], [ 8 ], [ 4 ], [ 13 ], [ 3 ], - [ 7 ], [ 7 ], [ 1 ], [ 2 ], [ 4 ], [ 9 ], [ 10 ], [ 3 ], [ 3 ], [ 3 ], - [ 2 ], [ 1 ], [ 54 ], [ 10 ], [ 32 ], [ 4 ], [ 7 ], [ 15 ], [ 5 ], [ 22 ], - [ 7 ], [ 5 ], [ 1 ], [ 17 ], [ 1 ], [ 14 ], [ 62 ], [ 11 ], [ 26 ], [ 15 ], +[ [ 3 ], [ 2 ], [ 2 ], [ 4 ], [ 3 ], [ 9 ], [ 2 ], [ 5 ], [ 6 ], [ 2 ], + [ 75 ], [ 10 ], [ 4 ], [ 8 ], [ 12 ], [ 5 ], [ 4 ], [ 16 ], [ 1 ], [ 10 ], + [ 101 ], [ 5 ], [ 4 ], [ 8 ], [ 2 ], [ 3 ], [ 2 ], [ 6 ], [ 7 ], [ 6 ], + [ 4 ], [ 19 ], [ 8 ], [ 3 ], [ 13 ], [ 4 ], [ 36 ], [ 2 ], [ 2 ], [ 14 ], + [ 4 ], [ 7 ], [ 4 ], [ 11 ], [ 4 ], [ 4 ], [ 7 ], [ 3 ], [ 2 ], [ 4 ], + [ 4 ], [ 7 ], [ 6 ], [ 16 ], [ 4 ], [ 7 ], [ 8 ], [ 4 ], [ 13 ], [ 3 ], + [ 7 ], [ 7 ], [ 1 ], [ 2 ], [ 4 ], [ 9 ], [ 10 ], [ 3 ], [ 3 ], [ 3 ], + [ 2 ], [ 1 ], [ 54 ], [ 10 ], [ 32 ], [ 4 ], [ 7 ], [ 15 ], [ 5 ], [ 22 ], + [ 7 ], [ 5 ], [ 1 ], [ 17 ], [ 1 ], [ 14 ], [ 62 ], [ 11 ], [ 26 ], [ 15 ], [ 2 ], [ 8 ], [ 3 ], [ 3 ], [ 6 ], [ 19 ], [ 4 ], [ 5 ], [ 6 ], [ 13 ] ] gap> List(semis, s -> Length(Idempotents(s))); -[ 1, 5, 3, 43, 9, 354, 1, 416, 83, 1, 220, 25, 17, 21, 16, 6, 63, 168, 1, 15, - 240, 8, 41, 43, 1, 4, 1, 50, 74, 79, 13, 92, 7, 25, 122, 39, 314, 1, 1, 67, - 77, 6, 7, 7, 118, 38, 47, 34, 1, 175, 10, 62, 13, 93, 11, 16, 97, 15, 4, - 16, 102, 4, 1, 2, 7, 34, 176, 15, 16, 22, 1, 1, 381, 130, 1595, 25, 574, - 316, 33, 430, 28, 9, 1, 63, 1, 5, 197, 872, 173, 106, 1, 96, 1, 1, 191, +[ 1, 5, 3, 43, 9, 354, 1, 416, 83, 1, 220, 25, 17, 21, 16, 6, 63, 168, 1, 15, + 240, 8, 41, 43, 1, 4, 1, 50, 74, 79, 13, 92, 7, 25, 122, 39, 314, 1, 1, 67, + 77, 6, 7, 7, 118, 38, 47, 34, 1, 175, 10, 62, 13, 93, 11, 16, 97, 15, 4, + 16, 102, 4, 1, 2, 7, 34, 176, 15, 16, 22, 1, 1, 381, 130, 1595, 25, 574, + 316, 33, 430, 28, 9, 1, 63, 1, 5, 197, 872, 173, 106, 1, 96, 1, 1, 191, 248, 57, 14, 86, 38 ] gap> a := Transformation([2, 1, 4, 5, 6, 3]);; gap> b := Transformation([2, 3, 1, 5, 4, 1]);; @@ -852,7 +852,7 @@ gap> gens := [Transformation([1, 2, 1, 2, 1]), > Transformation([3, 4, 2, 1, 4])];; gap> S := Semigroup(gens);; gap> RClassReps(S); -[ Transformation( [ 1, 2, 1, 2, 1 ] ), Transformation( [ 3, 4, 2, 1, 4 ] ), +[ Transformation( [ 1, 2, 1, 2, 1 ] ), Transformation( [ 3, 4, 2, 1, 4 ] ), Transformation( [ 1, 2, 2, 1, 2 ] ), Transformation( [ 2, 1, 2, 1, 1 ] ) ] gap> a := Transformation([2, 1, 4, 5, 6, 3]);; gap> b := Transformation([2, 3, 1, 5, 4, 1]);; @@ -872,9 +872,9 @@ true gap> LambdaOrb(r); gap> AsList(last); -[ [ 0 ], [ 1, 2, 3, 5 ], [ 1, 2, 3, 4, 5 ], [ 2, 3, 4, 5 ], [ 1, 2, 5 ], - [ 1, 3, 5 ], [ 3, 4, 5 ], [ 1, 2, 3 ], [ 2, 4, 5 ], [ 2, 3, 5 ], - [ 2, 3, 4 ], [ 1, 5 ], [ 2, 5 ], [ 1, 3 ], [ 4, 5 ], [ 3, 5 ], [ 2, 3 ], +[ [ 0 ], [ 1, 2, 3, 5 ], [ 1, 2, 3, 4, 5 ], [ 2, 3, 4, 5 ], [ 1, 2, 5 ], + [ 1, 3, 5 ], [ 3, 4, 5 ], [ 1, 2, 3 ], [ 2, 4, 5 ], [ 2, 3, 5 ], + [ 2, 3, 4 ], [ 1, 5 ], [ 2, 5 ], [ 1, 3 ], [ 4, 5 ], [ 3, 5 ], [ 2, 3 ], [ 2, 4 ], [ 1, 2 ], [ 5 ], [ 3, 4 ], [ 1 ], [ 3 ], [ 4 ], [ 2 ] ] gap> LambdaOrbMults(LambdaOrb(r), LambdaOrbSCCIndex(r))[LambdaOrbSCCIndex(r)]; [ IdentityTransformation, IdentityTransformation ] @@ -898,27 +898,27 @@ Group([ (4,5) ]) gap> S := Semigroup([Transformation([6, 4, 4, 4, 6, 1]), > Transformation([6, 5, 1, 6, 2, 2])]);; gap> AsSet(Enumerate(LambdaOrb(S))); -[ [ 0 ], [ 1 ], [ 1, 2, 5, 6 ], [ 1, 4 ], [ 1, 4, 6 ], [ 2 ], [ 2, 5 ], +[ [ 0 ], [ 1 ], [ 1, 2, 5, 6 ], [ 1, 4 ], [ 1, 4, 6 ], [ 2 ], [ 2, 5 ], [ 2, 5, 6 ], [ 2, 6 ], [ 4 ], [ 4, 6 ], [ 5 ], [ 6 ] ] gap> S := Semigroup([Transformation([2, 3, 4, 1]), > Transformation([3, 3, 1, 1])]);; gap> Idempotents(S, 1); [ ] gap> Idempotents(S, 2); -[ Transformation( [ 1, 1, 3, 3 ] ), Transformation( [ 1, 3, 3, 1 ] ), +[ Transformation( [ 1, 1, 3, 3 ] ), Transformation( [ 1, 3, 3, 1 ] ), Transformation( [ 2, 2, 4, 4 ] ), Transformation( [ 4, 2, 2, 4 ] ) ] gap> Idempotents(S, 3); [ ] gap> Idempotents(S, 4); [ IdentityTransformation ] gap> Idempotents(S); -[ IdentityTransformation, Transformation( [ 1, 1, 3, 3 ] ), - Transformation( [ 1, 3, 3, 1 ] ), Transformation( [ 2, 2, 4, 4 ] ), +[ IdentityTransformation, Transformation( [ 1, 1, 3, 3 ] ), + Transformation( [ 1, 3, 3, 1 ] ), Transformation( [ 2, 2, 4, 4 ] ), Transformation( [ 4, 2, 2, 4 ] ) ] gap> S := Semigroup([Transformation([2, 4, 1, 2]), > Transformation([3, 3, 4, 1])]);; gap> AsSet(Enumerate(RhoOrb(S))); -[ [ 0 ], [ 1, 1, 1, 1 ], [ 1, 1, 1, 2 ], [ 1, 1, 2, 1 ], [ 1, 1, 2, 2 ], +[ [ 0 ], [ 1, 1, 1, 1 ], [ 1, 1, 1, 2 ], [ 1, 1, 2, 1 ], [ 1, 1, 2, 2 ], [ 1, 1, 2, 3 ], [ 1, 2, 1, 1 ], [ 1, 2, 2, 1 ], [ 1, 2, 3, 1 ] ] # MonoidPkgTest7: from install_no_grape.tst @@ -938,8 +938,8 @@ true gap> LambdaOrb(r); gap> AsSet(LambdaOrb(r)); -[ [ 0 ], [ 1 ], [ 1, 2, 4, 6 ], [ 1, 4 ], [ 1, 4, 6 ], [ 1, 6 ], [ 2 ], - [ 2, 3 ], [ 2, 3, 4, 6 ], [ 2, 3, 4, 6, 7 ], [ 2, 3, 6 ], [ 2, 4 ], +[ [ 0 ], [ 1 ], [ 1, 2, 4, 6 ], [ 1, 4 ], [ 1, 4, 6 ], [ 1, 6 ], [ 2 ], + [ 2, 3 ], [ 2, 3, 4, 6 ], [ 2, 3, 4, 6, 7 ], [ 2, 3, 6 ], [ 2, 4 ], [ 2, 4, 6 ], [ 2, 6 ], [ 3 ], [ 3, 6 ], [ 4 ], [ 4, 6 ], [ 6 ] ] gap> SchutzenbergerGroup(r); Group([ (2,3) ]) @@ -1005,40 +1005,40 @@ gap> m23 := Monoid(g1, g2, g3);; gap> SmallMonoids := [m1, m2, m3, m4, m5, m6, m7, m8, m9, m11, m14, m15, m18, > m22, m23];; gap> List(SmallMonoids, IsCompletelyRegularSemigroup); -[ false, true, false, false, true, true, true, true, true, false, false, +[ false, true, false, false, true, true, true, true, true, false, false, false, false, true, false ] gap> List(SmallMonoids, IsRegularSemigroup); -[ false, true, false, false, true, true, true, true, true, false, false, +[ false, true, false, false, true, true, true, true, true, false, false, true, true, true, false ] gap> List(SmallMonoids, IsSimpleSemigroup); -[ false, false, false, false, false, true, false, false, false, false, false, +[ false, false, false, false, false, true, false, false, false, false, false, false, false, false, false ] gap> List(SmallMonoids, IsCompletelySimpleSemigroup); -[ false, false, false, false, false, true, false, false, false, false, false, +[ false, false, false, false, false, true, false, false, false, false, false, false, false, false, false ] gap> List(SmallMonoids, IsInverseSemigroup); -[ false, true, false, false, false, false, false, false, false, false, false, +[ false, true, false, false, false, false, false, false, false, false, false, false, false, false, false ] gap> List(SmallMonoids, IsCliffordSemigroup); -[ false, true, false, false, false, false, false, false, false, false, false, +[ false, true, false, false, false, false, false, false, false, false, false, false, false, false, false ] gap> List(SmallMonoids, IsGroupAsSemigroup); -[ false, false, false, false, false, false, false, false, false, false, +[ false, false, false, false, false, false, false, false, false, false, false, false, false, false, false ] gap> List(SmallMonoids, IsZeroSemigroup); -[ false, false, false, false, false, false, false, false, false, false, +[ false, false, false, false, false, false, false, false, false, false, false, false, false, false, false ] gap> List(SmallMonoids, IsLeftZeroSemigroup); -[ false, false, false, false, false, false, false, false, false, false, +[ false, false, false, false, false, false, false, false, false, false, false, false, false, false, false ] gap> List(SmallMonoids, IsRightZeroSemigroup); -[ false, false, false, false, false, false, false, false, false, false, +[ false, false, false, false, false, false, false, false, false, false, false, false, false, false, false ] gap> List(SmallMonoids, IsCommutativeSemigroup); -[ false, false, false, false, false, false, false, false, false, false, +[ false, false, false, false, false, false, false, false, false, false, false, false, false, false, false ] gap> List(SmallMonoids, IsZeroGroup); -[ false, false, false, false, false, false, false, false, false, false, +[ false, false, false, false, false, false, false, false, false, false, false, false, false, false, false ] # MonoidPkgTest10 @@ -1058,82 +1058,82 @@ gap> o := Orb(s, [1, 2, 3, 4], OnSets); gap> Enumerate(o); gap> List(OrbSCC(o), x -> o{x}); -[ [ [ 1, 2, 3, 4 ], [ 1, 2, 4, 5 ], [ 2, 3, 4, 8 ], [ 1, 2, 8, 9 ], - [ 2, 3, 5, 6 ], [ 1, 4, 6, 8 ], [ 1, 4, 6, 10 ], [ 4, 6, 8, 9 ], - [ 3, 4, 5, 8 ], [ 1, 3, 4, 5 ], [ 2, 4, 6, 9 ], [ 2, 4, 6, 8 ], - [ 1, 5, 8, 9 ], [ 2, 3, 6, 8 ], [ 1, 2, 5, 9 ], [ 1, 2, 6, 9 ], - [ 2, 3, 4, 5 ], [ 1, 6, 8, 10 ], [ 3, 4, 6, 7 ], [ 3, 7, 8, 9 ], - [ 4, 6, 9, 10 ], [ 4, 5, 7, 8 ], [ 1, 6, 9, 10 ], [ 1, 6, 8, 9 ], - [ 3, 6, 9, 10 ], [ 2, 6, 7, 9 ], [ 2, 4, 5, 8 ], [ 3, 5, 6, 10 ], - [ 1, 2, 3, 10 ], [ 4, 6, 7, 10 ], [ 2, 4, 6, 7 ], [ 4, 8, 9, 10 ], - [ 2, 3, 6, 9 ], [ 1, 2, 4, 8 ], [ 2, 4, 6, 10 ], [ 2, 4, 7, 8 ], - [ 1, 8, 9, 10 ], [ 1, 4, 6, 9 ], [ 3, 5, 9, 10 ], [ 1, 3, 4, 10 ], - [ 2, 5, 8, 9 ], [ 2, 4, 5, 6 ], [ 1, 2, 6, 10 ], [ 2, 4, 7, 10 ], - [ 1, 4, 5, 7 ], [ 2, 4, 5, 7 ], [ 6, 8, 9, 10 ], [ 1, 3, 4, 8 ], - [ 1, 5, 6, 9 ], [ 1, 2, 4, 9 ], [ 1, 2, 4, 6 ], [ 3, 4, 6, 8 ], - [ 1, 3, 5, 6 ], [ 1, 3, 9, 10 ], [ 3, 5, 7, 8 ], [ 1, 3, 4, 7 ], - [ 3, 7, 8, 10 ], [ 2, 6, 8, 9 ], [ 4, 7, 8, 9 ], [ 4, 5, 6, 10 ], - [ 1, 2, 6, 7 ], [ 7, 8, 9, 10 ], [ 1, 3, 7, 8 ], [ 2, 5, 6, 10 ], - [ 3, 4, 6, 9 ], [ 1, 4, 9, 10 ], [ 2, 3, 8, 9 ], [ 3, 4, 7, 8 ], - [ 1, 3, 5, 7 ], [ 2, 5, 6, 9 ], [ 2, 3, 4, 6 ], [ 1, 4, 8, 10 ], - [ 3, 6, 8, 9 ], [ 3, 4, 8, 9 ], [ 1, 5, 6, 10 ], [ 2, 3, 9, 10 ], - [ 1, 4, 8, 9 ], [ 4, 7, 8, 10 ], [ 4, 5, 8, 10 ], [ 1, 7, 8, 10 ], - [ 3, 6, 7, 8 ], [ 2, 5, 9, 10 ], [ 1, 4, 7, 10 ], [ 2, 4, 5, 9 ], - [ 4, 5, 6, 8 ], [ 1, 7, 8, 9 ], [ 3, 5, 6, 8 ], [ 1, 3, 6, 10 ], - [ 1, 2, 6, 8 ], [ 2, 6, 9, 10 ], [ 2, 7, 9, 10 ], [ 4, 7, 9, 10 ], - [ 2, 4, 5, 10 ], [ 2, 3, 5, 10 ], [ 1, 3, 7, 10 ], [ 2, 5, 6, 8 ], - [ 1, 6, 7, 10 ], [ 2, 3, 4, 9 ], [ 1, 3, 5, 10 ], [ 1, 2, 9, 10 ], - [ 2, 3, 5, 7 ], [ 1, 4, 6, 7 ], [ 4, 5, 6, 9 ], [ 1, 4, 7, 9 ], - [ 1, 4, 5, 6 ], [ 1, 7, 9, 10 ], [ 2, 4, 9, 10 ], [ 6, 7, 9, 10 ], - [ 1, 4, 7, 8 ], [ 2, 3, 4, 10 ], [ 1, 2, 5, 8 ], [ 1, 2, 3, 5 ], - [ 2, 4, 8, 9 ], [ 1, 2, 4, 10 ], [ 2, 3, 5, 9 ], [ 4, 6, 8, 10 ], - [ 2, 6, 7, 10 ], [ 4, 6, 7, 8 ], [ 3, 4, 5, 6 ], [ 1, 3, 7, 9 ], - [ 1, 2, 7, 8 ], [ 2, 3, 4, 7 ], [ 1, 2, 5, 6 ], [ 3, 4, 8, 10 ], - [ 2, 4, 8, 10 ], [ 2, 6, 7, 8 ], [ 3, 4, 5, 7 ], [ 1, 4, 5, 10 ], - [ 4, 5, 9, 10 ], [ 1, 6, 7, 9 ], [ 3, 4, 9, 10 ], [ 1, 2, 5, 10 ], - [ 3, 4, 7, 10 ], [ 1, 4, 5, 8 ], [ 5, 6, 9, 10 ], [ 1, 2, 7, 9 ], - [ 2, 3, 5, 8 ], [ 2, 3, 7, 8 ], [ 1, 3, 4, 6 ], [ 1, 3, 5, 9 ], - [ 3, 7, 9, 10 ], [ 4, 6, 7, 9 ], [ 3, 4, 5, 10 ], [ 1, 4, 5, 9 ], - [ 2, 4, 7, 9 ], [ 2, 5, 7, 8 ], [ 3, 4, 6, 10 ], [ 1, 5, 6, 8 ], - [ 3, 4, 5, 9 ], [ 1, 2, 4, 7 ], [ 5, 6, 8, 9 ], [ 1, 5, 7, 8 ], - [ 1, 2, 3, 9 ], [ 1, 3, 8, 9 ], [ 1, 2, 3, 8 ], [ 1, 3, 6, 9 ], - [ 1, 2, 5, 7 ], [ 1, 2, 3, 7 ], [ 1, 3, 4, 9 ], [ 1, 5, 9, 10 ], - [ 5, 6, 8, 10 ], [ 2, 3, 6, 10 ], [ 1, 2, 7, 10 ], [ 1, 3, 5, 8 ], - [ 1, 3, 8, 10 ], [ 2, 6, 8, 10 ], [ 2, 8, 9, 10 ], [ 2, 5, 6, 7 ], - [ 1, 2, 8, 10 ], [ 2, 3, 6, 7 ], [ 3, 4, 7, 9 ], [ 5, 6, 7, 8 ], - [ 1, 5, 8, 10 ], [ 2, 5, 8, 10 ], [ 4, 5, 6, 7 ], [ 3, 5, 6, 7 ], - [ 3, 5, 6, 9 ], [ 4, 5, 8, 9 ] ], - [ [ 2, 4, 5 ], [ 6, 8, 10 ], [ 1, 3, 4 ], [ 2, 3, 8 ], [ 1, 4, 6 ], - [ 4, 6, 10 ], [ 2, 6, 8 ], [ 2, 4, 6 ], [ 2, 4, 8 ], [ 1, 8, 9 ], - [ 4, 8, 10 ], [ 5, 8, 9 ], [ 3, 4, 8 ], [ 3, 7, 8 ], [ 1, 6, 9 ], - [ 2, 4, 9 ], [ 8, 9, 10 ], [ 7, 9, 10 ], [ 1, 5, 8 ], [ 3, 6, 8 ], - [ 1, 3, 6 ], [ 2, 5, 9 ], [ 1, 2, 9 ], [ 2, 3, 5 ], [ 1, 6, 10 ], - [ 4, 8, 9 ], [ 4, 7, 8 ], [ 1, 9, 10 ], [ 4, 6, 9 ], [ 4, 9, 10 ], - [ 1, 4, 8 ], [ 7, 8, 10 ], [ 1, 4, 9 ], [ 2, 5, 8 ], [ 2, 9, 10 ], - [ 2, 6, 9 ], [ 4, 7, 9 ], [ 1, 4, 5 ], [ 1, 7, 10 ], [ 1, 2, 7 ], - [ 3, 4, 9 ], [ 1, 2, 6 ], [ 4, 6, 8 ], [ 2, 6, 10 ], [ 2, 8, 9 ], - [ 1, 2, 10 ], [ 1, 2, 4 ], [ 3, 5, 9 ], [ 4, 5, 8 ], [ 5, 6, 10 ], - [ 2, 3, 10 ], [ 3, 7, 10 ], [ 4, 6, 7 ], [ 7, 8, 9 ], [ 5, 6, 8 ], - [ 3, 4, 6 ], [ 1, 6, 8 ], [ 2, 4, 10 ], [ 6, 7, 10 ], [ 2, 4, 7 ], - [ 3, 4, 5 ], [ 1, 3, 7 ], [ 3, 8, 10 ], [ 6, 7, 8 ], [ 6, 8, 9 ], - [ 4, 5, 6 ], [ 3, 5, 10 ], [ 2, 3, 9 ], [ 6, 9, 10 ], [ 4, 5, 7 ], - [ 4, 5, 10 ], [ 2, 5, 10 ], [ 3, 6, 9 ], [ 1, 3, 10 ], [ 1, 2, 8 ], - [ 2, 3, 6 ], [ 1, 2, 5 ], [ 3, 9, 10 ], [ 5, 7, 8 ], [ 5, 9, 10 ], - [ 1, 5, 9 ], [ 1, 4, 10 ], [ 3, 8, 9 ], [ 1, 3, 8 ], [ 1, 2, 3 ], - [ 1, 3, 9 ], [ 3, 5, 8 ], [ 3, 4, 10 ], [ 1, 7, 9 ], [ 1, 5, 6 ], - [ 2, 7, 8 ], [ 3, 4, 7 ], [ 1, 5, 7 ], [ 1, 8, 10 ], [ 4, 7, 10 ], - [ 3, 6, 7 ], [ 1, 4, 7 ], [ 2, 5, 7 ], [ 1, 7, 8 ], [ 2, 3, 7 ], - [ 4, 5, 9 ], [ 5, 6, 9 ], [ 2, 3, 4 ], [ 1, 3, 5 ], [ 6, 7, 9 ], - [ 3, 7, 9 ], [ 1, 6, 7 ], [ 2, 7, 9 ], [ 3, 6, 10 ], [ 2, 6, 7 ], - [ 2, 8, 10 ], [ 2, 5, 6 ], [ 1, 5, 10 ], [ 2, 7, 10 ], [ 3, 5, 6 ], - [ 5, 8, 10 ], [ 3, 5, 7 ], [ 5, 6, 7 ] ], - [ [ 4, 6 ], [ 2, 6 ], [ 2, 10 ], [ 4, 8 ], [ 6, 10 ], [ 4, 9 ], [ 5, 8 ], - [ 1, 8 ], [ 4, 10 ], [ 7, 8 ], [ 6, 8 ], [ 5, 9 ], [ 4, 5 ], [ 1, 7 ], - [ 8, 10 ], [ 1, 4 ], [ 8, 9 ], [ 1, 9 ], [ 3, 5 ], [ 1, 6 ], [ 3, 4 ], - [ 2, 8 ], [ 3, 6 ], [ 2, 4 ], [ 2, 9 ], [ 4, 7 ], [ 3, 8 ], [ 1, 3 ], - [ 1, 2 ], [ 2, 3 ], [ 3, 7 ], [ 2, 5 ], [ 1, 10 ], [ 3, 10 ], [ 6, 7 ], - [ 7, 10 ], [ 3, 9 ], [ 6, 9 ], [ 9, 10 ], [ 7, 9 ], [ 1, 5 ], [ 5, 7 ], - [ 5, 6 ], [ 2, 7 ], [ 5, 10 ] ], +[ [ [ 1, 2, 3, 4 ], [ 1, 2, 4, 5 ], [ 2, 3, 4, 8 ], [ 1, 2, 8, 9 ], + [ 2, 3, 5, 6 ], [ 1, 4, 6, 8 ], [ 1, 4, 6, 10 ], [ 4, 6, 8, 9 ], + [ 3, 4, 5, 8 ], [ 1, 3, 4, 5 ], [ 2, 4, 6, 9 ], [ 2, 4, 6, 8 ], + [ 1, 5, 8, 9 ], [ 2, 3, 6, 8 ], [ 1, 2, 5, 9 ], [ 1, 2, 6, 9 ], + [ 2, 3, 4, 5 ], [ 1, 6, 8, 10 ], [ 3, 4, 6, 7 ], [ 3, 7, 8, 9 ], + [ 4, 6, 9, 10 ], [ 4, 5, 7, 8 ], [ 1, 6, 9, 10 ], [ 1, 6, 8, 9 ], + [ 3, 6, 9, 10 ], [ 2, 6, 7, 9 ], [ 2, 4, 5, 8 ], [ 3, 5, 6, 10 ], + [ 1, 2, 3, 10 ], [ 4, 6, 7, 10 ], [ 2, 4, 6, 7 ], [ 4, 8, 9, 10 ], + [ 2, 3, 6, 9 ], [ 1, 2, 4, 8 ], [ 2, 4, 6, 10 ], [ 2, 4, 7, 8 ], + [ 1, 8, 9, 10 ], [ 1, 4, 6, 9 ], [ 3, 5, 9, 10 ], [ 1, 3, 4, 10 ], + [ 2, 5, 8, 9 ], [ 2, 4, 5, 6 ], [ 1, 2, 6, 10 ], [ 2, 4, 7, 10 ], + [ 1, 4, 5, 7 ], [ 2, 4, 5, 7 ], [ 6, 8, 9, 10 ], [ 1, 3, 4, 8 ], + [ 1, 5, 6, 9 ], [ 1, 2, 4, 9 ], [ 1, 2, 4, 6 ], [ 3, 4, 6, 8 ], + [ 1, 3, 5, 6 ], [ 1, 3, 9, 10 ], [ 3, 5, 7, 8 ], [ 1, 3, 4, 7 ], + [ 3, 7, 8, 10 ], [ 2, 6, 8, 9 ], [ 4, 7, 8, 9 ], [ 4, 5, 6, 10 ], + [ 1, 2, 6, 7 ], [ 7, 8, 9, 10 ], [ 1, 3, 7, 8 ], [ 2, 5, 6, 10 ], + [ 3, 4, 6, 9 ], [ 1, 4, 9, 10 ], [ 2, 3, 8, 9 ], [ 3, 4, 7, 8 ], + [ 1, 3, 5, 7 ], [ 2, 5, 6, 9 ], [ 2, 3, 4, 6 ], [ 1, 4, 8, 10 ], + [ 3, 6, 8, 9 ], [ 3, 4, 8, 9 ], [ 1, 5, 6, 10 ], [ 2, 3, 9, 10 ], + [ 1, 4, 8, 9 ], [ 4, 7, 8, 10 ], [ 4, 5, 8, 10 ], [ 1, 7, 8, 10 ], + [ 3, 6, 7, 8 ], [ 2, 5, 9, 10 ], [ 1, 4, 7, 10 ], [ 2, 4, 5, 9 ], + [ 4, 5, 6, 8 ], [ 1, 7, 8, 9 ], [ 3, 5, 6, 8 ], [ 1, 3, 6, 10 ], + [ 1, 2, 6, 8 ], [ 2, 6, 9, 10 ], [ 2, 7, 9, 10 ], [ 4, 7, 9, 10 ], + [ 2, 4, 5, 10 ], [ 2, 3, 5, 10 ], [ 1, 3, 7, 10 ], [ 2, 5, 6, 8 ], + [ 1, 6, 7, 10 ], [ 2, 3, 4, 9 ], [ 1, 3, 5, 10 ], [ 1, 2, 9, 10 ], + [ 2, 3, 5, 7 ], [ 1, 4, 6, 7 ], [ 4, 5, 6, 9 ], [ 1, 4, 7, 9 ], + [ 1, 4, 5, 6 ], [ 1, 7, 9, 10 ], [ 2, 4, 9, 10 ], [ 6, 7, 9, 10 ], + [ 1, 4, 7, 8 ], [ 2, 3, 4, 10 ], [ 1, 2, 5, 8 ], [ 1, 2, 3, 5 ], + [ 2, 4, 8, 9 ], [ 1, 2, 4, 10 ], [ 2, 3, 5, 9 ], [ 4, 6, 8, 10 ], + [ 2, 6, 7, 10 ], [ 4, 6, 7, 8 ], [ 3, 4, 5, 6 ], [ 1, 3, 7, 9 ], + [ 1, 2, 7, 8 ], [ 2, 3, 4, 7 ], [ 1, 2, 5, 6 ], [ 3, 4, 8, 10 ], + [ 2, 4, 8, 10 ], [ 2, 6, 7, 8 ], [ 3, 4, 5, 7 ], [ 1, 4, 5, 10 ], + [ 4, 5, 9, 10 ], [ 1, 6, 7, 9 ], [ 3, 4, 9, 10 ], [ 1, 2, 5, 10 ], + [ 3, 4, 7, 10 ], [ 1, 4, 5, 8 ], [ 5, 6, 9, 10 ], [ 1, 2, 7, 9 ], + [ 2, 3, 5, 8 ], [ 2, 3, 7, 8 ], [ 1, 3, 4, 6 ], [ 1, 3, 5, 9 ], + [ 3, 7, 9, 10 ], [ 4, 6, 7, 9 ], [ 3, 4, 5, 10 ], [ 1, 4, 5, 9 ], + [ 2, 4, 7, 9 ], [ 2, 5, 7, 8 ], [ 3, 4, 6, 10 ], [ 1, 5, 6, 8 ], + [ 3, 4, 5, 9 ], [ 1, 2, 4, 7 ], [ 5, 6, 8, 9 ], [ 1, 5, 7, 8 ], + [ 1, 2, 3, 9 ], [ 1, 3, 8, 9 ], [ 1, 2, 3, 8 ], [ 1, 3, 6, 9 ], + [ 1, 2, 5, 7 ], [ 1, 2, 3, 7 ], [ 1, 3, 4, 9 ], [ 1, 5, 9, 10 ], + [ 5, 6, 8, 10 ], [ 2, 3, 6, 10 ], [ 1, 2, 7, 10 ], [ 1, 3, 5, 8 ], + [ 1, 3, 8, 10 ], [ 2, 6, 8, 10 ], [ 2, 8, 9, 10 ], [ 2, 5, 6, 7 ], + [ 1, 2, 8, 10 ], [ 2, 3, 6, 7 ], [ 3, 4, 7, 9 ], [ 5, 6, 7, 8 ], + [ 1, 5, 8, 10 ], [ 2, 5, 8, 10 ], [ 4, 5, 6, 7 ], [ 3, 5, 6, 7 ], + [ 3, 5, 6, 9 ], [ 4, 5, 8, 9 ] ], + [ [ 2, 4, 5 ], [ 6, 8, 10 ], [ 1, 3, 4 ], [ 2, 3, 8 ], [ 1, 4, 6 ], + [ 4, 6, 10 ], [ 2, 6, 8 ], [ 2, 4, 6 ], [ 2, 4, 8 ], [ 1, 8, 9 ], + [ 4, 8, 10 ], [ 5, 8, 9 ], [ 3, 4, 8 ], [ 3, 7, 8 ], [ 1, 6, 9 ], + [ 2, 4, 9 ], [ 8, 9, 10 ], [ 7, 9, 10 ], [ 1, 5, 8 ], [ 3, 6, 8 ], + [ 1, 3, 6 ], [ 2, 5, 9 ], [ 1, 2, 9 ], [ 2, 3, 5 ], [ 1, 6, 10 ], + [ 4, 8, 9 ], [ 4, 7, 8 ], [ 1, 9, 10 ], [ 4, 6, 9 ], [ 4, 9, 10 ], + [ 1, 4, 8 ], [ 7, 8, 10 ], [ 1, 4, 9 ], [ 2, 5, 8 ], [ 2, 9, 10 ], + [ 2, 6, 9 ], [ 4, 7, 9 ], [ 1, 4, 5 ], [ 1, 7, 10 ], [ 1, 2, 7 ], + [ 3, 4, 9 ], [ 1, 2, 6 ], [ 4, 6, 8 ], [ 2, 6, 10 ], [ 2, 8, 9 ], + [ 1, 2, 10 ], [ 1, 2, 4 ], [ 3, 5, 9 ], [ 4, 5, 8 ], [ 5, 6, 10 ], + [ 2, 3, 10 ], [ 3, 7, 10 ], [ 4, 6, 7 ], [ 7, 8, 9 ], [ 5, 6, 8 ], + [ 3, 4, 6 ], [ 1, 6, 8 ], [ 2, 4, 10 ], [ 6, 7, 10 ], [ 2, 4, 7 ], + [ 3, 4, 5 ], [ 1, 3, 7 ], [ 3, 8, 10 ], [ 6, 7, 8 ], [ 6, 8, 9 ], + [ 4, 5, 6 ], [ 3, 5, 10 ], [ 2, 3, 9 ], [ 6, 9, 10 ], [ 4, 5, 7 ], + [ 4, 5, 10 ], [ 2, 5, 10 ], [ 3, 6, 9 ], [ 1, 3, 10 ], [ 1, 2, 8 ], + [ 2, 3, 6 ], [ 1, 2, 5 ], [ 3, 9, 10 ], [ 5, 7, 8 ], [ 5, 9, 10 ], + [ 1, 5, 9 ], [ 1, 4, 10 ], [ 3, 8, 9 ], [ 1, 3, 8 ], [ 1, 2, 3 ], + [ 1, 3, 9 ], [ 3, 5, 8 ], [ 3, 4, 10 ], [ 1, 7, 9 ], [ 1, 5, 6 ], + [ 2, 7, 8 ], [ 3, 4, 7 ], [ 1, 5, 7 ], [ 1, 8, 10 ], [ 4, 7, 10 ], + [ 3, 6, 7 ], [ 1, 4, 7 ], [ 2, 5, 7 ], [ 1, 7, 8 ], [ 2, 3, 7 ], + [ 4, 5, 9 ], [ 5, 6, 9 ], [ 2, 3, 4 ], [ 1, 3, 5 ], [ 6, 7, 9 ], + [ 3, 7, 9 ], [ 1, 6, 7 ], [ 2, 7, 9 ], [ 3, 6, 10 ], [ 2, 6, 7 ], + [ 2, 8, 10 ], [ 2, 5, 6 ], [ 1, 5, 10 ], [ 2, 7, 10 ], [ 3, 5, 6 ], + [ 5, 8, 10 ], [ 3, 5, 7 ], [ 5, 6, 7 ] ], + [ [ 4, 6 ], [ 2, 6 ], [ 2, 10 ], [ 4, 8 ], [ 6, 10 ], [ 4, 9 ], [ 5, 8 ], + [ 1, 8 ], [ 4, 10 ], [ 7, 8 ], [ 6, 8 ], [ 5, 9 ], [ 4, 5 ], [ 1, 7 ], + [ 8, 10 ], [ 1, 4 ], [ 8, 9 ], [ 1, 9 ], [ 3, 5 ], [ 1, 6 ], [ 3, 4 ], + [ 2, 8 ], [ 3, 6 ], [ 2, 4 ], [ 2, 9 ], [ 4, 7 ], [ 3, 8 ], [ 1, 3 ], + [ 1, 2 ], [ 2, 3 ], [ 3, 7 ], [ 2, 5 ], [ 1, 10 ], [ 3, 10 ], [ 6, 7 ], + [ 7, 10 ], [ 3, 9 ], [ 6, 9 ], [ 9, 10 ], [ 7, 9 ], [ 1, 5 ], [ 5, 7 ], + [ 5, 6 ], [ 2, 7 ], [ 5, 10 ] ], [ [ 9 ], [ 4 ], [ 5 ], [ 6 ], [ 3 ], [ 8 ], [ 10 ], [ 1 ], [ 2 ], [ 7 ] ] ] gap> g1 := Transformation([1, 4, 11, 11, 7, 2, 6, 2, 5, 5, 10]);; gap> g2 := Transformation([2, 4, 4, 2, 10, 5, 11, 11, 11, 6, 7]);; @@ -1216,7 +1216,7 @@ gap> m23 := Monoid(g1, g2, g3);; gap> SmallMonoids := > [m1, m2, m3, m4, m5, m6, m7, m8, m9, m11, m14, m15, m18, m22, m23];; gap> List(SmallMonoids, IsCompletelyRegularSemigroup); -[ false, true, false, false, true, true, true, true, true, false, false, +[ false, true, false, false, true, true, true, true, true, false, false, false, false, true, false ] gap> List(BigMonoids, IsCompletelyRegularSemigroup); [ true, false, false, false, false, false, true, false ] @@ -1272,7 +1272,7 @@ true gap> IsGroupAsSemigroup(m14); false gap> List(SmallMonoids, IsCliffordSemigroup); -[ false, true, false, false, false, false, false, false, false, false, false, +[ false, true, false, false, false, false, false, false, false, false, false, false, false, false, false ] gap> List(BigMonoids, IsCliffordSemigroup); [ false, false, false, false, false, false, false, false ] @@ -1328,7 +1328,7 @@ gap> ForAll(GreensDClasses(c4), x -> Length(GreensHClasses(x)) = 1 and > IsRegularDClass(x)); true gap> List(SmallMonoids, IsRegularSemigroup); -[ false, true, false, false, true, true, true, true, true, false, false, +[ false, true, false, false, true, true, true, true, true, false, false, true, true, true, false ] gap> List(BigMonoids, IsRegularSemigroup); [ true, false, false, false, false, true, true, false ] @@ -1339,7 +1339,7 @@ true gap> IsBand(c4); false gap> List(SmallMonoids, IsBand); -[ false, false, false, false, false, false, false, false, false, false, +[ false, false, false, false, false, false, false, false, false, false, false, false, false, false, false ] gap> List(BigMonoids, IsBand); [ false, false, false, false, false, false, false, false ] @@ -1360,7 +1360,7 @@ gap> 4 ^ 4 - Factorial(4) + 1; gap> ForAll(SmallMonoids, x -> not IsSemiband(x)); true gap> List(SmallMonoids, IsOrthodoxSemigroup); -[ false, true, false, false, false, false, true, true, true, false, false, +[ false, true, false, false, false, false, true, true, true, false, false, false, false, true, false ] gap> s := SmallMonoids[1]; diff --git a/tst/extreme/semieunit.tst b/tst/extreme/semieunit.tst index 69e186266..c5b96baaa 100644 --- a/tst/extreme/semieunit.tst +++ b/tst/extreme/semieunit.tst @@ -39,7 +39,7 @@ gap> BruteForceIsoCheck := function(iso) > od; > return true; > end;; -gap> Apply(triples, a -> BruteForceIsoCheck(a));; +gap> Apply(triples, BruteForceIsoCheck);; gap> false in triples; false diff --git a/tst/standard/attributes/translat.tst b/tst/standard/attributes/translat.tst index f5fa7d26f..d828f9a81 100644 --- a/tst/standard/attributes/translat.tst +++ b/tst/standard/attributes/translat.tst @@ -82,7 +82,7 @@ gap> GeneratorsOfSemigroup(L); of size 8, degree 9 with 1 generator>>, > ] -gap> R := RightTranslations(S);; +gap> R := RightTranslations(S);; gap> GeneratorsOfSemigroup(R); [ >, @@ -160,7 +160,7 @@ gap> GeneratorsOfSemigroup(R); > ] # Further test translations generation -gap> S := Semigroup([Transformation([2, 4, 4, 1]), Transformation([2, 3, 2, 1]), +gap> S := Semigroup([Transformation([2, 4, 4, 1]), Transformation([2, 3, 2, 1]), > Transformation([3, 3, 3])]);; gap> L := LeftTranslations(S); for i in [1 .. 4] do > Lr := LeftTranslations(R);; > Rl := RightTranslations(L);; > Rr := RightTranslations(R);; -> if not (Size(Ll) = i ^ i and Size(Rr) = i ^ i -> and Size(Lr) = 1 and Size(Rl) = 1) then +> if Size(Ll) <> i ^ i or Size(Rr) <> i ^ i +> or Size(Lr) <> 1 or Size(Rl) <> 1 then > Error(); > fi; > od; @@ -196,7 +196,7 @@ gap> Size(L) = Size(R) and Size(R) = Size(H) and Size(H) = Size(S); true gap> Size(Semigroup(GeneratorsOfSemigroup(L))) = Size(L); true -gap> Size(Semigroup(GeneratorsOfSemigroup(R))) = Size(R); +gap> Size(Semigroup(GeneratorsOfSemigroup(R))) = Size(R); true gap> Size(Semigroup(GeneratorsOfSemigroup(H))) = Size(H); true @@ -249,9 +249,9 @@ gap> GeneratorsOfSemigroup(R); >, > ] -# A tiny bit of brute force checking +# A tiny bit of brute force checking gap> SEMIGROUPS.bruteforcetranshull := function(S) -> local a, d, L, R, H, linkedpairs, dclasses, rclasses, lclasses, reps, i, j, +> local a, d, L, R, H, linkedpairs, dclasses, rclasses, lclasses, reps, i, j, > l, r, flag; > L := LeftTranslations(S); > R := RightTranslations(S); @@ -259,7 +259,6 @@ gap> SEMIGROUPS.bruteforcetranshull := function(S) > linkedpairs := []; > dclasses := DClasses(S); > reps := []; -> > for d in dclasses do > lclasses := ShallowCopy(LClasses(d)); > rclasses := ShallowCopy(RClasses(d)); @@ -285,7 +284,6 @@ gap> SEMIGROUPS.bruteforcetranshull := function(S) > od; > fi; > od; -> > for l in L do > for r in R do > flag := true; @@ -295,7 +293,7 @@ gap> SEMIGROUPS.bruteforcetranshull := function(S) > break; > fi; > od; -> if flag then +> if flag then > Add(linkedpairs, Bitranslation(H, l, r)); > fi; > od; @@ -330,9 +328,9 @@ gap> I := InnerTranslationalHull(S);; gap> IsWholeFamily(I); false gap> for h in H do -> if not h = Bitranslation(H, -> LeftPartOfBitranslation(h), -> RightPartOfBitranslation(h)) then +> if h <> Bitranslation(H, +> LeftPartOfBitranslation(h), +> RightPartOfBitranslation(h)) then > Print("failure!"); > fi; > od; @@ -388,9 +386,8 @@ gap> Size(L) = Size(Semigroup(GeneratorsOfSemigroup(L))); true gap> Size(R) = Size(Semigroup(GeneratorsOfSemigroup(R))); true -gap> -# Special methods for normalised RMS +# Special methods for normalised RMS gap> G := Range(RegularActionHomomorphism(SmallGroup(12, 1)));; gap> mat := [[G.1, G.2], [G.1, G.1], [G.2, G.3], [G.1 * G.2, G.1 * G.3]];; gap> S := ReesMatrixSemigroup(G, mat);; @@ -484,7 +481,7 @@ gap> for h in TranslationalHull(T) do > od; > od; > od; -gap> Bitranslation(TranslationalHull(T), (1, 4, 3, 2)(5, 7)(6, 8), +gap> Bitranslation(TranslationalHull(T), (1, 4, 3, 2)(5, 7)(6, 8), > Transformation([1, 1, 1]), Transformation([1, 1, 1])); > gap> G := Range(IsomorphismPermGroup(SmallGroup(6, 1)));; @@ -584,7 +581,7 @@ gap> ImageSetOfTranslation(AsList(T)[4]); gap> S := Semigroup([Transformation([2, 4, 4, 1]), Transformation([2, 3, 2, 1]), > Transformation([3, 3, 3])]);; gap> H := TranslationalHull(S);; -gap> T := Semigroup(Generators(H){[1 .. 5]}); +gap> T := Semigroup(Generators(H){[1 .. 5]}); > gap> Size(T); @@ -753,12 +750,12 @@ Error, each argument must have the same underlying semigroup gap> l := LeftTranslation(L, lgpfunc, IdentityTransformation);; gap> h := Bitranslation(H, l, r); Error, the translations given must satisfy the linking condition -gap> Bitranslation(H, (1, 2, 3, 5)(4, 10, 7, 12)(6, 11, 9, 8), +gap> Bitranslation(H, (1, 2, 3, 5)(4, 10, 7, 12)(6, 11, 9, 8), > Transformation([2, 2]), Transformation([2, 3, 2])); Error, the arguments given do not define a bitranslation # Hashing translations -gap> S := Semigroup([Transformation([1, 4, 3, 3]), Transformation([3, 4, 1, 1])]);; +gap> S := Semigroup([Transformation([1, 4, 3, 3]), Transformation([3, 4, 1, 1])]);; gap> L := LeftTranslations(S);; gap> R := RightTranslations(S);; gap> l := Representative(L);; @@ -773,7 +770,7 @@ gap> for r in R do > od; # Hashing translational hull elements -gap> S := Semigroup([Transformation([1, 4, 3, 3]), Transformation([3, 4, 1, 1])]);; +gap> S := Semigroup([Transformation([1, 4, 3, 3]), Transformation([3, 4, 1, 1])]);; gap> H := TranslationalHull(S);; gap> ht := HTCreate(Representative(H));; gap> for h in H do @@ -781,15 +778,15 @@ gap> for h in H do > od; # Translational Hull of RZMS which is not completely 0-simple -gap> G := Range(IsomorphismPermGroup(SmallGroup(16, 2)));; -gap> mat := [[G.1, 0, 0], [G.1 * G.2, 0, G.2]];; +gap> G := Range(IsomorphismPermGroup(SmallGroup(16, 2)));; +gap> mat := [[G.1, 0, 0], [G.1 * G.2, 0, G.2]];; gap> S := ReesZeroMatrixSemigroup(G, mat);; gap> Size(TranslationalHull(S)); 14977 # Translational Hull of RZMS which is not completely 0-simple -gap> G := Range(IsomorphismPermGroup(SmallGroup(16, 2)));; -gap> mat := [[G.1, 0, 0], [G.1 * G.2, 0, G.2]];; +gap> G := Range(IsomorphismPermGroup(SmallGroup(16, 2)));; +gap> mat := [[G.1, 0, 0], [G.1 * G.2, 0, G.2]];; gap> S := ReesZeroMatrixSemigroup(G, mat);; gap> NrBitranslations(S); 14977 diff --git a/tst/standard/congruences/congpairs.tst b/tst/standard/congruences/congpairs.tst index fb65ed551..a62dbe6e1 100644 --- a/tst/standard/congruences/congpairs.tst +++ b/tst/standard/congruences/congpairs.tst @@ -119,7 +119,7 @@ gap> classes[4] * classes[3]; <2-sided congruence class of Transformation( [ 9, 1, 1, 9, 1, 2, 2, 6, 6, 9 ] )> gap> EquivalenceClassOfElement(v, Representative(classes[5] * classes[2])) = -> EquivalenceClassOfElement(v, +> EquivalenceClassOfElement(v, > Representative(classes[5]) * > Representative(classes[2])); true @@ -320,7 +320,7 @@ f the 2nd argument (a 2-sided semigroup congruence) # Classes gap> S := Semigroup([ > Transformation([1, 5, 4, 2, 1]), Transformation([2, 1, 1, 1, 3])]);; -gap> pair := [Transformation([2, 2, 2, 3, 2]), +gap> pair := [Transformation([2, 2, 2, 3, 2]), > Transformation([2, 2, 1, 1, 2])];; gap> cong := SemigroupCongruence(S, pair);; gap> class := EquivalenceClassOfElement(cong, Transformation([1, 2, 2, 2, 1]));; @@ -386,9 +386,9 @@ gap> NrEquivalenceClasses(cong1); 46656 # Test duplicate generators of semigroup -gap> S := Semigroup(Matrix(IsBooleanMat, [[0, 1], [1, 0]]), -> Matrix(IsBooleanMat, [[1, 0], [1, 1]]), -> Matrix(IsBooleanMat, [[1, 0], [0, 0]]), +gap> S := Semigroup(Matrix(IsBooleanMat, [[0, 1], [1, 0]]), +> Matrix(IsBooleanMat, [[1, 0], [1, 1]]), +> Matrix(IsBooleanMat, [[1, 0], [0, 0]]), > Matrix(IsBooleanMat, [[1, 0], [0, 0]]));; gap> cong := LeftSemigroupCongruence(S, [S.1, S.2]);; gap> NrEquivalenceClasses(cong); @@ -399,8 +399,8 @@ gap> NrEquivalenceClasses(cong); gap> cong := SemigroupCongruence(S, [S.1, S.2]);; gap> NrEquivalenceClasses(cong); 1 -gap> S := Semigroup(Matrix(IsBooleanMat, [[0, 1], [1, 0]]), -> Matrix(IsBooleanMat, [[1, 0], [1, 1]]), +gap> S := Semigroup(Matrix(IsBooleanMat, [[0, 1], [1, 0]]), +> Matrix(IsBooleanMat, [[1, 0], [1, 1]]), > Matrix(IsBooleanMat, [[1, 0], [0, 0]]));; gap> cong := LeftSemigroupCongruence(S, [S.1, S.2]);; gap> NrEquivalenceClasses(cong); @@ -413,9 +413,9 @@ gap> NrEquivalenceClasses(cong); 1 # Test duplicate generators of semigroup as generating pairs -gap> S := Semigroup(Matrix(IsBooleanMat, [[0, 1], [1, 0]]), -> Matrix(IsBooleanMat, [[1, 0], [1, 1]]), -> Matrix(IsBooleanMat, [[1, 0], [0, 0]]), +gap> S := Semigroup(Matrix(IsBooleanMat, [[0, 1], [1, 0]]), +> Matrix(IsBooleanMat, [[1, 0], [1, 1]]), +> Matrix(IsBooleanMat, [[1, 0], [0, 0]]), > Matrix(IsBooleanMat, [[1, 0], [0, 0]]));; gap> cong := LeftSemigroupCongruence(S, [S.3, S.4]);; gap> NrEquivalenceClasses(cong); @@ -523,7 +523,7 @@ gap> EquivalenceRelationPartition(cong); , ] ] gap> cong := SemigroupCongruence(S, []);; -gap> EquivalenceRelationPartition(cong) = []; +gap> IsEmpty(EquivalenceRelationPartition(cong)); true gap> cong := UniversalSemigroupCongruence(S);; gap> Length(EquivalenceRelationPartition(cong)) = 1; @@ -631,8 +631,8 @@ gap> x := 0;; gap> for x in [1 .. Length(gens) - 1] do > Append(rels, List(gens, y -> [gens[x] * y, y * gens[x]])); > Add(rels, [gens[x] ^ (x + 1), gens[x]]); -> Add(rels, [gens[x] * gens[Length(gens)], gens[x]]); -> Add(rels, [gens[Length(gens)] * gens[x], gens[x]]); +> Add(rels, [gens[x] * Last(gens), gens[x]]); +> Add(rels, [Last(gens) * gens[x], gens[x]]); > od; gap> S := F / rels;; gap> sgens := GeneratorsOfSemigroup(S);; diff --git a/tst/standard/elements/bipart.tst b/tst/standard/elements/bipart.tst index ce4c6bcc6..45515d572 100644 --- a/tst/standard/elements/bipart.tst +++ b/tst/standard/elements/bipart.tst @@ -50,7 +50,7 @@ gap> ForAll(triples, x -> ((x[1] * x[2]) * x[3]) = (x[1] * (x[2] * x[3]))); true # BipartitionTest5: EMBEDDING into T_n -gap> l := List([1, 2, 3, 4, 5, 15, 35, 1999], i -> RandomTransformation(i));; +gap> l := List([1, 2, 3, 4, 5, 15, 35, 1999], RandomTransformation);; gap> ForAll(l, t -> t = AsTransformation(AsBipartition(t))); true @@ -740,7 +740,7 @@ gap> CodomainOfBipartition(x); # Test error messages for when creating a bipartition with degree too large. # We create enum, as opposed to a range [1 .. 2 ^ 33] to allow this test to # work in the 32-bit version. -gap> enum := EnumeratorByFunctions(Integers, +gap> enum := EnumeratorByFunctions(Integers, > rec(ElementNumber := {enum, x} -> x, > NumberElement := {enum, x} -> x, > Length := x -> 2 ^ 33));; @@ -778,6 +778,6 @@ Error, the items in the argument (a list) must be positive integers gap> BipartitionByIntRep(['a']); Error, the degree of a bipartition must be even, found 1 -# +# gap> SEMIGROUPS.StopTest(); gap> STOP_TEST("Semigroups package: standard/elements/bipart.tst"); diff --git a/tst/standard/fp/word.tst b/tst/standard/fp/word.tst index f2068f676..69d6e68be 100644 --- a/tst/standard/fp/word.tst +++ b/tst/standard/fp/word.tst @@ -27,8 +27,8 @@ gap> WordToString("", []); gap> WordToString("abc", [1]); "a" gap> WordToString("abc", [4]); -Error, the 1st argument (a string) is too short, expected at least 4but found -3 +Error, the 1st argument (a string) is too short, expected at least +4 but found 3 gap> WordToString("ab", [1, -1]); Error, expected list of positive integers as 2nd argument @@ -37,7 +37,7 @@ gap> Length(RandomWord(4, 4)) = 4; true gap> Length(RandomWord(3, 10)) = 3; true -gap> RandomWord(0, 100) = []; +gap> IsEmpty(RandomWord(0, 100)); true gap> Length(DuplicateFreeList(RandomWord(100, 20))) <= 20; true diff --git a/tst/standard/semigroups/semigraph.tst b/tst/standard/semigroups/semigraph.tst index ad9c94464..703473064 100644 --- a/tst/standard/semigroups/semigraph.tst +++ b/tst/standard/semigroups/semigraph.tst @@ -32,7 +32,7 @@ gap> Elements(S); e_5e_3^-1e_1^-1, v_1, v_2, v_3, v_4, v_5 ] gap> IsVertex(last[1]); false -gap> IsVertex(last2[Length(last2)]); +gap> IsVertex(Last(last2)); true gap> AssignGeneratorVariables(S); gap> Zero(e_1); diff --git a/tst/standard/semigroups/semitrans.tst b/tst/standard/semigroups/semitrans.tst index 5df10a278..401ee3599 100644 --- a/tst/standard/semigroups/semitrans.tst +++ b/tst/standard/semigroups/semitrans.tst @@ -23,9 +23,9 @@ gap> TestIterator := function(S, it) > local valid, len, x; > valid := true;; > len := 0; -> for x in it do +> for x in it do > len := len + 1; -> if not x in S then +> if not x in S then > valid := false; > break; > fi; @@ -578,7 +578,7 @@ true gap> BruteForceIsoCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsPBRSemigroup to IsTransformationSemigroup gap> S := Semigroup([ > PBR([[-2], [-1], [-2], [-2]], [[2], [1, 3, 4], [], []]), @@ -602,7 +602,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsFpSemigroup to IsTransformationSemigroup gap> F := FreeSemigroup(2);; AssignGeneratorVariables(F);; gap> rels := [[s1 * s2, s2], [s2 ^ 2, s2], [s1 ^ 3, s1]];; @@ -626,7 +626,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsBipartitionSemigroup to IsTransformationSemigroup gap> S := Semigroup([ > Bipartition([[1, 3, 4, -2], [2, -1], [-3], [-4]]), @@ -650,7 +650,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsTransformationSemigroup to IsTransformationSemigroup gap> S := Semigroup([ > Transformation([2, 1, 2, 2]), Transformation([3, 3, 3, 3])]); @@ -673,7 +673,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsBooleanMatSemigroup to IsTransformationSemigroup gap> S := Semigroup([ > Matrix(IsBooleanMat, @@ -705,7 +705,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsMaxPlusMatrixSemigroup to IsTransformationSemigroup gap> S := Semigroup([ > Matrix(IsMaxPlusMatrix, @@ -737,7 +737,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsMinPlusMatrixSemigroup to IsTransformationSemigroup gap> S := Semigroup([ > Matrix(IsMinPlusMatrix, @@ -769,7 +769,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsProjectiveMaxPlusMatrixSemigroup to IsTransformationSemigroup gap> S := Semigroup([ > Matrix(IsProjectiveMaxPlusMatrix, @@ -801,7 +801,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsIntegerMatrixSemigroup to IsTransformationSemigroup gap> S := Semigroup([ > Matrix(Integers, @@ -833,7 +833,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsTropicalMaxPlusMatrixSemigroup to IsTransformationSemigroup gap> S := Semigroup([ > Matrix(IsTropicalMaxPlusMatrix, @@ -865,7 +865,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsTropicalMinPlusMatrixSemigroup to IsTransformationSemigroup gap> S := Semigroup([ > Matrix(IsTropicalMinPlusMatrix, @@ -897,7 +897,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsNTPMatrixSemigroup to IsTransformationSemigroup gap> S := Semigroup([ > Matrix(IsNTPMatrix, @@ -929,7 +929,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsReesZeroMatrixSemigroup to IsTransformationSemigroup gap> S := ReesZeroMatrixSemigroup(Group([(1, 2)]), [[()], [()]]); @@ -951,7 +951,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsReesZeroMatrixSemigroup to IsTransformationMonoid gap> S := ReesZeroMatrixSemigroup(Group([(1, 2)]), [[()]]); @@ -973,7 +973,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsReesMatrixSemigroup to IsTransformationSemigroup gap> S := ReesMatrixSemigroup(Group([(1, 2)]), [[()], [()]]); @@ -995,7 +995,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsReesMatrixSemigroup to IsTransformationMonoid gap> S := ReesMatrixSemigroup(Group([(1, 2)]), [[()]]); @@ -1017,7 +1017,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsReesZeroMatrixSemigroup to IsTransformationSemigroup gap> S := ReesZeroMatrixSemigroup(Group([(1, 2)]), [[()], [0]]); @@ -1039,7 +1039,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsPBRMonoid to IsTransformationSemigroup gap> S := Monoid([ > PBR([[-2], [-3], [-2]], [[], [1, 3], [2]]), @@ -1063,7 +1063,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsFpMonoid to IsTransformationSemigroup gap> F := FreeMonoid(2);; AssignGeneratorVariables(F);; gap> rels := [[m1 * m2, m2], [m2 ^ 2, m2], [m1 ^ 3, m1], [m2 * m1 ^ 2, m2]];; @@ -1087,7 +1087,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsBipartitionMonoid to IsTransformationSemigroup gap> S := Monoid([ > Bipartition([[1, 3, -2], [2, -3], [-1]]), @@ -1111,7 +1111,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsTransformationMonoid to IsTransformationSemigroup gap> S := Monoid([ > Transformation([2, 3, 2]), Transformation([2, 2, 2])]); @@ -1134,7 +1134,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsBooleanMatMonoid to IsTransformationSemigroup gap> S := Monoid([ > Matrix(IsBooleanMat, @@ -1164,7 +1164,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsMaxPlusMatrixMonoid to IsTransformationSemigroup gap> S := Monoid([ > Matrix(IsMaxPlusMatrix, @@ -1194,7 +1194,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsMinPlusMatrixMonoid to IsTransformationSemigroup gap> S := Monoid([ > Matrix(IsMinPlusMatrix, @@ -1224,7 +1224,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsProjectiveMaxPlusMatrixMonoid to IsTransformationSemigroup gap> S := Monoid([ > Matrix(IsProjectiveMaxPlusMatrix, @@ -1254,7 +1254,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsIntegerMatrixMonoid to IsTransformationSemigroup gap> S := Monoid([ > Matrix(Integers, @@ -1284,7 +1284,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsTropicalMaxPlusMatrixMonoid to IsTransformationSemigroup gap> S := Monoid([ > Matrix(IsTropicalMaxPlusMatrix, @@ -1314,7 +1314,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsTropicalMinPlusMatrixMonoid to IsTransformationSemigroup gap> S := Monoid([ > Matrix(IsTropicalMinPlusMatrix, @@ -1344,7 +1344,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsNTPMatrixMonoid to IsTransformationSemigroup gap> S := Monoid([ > Matrix(IsNTPMatrix, @@ -1374,7 +1374,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsPBRMonoid to IsTransformationMonoid gap> S := Monoid([ > PBR([[-2], [-3], [-2]], [[], [1, 3], [2]]), @@ -1398,7 +1398,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsFpMonoid to IsTransformationMonoid gap> F := FreeMonoid(2);; AssignGeneratorVariables(F);; gap> rels := [[m1 * m2, m2], [m2 ^ 2, m2], [m1 ^ 3, m1], [m2 * m1 ^ 2, m2]];; @@ -1422,7 +1422,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsBipartitionMonoid to IsTransformationMonoid gap> S := Monoid([ > Bipartition([[1, 3, -2], [2, -3], [-1]]), @@ -1446,7 +1446,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsTransformationMonoid to IsTransformationMonoid gap> S := Monoid([ > Transformation([2, 3, 2]), Transformation([2, 2, 2])]); @@ -1469,7 +1469,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsBooleanMatMonoid to IsTransformationMonoid gap> S := Monoid([ > Matrix(IsBooleanMat, @@ -1499,7 +1499,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsMaxPlusMatrixMonoid to IsTransformationMonoid gap> S := Monoid([ > Matrix(IsMaxPlusMatrix, @@ -1529,7 +1529,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsMinPlusMatrixMonoid to IsTransformationMonoid gap> S := Monoid([ > Matrix(IsMinPlusMatrix, @@ -1559,7 +1559,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsProjectiveMaxPlusMatrixMonoid to IsTransformationMonoid gap> S := Monoid([ > Matrix(IsProjectiveMaxPlusMatrix, @@ -1589,7 +1589,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsIntegerMatrixMonoid to IsTransformationMonoid gap> S := Monoid([ > Matrix(Integers, @@ -1619,7 +1619,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsTropicalMaxPlusMatrixMonoid to IsTransformationMonoid gap> S := Monoid([ > Matrix(IsTropicalMaxPlusMatrix, @@ -1649,7 +1649,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsTropicalMinPlusMatrixMonoid to IsTransformationMonoid gap> S := Monoid([ > Matrix(IsTropicalMinPlusMatrix, @@ -1679,7 +1679,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsNTPMatrixMonoid to IsTransformationMonoid gap> S := Monoid([ > Matrix(IsNTPMatrix, @@ -1709,7 +1709,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsPBRSemigroup to IsTransformationMonoid gap> S := Semigroup([ > PBR([[-1], [-2], [-2], [-2], [-2]], [[1], [2, 3, 4, 5], [], [], []]), @@ -1733,7 +1733,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsFpSemigroup to IsTransformationMonoid gap> F := FreeSemigroup(2);; AssignGeneratorVariables(F);; gap> rels := [[s1 ^ 2, s1], [s1 * s2, s2], [s2 * s1, s2], [s2 ^ 2, s1]];; @@ -1757,7 +1757,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsBipartitionSemigroup to IsTransformationMonoid gap> S := Semigroup([ > Bipartition([[1, -1], [2, 3, 4, 5, -2], [-3], [-4], [-5]]), @@ -1780,7 +1780,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsTransformationSemigroup to IsTransformationMonoid gap> S := Semigroup([ > Transformation([1, 2, 2, 2, 2]), Transformation([2, 1, 1, 1, 1])]); @@ -1802,7 +1802,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsBooleanMatSemigroup to IsTransformationMonoid gap> S := Semigroup([ > Matrix(IsBooleanMat, @@ -1836,7 +1836,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsMaxPlusMatrixSemigroup to IsTransformationMonoid gap> S := Semigroup([ > Matrix(IsMaxPlusMatrix, @@ -1870,7 +1870,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsMinPlusMatrixSemigroup to IsTransformationMonoid gap> S := Semigroup([ > Matrix(IsMinPlusMatrix, @@ -1904,7 +1904,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsProjectiveMaxPlusMatrixSemigroup to IsTransformationMonoid gap> S := Semigroup([ > Matrix(IsProjectiveMaxPlusMatrix, @@ -1938,7 +1938,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsIntegerMatrixSemigroup to IsTransformationMonoid gap> S := Semigroup([ > Matrix(Integers, @@ -1972,7 +1972,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsTropicalMaxPlusMatrixSemigroup to IsTransformationMonoid gap> S := Semigroup([ > Matrix(IsTropicalMaxPlusMatrix, @@ -2006,7 +2006,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsTropicalMinPlusMatrixSemigroup to IsTransformationMonoid gap> S := Semigroup([ > Matrix(IsTropicalMinPlusMatrix, @@ -2040,7 +2040,7 @@ true gap> BruteForceInverseCheck(map); true -# AsMonoid: +# AsMonoid: # convert from IsNTPMatrixSemigroup to IsTransformationMonoid gap> S := Semigroup([ > Matrix(IsNTPMatrix, @@ -2074,7 +2074,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from free band to IsTransformationSemigroup gap> S := FreeBand(2);; gap> T := AsSemigroup(IsTransformationSemigroup, S); @@ -2095,7 +2095,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from perm group to IsTransformationSemigroup gap> S := DihedralGroup(IsPermGroup, 6);; gap> T := AsSemigroup(IsTransformationSemigroup, S); @@ -2116,7 +2116,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from non-perm group to IsTransformationSemigroup gap> S := DihedralGroup(6);; gap> T := AsSemigroup(IsTransformationSemigroup, S); @@ -2137,7 +2137,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsBlockBijectionSemigroup to IsTransformationSemigroup gap> S := InverseSemigroup(Bipartition([[1, -1, -3], > [2, 3, -2]]));; @@ -2159,7 +2159,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsBlockBijectionMonoid to IsTransformationMonoid gap> S := InverseMonoid([ > Bipartition([[1, -1, -3], [2, 3, -2]])]);; @@ -2181,7 +2181,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsBlockBijectionMonoid to IsTransformationSemigroup gap> S := InverseMonoid([ > Bipartition([[1, -1, -3], [2, 3, -2]])]);; @@ -2203,7 +2203,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsPartialPermSemigroup to IsTransformationSemigroup gap> S := InverseSemigroup(PartialPerm([1, 2], [2, 1]), > PartialPerm([1, 2], [3, 1])); @@ -2226,7 +2226,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsPartialPermMonoid to IsTransformationMonoid gap> S := InverseMonoid(PartialPerm([1, 2], [2, 1]), > PartialPerm([1, 2], [3, 1])); @@ -2249,7 +2249,7 @@ true gap> BruteForceInverseCheck(map); true -# AsSemigroup: +# AsSemigroup: # convert from IsPartialPermMonoid to IsTransformationSemigroup gap> S := InverseMonoid(PartialPerm([1, 2], [2, 1]), > PartialPerm([1, 2], [3, 1])); @@ -2469,13 +2469,13 @@ gap> Set(Idempotents(S, 3)); gap> Set(Idempotents(S, 4)); [ ] -# Test IteratorSorted +# Test IteratorSorted gap> S1 := Semigroup(FullTransformationMonoid(3), rec(acting := false));; gap> S2 := Semigroup(FullTransformationMonoid(3), rec(acting := true));; gap> iter1 := IteratorSorted(S1);; gap> iter2 := IteratorSorted(S2);; gap> for x in iter1 do -> if not x = NextIterator(iter2) then +> if x <> NextIterator(iter2) then > Print("Problem in IteratorSorted\n"); > fi; > od; @@ -2485,7 +2485,7 @@ gap> AsSet(S2);; gap> iter1 := IteratorSorted(S1);; gap> iter2 := IteratorSorted(S2);; gap> for x in iter1 do -> if not x = NextIterator(iter2) then +> if x <> NextIterator(iter2) then > Print("Problem in IteratorSorted\n"); > fi; > od; @@ -2635,7 +2635,7 @@ gap> Size(T); gap> Size(M); 40 -# Test DigraphOfAction +# Test DigraphOfAction gap> D := DigraphOfAction(FullTransformationMonoid(1), [[1]], OnSets); gap> D := DigraphOfAction(FullTransformationMonoid(1), [1], OnPoints); diff --git a/tst/standard/tools/display.tst b/tst/standard/tools/display.tst index 9c252d0e6..e04dfb2dc 100644 --- a/tst/standard/tools/display.tst +++ b/tst/standard/tools/display.tst @@ -20,444 +20,433 @@ gap> SEMIGROUPS.StartTest();; # Test TikzString for a pbr gap> TikzString(PBR([[-2, 2], [1, 2], [-1, 2]], [[-3], [1, 2], [- 3]])); -"%latex\n\\documentclass{minimal}\n\\usepackage{tikz}\n\\usetikzlibrary{arrows\ -}\n\\usetikzlibrary{arrows.meta}\n\\newcommand{\\arc}{\\draw[semithick, -{>[wi\ -dth = 1.5mm, length = 2.5mm]}]}\n\n\\begin{document}\n\\begin{tikzpicture}[\n \ - vertex/.style={circle, draw, fill=black, inner sep =0.04cm},\n ghost/.style=\ -{circle, draw = none, inner sep = 0.14cm},\n botloop/.style={min distance = 8\ -mm, out = -70, in = -110},\n toploop/.style={min distance = 8mm, out = 70, in\ - = 110}]\n\n % vertices and labels\n \\foreach \\i in {1,...,3} {\n \\nod\ -e [vertex] at (\\i/1.5, 3) {};\n \\node [ghost] (\\i) at (\\i/1.5, 3) {};\n\ - }\n\n \\foreach \\i in {1,...,3} {\n \\node [vertex] at (\\i/1.5, 0) {};\ -\n \\node [ghost] (-\\i) at (\\i/1.5, 0) {};\n }\n\n % arcs from vertex 1\ -\n \\arc (1) to (-2);\n \\arc (1) .. controls (1.0666666666666667, 2.3333333\ -333333335) and (0.93333333333333324, 2.3333333333333335) .. (2);\n\n % arcs f\ -rom vertex -1\n \\arc (-1) .. controls (1.4666666666666668, 1.083333333333333\ -5) and (1.2, 1.0833333333333335) .. (-3);\n\n % arcs from vertex 2\n \\arc (\ -2) .. controls (0.93333333333333324, 2.3333333333333335) and (1.06666666666666\ -67, 2.3333333333333335) .. (1);\n \\arc (2) edge [toploop] (2);\n\n % arcs f\ -rom vertex -2\n \\arc (-2) to (1);\n \\arc (-2) to (2);\n\n % arcs from ver\ -tex 3\n \\arc (3) to (-1);\n \\arc (3) .. controls (1.6000000000000001, 2.33\ -33333333333335) and (1.7333333333333334, 2.3333333333333335) .. (2);\n\n % ar\ -cs from vertex -3\n \\arc (-3) edge [botloop] (-3);\n\n\\end{tikzpicture}\n\\\ -end{document}" +"1\n2\n3\n4\n5\n\\begin{tikzpicture}[\n vertex/.style={circle, draw, fill=bla\ +ck, inner sep =0.04cm},\n ghost/.style={circle, draw = none, inner sep = 0.14\ +cm},\n botloop/.style={min distance = 8mm, out = -70, in = -110},\n toploop/\ +.style={min distance = 8mm, out = 70, in = 110}]\n\n % vertices and labels\n \ + \\foreach \\i in {1,...,3} {\n \\node [vertex] at (\\i/1.5, 3) {};\n \\\ +node [ghost] (\\i) at (\\i/1.5, 3) {};\n }\n\n \\foreach \\i in {1,...,3} {\ +\n \\node [vertex] at (\\i/1.5, 0) {};\n \\node [ghost] (-\\i) at (\\i/1\ +.5, 0) {};\n }\n\n % arcs from vertex 1\n \\arc (1) to (-2);\n \\arc (1) .\ +. controls (1.0666666666666667, 2.3333333333333335) and (0.93333333333333324, \ +2.3333333333333335) .. (2);\n\n % arcs from vertex -1\n \\arc (-1) .. contro\ +ls (1.4666666666666668, 1.0833333333333335) and (1.2, 1.0833333333333335) .. (\ +-3);\n\n % arcs from vertex 2\n \\arc (2) .. controls (0.93333333333333324, \ +2.3333333333333335) and (1.0666666666666667, 2.3333333333333335) .. (1);\n \\\ +arc (2) edge [toploop] (2);\n\n % arcs from vertex -2\n \\arc (-2) to (1);\n\ + \\arc (-2) to (2);\n\n % arcs from vertex 3\n \\arc (3) to (-1);\n \\arc \ +(3) .. controls (1.6000000000000001, 2.3333333333333335) and (1.73333333333333\ +34, 2.3333333333333335) .. (2);\n\n % arcs from vertex -3\n \\arc (-3) edge \ +[botloop] (-3);\n\n\\end{tikzpicture}\n\\end{document}" gap> TikzString(PBR([[-2, 2], [1, 2], [-1, 2]], [[-3], [1, 2], [- 3]]), > rec(labels := true)); -"%latex\n\\documentclass{minimal}\n\\usepackage{tikz}\n\\usetikzlibrary{arrows\ -}\n\\usetikzlibrary{arrows.meta}\n\\newcommand{\\arc}{\\draw[semithick, -{>[wi\ -dth = 1.5mm, length = 2.5mm]}]}\n\n\\begin{document}\n\\begin{tikzpicture}[\n \ - vertex/.style={circle, draw, fill=black, inner sep =0.04cm},\n ghost/.style=\ -{circle, draw = none, inner sep = 0.14cm},\n botloop/.style={min distance = 8\ -mm, out = -70, in = -110},\n toploop/.style={min distance = 8mm, out = 70, in\ - = 110}]\n\n % vertices and labels\n \\foreach \\i in {1,...,3} {\n \\nod\ -e [vertex, label={[yshift=9mm]\\i}] at (\\i/1.5, 3) {};\n \\node [ghost] (\ -\\i) at (\\i/1.5, 3) {};\n }\n\n \\foreach \\i in {1,...,3} {\n \\node [v\ -ertex, label={[yshift=-15mm,xshift=-0.5mm]-\\i}] at (\\i/1.5, 0) {};\n \\no\ -de [ghost] (-\\i) at (\\i/1.5, 0) {};\n }\n\n % arcs from vertex 1\n \\arc \ -(1) to (-2);\n \\arc (1) .. controls (1.0666666666666667, 2.3333333333333335)\ - and (0.93333333333333324, 2.3333333333333335) .. (2);\n\n % arcs from vertex\ - -1\n \\arc (-1) .. controls (1.4666666666666668, 1.0833333333333335) and (1.\ -2, 1.0833333333333335) .. (-3);\n\n % arcs from vertex 2\n \\arc (2) .. cont\ -rols (0.93333333333333324, 2.3333333333333335) and (1.0666666666666667, 2.3333\ -333333333335) .. (1);\n \\arc (2) edge [toploop] (2);\n\n % arcs from vertex\ - -2\n \\arc (-2) to (1);\n \\arc (-2) to (2);\n\n % arcs from vertex 3\n \ -\\arc (3) to (-1);\n \\arc (3) .. controls (1.6000000000000001, 2.33333333333\ -33335) and (1.7333333333333334, 2.3333333333333335) .. (2);\n\n % arcs from v\ -ertex -3\n \\arc (-3) edge [botloop] (-3);\n\n\\end{tikzpicture}\n\\end{docum\ -ent}" +"1\n2\n3\n4\n5\n\\begin{tikzpicture}[\n vertex/.style={circle, draw, fill=bla\ +ck, inner sep =0.04cm},\n ghost/.style={circle, draw = none, inner sep = 0.14\ +cm},\n botloop/.style={min distance = 8mm, out = -70, in = -110},\n toploop/\ +.style={min distance = 8mm, out = 70, in = 110}]\n\n % vertices and labels\n \ + \\foreach \\i in {1,...,3} {\n \\node [vertex, label={[yshift=9mm]\\i}] at\ + (\\i/1.5, 3) {};\n \\node [ghost] (\\i) at (\\i/1.5, 3) {};\n }\n\n \\fo\ +reach \\i in {1,...,3} {\n \\node [vertex, label={[yshift=-15mm,xshift=-0.5\ +mm]-\\i}] at (\\i/1.5, 0) {};\n \\node [ghost] (-\\i) at (\\i/1.5, 0) {};\n\ + }\n\n % arcs from vertex 1\n \\arc (1) to (-2);\n \\arc (1) .. controls (\ +1.0666666666666667, 2.3333333333333335) and (0.93333333333333324, 2.3333333333\ +333335) .. (2);\n\n % arcs from vertex -1\n \\arc (-1) .. controls (1.466666\ +6666666668, 1.0833333333333335) and (1.2, 1.0833333333333335) .. (-3);\n\n % \ +arcs from vertex 2\n \\arc (2) .. controls (0.93333333333333324, 2.3333333333\ +333335) and (1.0666666666666667, 2.3333333333333335) .. (1);\n \\arc (2) edge\ + [toploop] (2);\n\n % arcs from vertex -2\n \\arc (-2) to (1);\n \\arc (-2)\ + to (2);\n\n % arcs from vertex 3\n \\arc (3) to (-1);\n \\arc (3) .. contr\ +ols (1.6000000000000001, 2.3333333333333335) and (1.7333333333333334, 2.333333\ +3333333335) .. (2);\n\n % arcs from vertex -3\n \\arc (-3) edge [botloop] (-\ +3);\n\n\\end{tikzpicture}\n\\end{document}" # TikzString for a pbr collection gap> x := PBR([[1], [], []], [[2], [-2, 1, 2], [1, 2, 3]]);; gap> y := PBR([[-3, -2, -1, 2], [-3, -2, -1, 1, 2, 3], [-3, -2, -1, 1, 2, 3]], > [[-3, -2, -1, 2], [-3, -2, -1, 1, 3], [-3, -2, -1, 1, 2, 3]]);; gap> TikzString(Semigroup(x, y)); -"%latex\n\\documentclass{minimal}\n\\usepackage{tikz}\n\\usetikzlibrary{arrows\ -}\n\\usetikzlibrary{arrows.meta}\n\\newcommand{\\arc}{\\draw[semithick, -{>[wi\ -dth = 1.5mm, length = 2.5mm]}]}\n\n\\begin{document}\n\\begin{center}\n\\begin\ -{tikzpicture}[\n vertex/.style={circle, draw, fill=black, inner sep =0.04cm},\ +"1\n2\n3\n4\n5\n\\begin{center}\n\\begin{tikzpicture}[\n vertex/.style={circl\ +e, draw, fill=black, inner sep =0.04cm},\n ghost/.style={circle, draw = none,\ + inner sep = 0.14cm},\n botloop/.style={min distance = 8mm, out = -70, in = -\ +110},\n toploop/.style={min distance = 8mm, out = 70, in = 110}]\n\n % verti\ +ces and labels\n \\foreach \\i in {1,...,3} {\n \\node [vertex] at (\\i/1.\ +5, 3) {};\n \\node [ghost] (\\i) at (\\i/1.5, 3) {};\n }\n\n \\foreach \\\ +i in {1,...,3} {\n \\node [vertex] at (\\i/1.5, 0) {};\n \\node [ghost] \ +(-\\i) at (\\i/1.5, 0) {};\n }\n\n % arcs from vertex 1\n \\arc (1) edge [t\ +oploop] (1);\n\n % arcs from vertex -1\n \\arc (-1) to (2);\n\n % arcs from\ + vertex 2\n\n % arcs from vertex -2\n \\arc (-2) edge [botloop] (-2);\n \\a\ +rc (-2) to (1);\n \\arc (-2) to (2);\n\n % arcs from vertex 3\n\n % arcs fr\ +om vertex -3\n \\arc (-3) to (1);\n \\arc (-3) to (2);\n \\arc (-3) to (3);\ +\n\n\\end{tikzpicture}\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}[\n verte\ +x/.style={circle, draw, fill=black, inner sep =0.04cm},\n ghost/.style={circl\ +e, draw = none, inner sep = 0.14cm},\n botloop/.style={min distance = 8mm, ou\ +t = -70, in = -110},\n toploop/.style={min distance = 8mm, out = 70, in = 110\ +}]\n\n % vertices and labels\n \\foreach \\i in {1,...,3} {\n \\node [ver\ +tex] at (\\i/1.5, 3) {};\n \\node [ghost] (\\i) at (\\i/1.5, 3) {};\n }\n\ +\n \\foreach \\i in {1,...,3} {\n \\node [vertex] at (\\i/1.5, 0) {};\n \ + \\node [ghost] (-\\i) at (\\i/1.5, 0) {};\n }\n\n % arcs from vertex 1\n \ +\\arc (1) to (-3);\n \\arc (1) to (-2);\n \\arc (1) to (-1);\n \\arc (1) ..\ + controls (1.0666666666666667, 2.3333333333333335) and (0.93333333333333324, 2\ +.3333333333333335) .. (2);\n\n % arcs from vertex -1\n \\arc (-1) .. control\ +s (1.4666666666666668, 1.0833333333333335) and (1.2, 1.0833333333333335) .. (-\ +3);\n \\arc (-1) .. controls (1.0666666666666667, 0.66666666666666674) and (0\ +.93333333333333324, 0.66666666666666674) .. (-2);\n \\arc (-1) edge [botloop]\ + (-1);\n \\arc (-1) to (2);\n\n % arcs from vertex 2\n \\arc (2) to (-3);\n\ + \\arc (2) to (-2);\n \\arc (2) to (-1);\n \\arc (2) .. controls (0.9333333\ +3333333324, 2.3333333333333335) and (1.0666666666666667, 2.3333333333333335) .\ +. (1);\n \\arc (2) edge [toploop] (2);\n \\arc (2) .. controls (1.7333333333\ +333334, 2.3333333333333335) and (1.6000000000000001, 2.3333333333333335) .. (3\ +);\n\n % arcs from vertex -2\n \\arc (-2) .. controls (1.7333333333333334, 0\ +.66666666666666674) and (1.6000000000000001, 0.66666666666666674) .. (-3);\n \ +\\arc (-2) edge [botloop] (-2);\n \\arc (-2) .. controls (0.93333333333333324\ +, 0.66666666666666674) and (1.0666666666666667, 0.66666666666666674) .. (-1);\ +\n \\arc (-2) to (1);\n \\arc (-2) to (3);\n\n % arcs from vertex 3\n \\ar\ +c (3) to (-3);\n \\arc (3) to (-2);\n \\arc (3) to (-1);\n \\arc (3) .. con\ +trols (1.2, 1.9166666666666665) and (1.4666666666666668, 1.9166666666666665) .\ +. (1);\n \\arc (3) .. controls (1.6000000000000001, 2.3333333333333335) and (\ +1.7333333333333334, 2.3333333333333335) .. (2);\n \\arc (3) edge [toploop] (3\ +);\n\n % arcs from vertex -3\n \\arc (-3) edge [botloop] (-3);\n \\arc (-3)\ + .. controls (1.6000000000000001, 0.66666666666666674) and (1.7333333333333334\ +, 0.66666666666666674) .. (-2);\n \\arc (-3) .. controls (1.2, 1.083333333333\ +3335) and (1.4666666666666668, 1.0833333333333335) .. (-1);\n \\arc (-3) to (\ +1);\n \\arc (-3) to (2);\n \\arc (-3) to (3);\n\n\\end{tikzpicture}\n\n\\big\ +skip\\bigskip\n\n\\begin{tikzpicture}[\n vertex/.style={circle, draw, fill=bl\ +ack, inner sep =0.04cm},\n ghost/.style={circle, draw = none, inner sep = 0.1\ +4cm},\n botloop/.style={min distance = 8mm, out = -70, in = -110},\n toploop\ +/.style={min distance = 8mm, out = 70, in = 110}]\n\n % vertices and labels\n\ + \\foreach \\i in {1,...,3} {\n \\node [vertex] at (\\i/1.5, 3) {};\n \ +\\node [ghost] (\\i) at (\\i/1.5, 3) {};\n }\n\n \\foreach \\i in {1,...,3} \ +{\n \\node [vertex] at (\\i/1.5, 0) {};\n \\node [ghost] (-\\i) at (\\i/\ +1.5, 0) {};\n }\n\n % arcs from vertex 1\n \\arc (1) edge [toploop] (1);\n\ +\n % arcs from vertex -1\n \\arc (-1) to (1);\n \\arc (-1) to (2);\n\n % a\ +rcs from vertex 2\n\n % arcs from vertex -2\n \\arc (-2) edge [botloop] (-2)\ +;\n \\arc (-2) to (1);\n \\arc (-2) to (2);\n\n % arcs from vertex 3\n\n %\ + arcs from vertex -3\n \\arc (-3) to (1);\n \\arc (-3) to (2);\n \\arc (-3)\ + to (3);\n\n\\end{tikzpicture}\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}[\ +\n vertex/.style={circle, draw, fill=black, inner sep =0.04cm},\n ghost/.sty\ +le={circle, draw = none, inner sep = 0.14cm},\n botloop/.style={min distance \ += 8mm, out = -70, in = -110},\n toploop/.style={min distance = 8mm, out = 70,\ + in = 110}]\n\n % vertices and labels\n \\foreach \\i in {1,...,3} {\n \\\ +node [vertex] at (\\i/1.5, 3) {};\n \\node [ghost] (\\i) at (\\i/1.5, 3) {}\ +;\n }\n\n \\foreach \\i in {1,...,3} {\n \\node [vertex] at (\\i/1.5, 0) \ +{};\n \\node [ghost] (-\\i) at (\\i/1.5, 0) {};\n }\n\n % arcs from verte\ +x 1\n \\arc (1) edge [toploop] (1);\n\n % arcs from vertex -1\n \\arc (-1) \ +.. controls (1.4666666666666668, 1.0833333333333335) and (1.2, 1.0833333333333\ +335) .. (-3);\n \\arc (-1) .. controls (1.0666666666666667, 0.666666666666666\ +74) and (0.93333333333333324, 0.66666666666666674) .. (-2);\n \\arc (-1) edge\ + [botloop] (-1);\n \\arc (-1) to (1);\n \\arc (-1) to (2);\n \\arc (-1) to \ +(3);\n\n % arcs from vertex 2\n\n % arcs from vertex -2\n \\arc (-2) .. con\ +trols (1.7333333333333334, 0.66666666666666674) and (1.6000000000000001, 0.666\ +66666666666674) .. (-3);\n \\arc (-2) edge [botloop] (-2);\n \\arc (-2) .. c\ +ontrols (0.93333333333333324, 0.66666666666666674) and (1.0666666666666667, 0.\ +66666666666666674) .. (-1);\n \\arc (-2) to (1);\n \\arc (-2) to (2);\n \\a\ +rc (-2) to (3);\n\n % arcs from vertex 3\n\n % arcs from vertex -3\n \\arc \ +(-3) edge [botloop] (-3);\n \\arc (-3) .. controls (1.6000000000000001, 0.666\ +66666666666674) and (1.7333333333333334, 0.66666666666666674) .. (-2);\n \\ar\ +c (-3) .. controls (1.2, 1.0833333333333335) and (1.4666666666666668, 1.083333\ +3333333335) .. (-1);\n \\arc (-3) to (1);\n \\arc (-3) to (2);\n \\arc (-3)\ + to (3);\n\n\\end{tikzpicture}\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}[\ +\n vertex/.style={circle, draw, fill=black, inner sep =0.04cm},\n ghost/.sty\ +le={circle, draw = none, inner sep = 0.14cm},\n botloop/.style={min distance \ += 8mm, out = -70, in = -110},\n toploop/.style={min distance = 8mm, out = 70,\ + in = 110}]\n\n % vertices and labels\n \\foreach \\i in {1,...,3} {\n \\\ +node [vertex] at (\\i/1.5, 3) {};\n \\node [ghost] (\\i) at (\\i/1.5, 3) {}\ +;\n }\n\n \\foreach \\i in {1,...,3} {\n \\node [vertex] at (\\i/1.5, 0) \ +{};\n \\node [ghost] (-\\i) at (\\i/1.5, 0) {};\n }\n\n % arcs from verte\ +x 1\n \\arc (1) .. controls (1.0666666666666667, 2.3333333333333335) and (0.9\ +3333333333333324, 2.3333333333333335) .. (2);\n\n % arcs from vertex -1\n \\\ +arc (-1) to (1);\n \\arc (-1) to (2);\n \\arc (-1) to (3);\n\n % arcs from \ +vertex 2\n \\arc (2) .. controls (0.93333333333333324, 2.3333333333333335) an\ +d (1.0666666666666667, 2.3333333333333335) .. (1);\n \\arc (2) edge [toploop]\ + (2);\n \\arc (2) .. controls (1.7333333333333334, 2.3333333333333335) and (1\ +.6000000000000001, 2.3333333333333335) .. (3);\n\n % arcs from vertex -2\n \ +\\arc (-2) edge [botloop] (-2);\n \\arc (-2) to (1);\n \\arc (-2) to (2);\n \ + \\arc (-2) to (3);\n\n % arcs from vertex 3\n \\arc (3) .. controls (1.2, 1\ +.9166666666666665) and (1.4666666666666668, 1.9166666666666665) .. (1);\n \\a\ +rc (3) .. controls (1.6000000000000001, 2.3333333333333335) and (1.73333333333\ +33334, 2.3333333333333335) .. (2);\n \\arc (3) edge [toploop] (3);\n\n % arc\ +s from vertex -3\n \\arc (-3) to (1);\n \\arc (-3) to (2);\n \\arc (-3) to \ +(3);\n\n\\end{tikzpicture}\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}[\n v\ +ertex/.style={circle, draw, fill=black, inner sep =0.04cm},\n ghost/.style={c\ +ircle, draw = none, inner sep = 0.14cm},\n botloop/.style={min distance = 8mm\ +, out = -70, in = -110},\n toploop/.style={min distance = 8mm, out = 70, in =\ + 110}]\n\n % vertices and labels\n \\foreach \\i in {1,...,3} {\n \\node \ +[vertex] at (\\i/1.5, 3) {};\n \\node [ghost] (\\i) at (\\i/1.5, 3) {};\n \ +}\n\n \\foreach \\i in {1,...,3} {\n \\node [vertex] at (\\i/1.5, 0) {};\n\ + \\node [ghost] (-\\i) at (\\i/1.5, 0) {};\n }\n\n % arcs from vertex 1\n\ + \\arc (1) to (-3);\n \\arc (1) to (-2);\n \\arc (1) to (-1);\n \\arc (1) \ +edge [toploop] (1);\n \\arc (1) .. controls (1.0666666666666667, 2.3333333333\ +333335) and (0.93333333333333324, 2.3333333333333335) .. (2);\n \\arc (1) .. \ +controls (1.4666666666666668, 1.9166666666666665) and (1.2, 1.9166666666666665\ +) .. (3);\n\n % arcs from vertex -1\n \\arc (-1) .. controls (1.466666666666\ +6668, 1.0833333333333335) and (1.2, 1.0833333333333335) .. (-3);\n \\arc (-1)\ + .. controls (1.0666666666666667, 0.66666666666666674) and (0.9333333333333332\ +4, 0.66666666666666674) .. (-2);\n \\arc (-1) edge [botloop] (-1);\n \\arc (\ +-1) to (1);\n \\arc (-1) to (2);\n \\arc (-1) to (3);\n\n % arcs from verte\ +x 2\n \\arc (2) to (-3);\n \\arc (2) to (-2);\n \\arc (2) to (-1);\n \\arc\ + (2) .. controls (0.93333333333333324, 2.3333333333333335) and (1.066666666666\ +6667, 2.3333333333333335) .. (1);\n \\arc (2) edge [toploop] (2);\n \\arc (2\ +) .. controls (1.7333333333333334, 2.3333333333333335) and (1.6000000000000001\ +, 2.3333333333333335) .. (3);\n\n % arcs from vertex -2\n \\arc (-2) .. cont\ +rols (1.7333333333333334, 0.66666666666666674) and (1.6000000000000001, 0.6666\ +6666666666674) .. (-3);\n \\arc (-2) edge [botloop] (-2);\n \\arc (-2) .. co\ +ntrols (0.93333333333333324, 0.66666666666666674) and (1.0666666666666667, 0.6\ +6666666666666674) .. (-1);\n \\arc (-2) to (1);\n \\arc (-2) to (2);\n \\ar\ +c (-2) to (3);\n\n % arcs from vertex 3\n \\arc (3) to (-3);\n \\arc (3) to\ + (-2);\n \\arc (3) to (-1);\n \\arc (3) .. controls (1.2, 1.9166666666666665\ +) and (1.4666666666666668, 1.9166666666666665) .. (1);\n \\arc (3) .. control\ +s (1.6000000000000001, 2.3333333333333335) and (1.7333333333333334, 2.33333333\ +33333335) .. (2);\n \\arc (3) edge [toploop] (3);\n\n % arcs from vertex -3\ +\n \\arc (-3) edge [botloop] (-3);\n \\arc (-3) .. controls (1.6000000000000\ +001, 0.66666666666666674) and (1.7333333333333334, 0.66666666666666674) .. (-2\ +);\n \\arc (-3) .. controls (1.2, 1.0833333333333335) and (1.4666666666666668\ +, 1.0833333333333335) .. (-1);\n \\arc (-3) to (1);\n \\arc (-3) to (2);\n \ +\\arc (-3) to (3);\n\n\\end{tikzpicture}\n\n\\bigskip\\bigskip\n\n\\begin{tikz\ +picture}[\n vertex/.style={circle, draw, fill=black, inner sep =0.04cm},\n g\ +host/.style={circle, draw = none, inner sep = 0.14cm},\n botloop/.style={min \ +distance = 8mm, out = -70, in = -110},\n toploop/.style={min distance = 8mm, \ +out = 70, in = 110}]\n\n % vertices and labels\n \\foreach \\i in {1,...,3} \ +{\n \\node [vertex] at (\\i/1.5, 3) {};\n \\node [ghost] (\\i) at (\\i/1\ +.5, 3) {};\n }\n\n \\foreach \\i in {1,...,3} {\n \\node [vertex] at (\\i\ +/1.5, 0) {};\n \\node [ghost] (-\\i) at (\\i/1.5, 0) {};\n }\n\n % arcs f\ +rom vertex 1\n \\arc (1) edge [toploop] (1);\n\n % arcs from vertex -1\n \\\ +arc (-1) to (1);\n \\arc (-1) to (2);\n \\arc (-1) to (3);\n\n % arcs from \ +vertex 2\n\n % arcs from vertex -2\n \\arc (-2) edge [botloop] (-2);\n \\ar\ +c (-2) to (1);\n \\arc (-2) to (2);\n \\arc (-2) to (3);\n\n % arcs from ve\ +rtex 3\n\n % arcs from vertex -3\n \\arc (-3) to (1);\n \\arc (-3) to (2);\ +\n \\arc (-3) to (3);\n\n\\end{tikzpicture}\n\n\\bigskip\\bigskip\n\n\\begin{\ +tikzpicture}[\n vertex/.style={circle, draw, fill=black, inner sep =0.04cm},\ \n ghost/.style={circle, draw = none, inner sep = 0.14cm},\n botloop/.style=\ {min distance = 8mm, out = -70, in = -110},\n toploop/.style={min distance = \ 8mm, out = 70, in = 110}]\n\n % vertices and labels\n \\foreach \\i in {1,..\ .,3} {\n \\node [vertex] at (\\i/1.5, 3) {};\n \\node [ghost] (\\i) at (\ \\i/1.5, 3) {};\n }\n\n \\foreach \\i in {1,...,3} {\n \\node [vertex] at\ (\\i/1.5, 0) {};\n \\node [ghost] (-\\i) at (\\i/1.5, 0) {};\n }\n\n % a\ -rcs from vertex 1\n \\arc (1) edge [toploop] (1);\n\n % arcs from vertex -1\ -\n \\arc (-1) to (2);\n\n % arcs from vertex 2\n\n % arcs from vertex -2\n \ - \\arc (-2) edge [botloop] (-2);\n \\arc (-2) to (1);\n \\arc (-2) to (2);\n\ -\n % arcs from vertex 3\n\n % arcs from vertex -3\n \\arc (-3) to (1);\n \ -\\arc (-3) to (2);\n \\arc (-3) to (3);\n\n\\end{tikzpicture}\n\n\\bigskip\\b\ -igskip\n\n\\begin{tikzpicture}[\n vertex/.style={circle, draw, fill=black, in\ -ner sep =0.04cm},\n ghost/.style={circle, draw = none, inner sep = 0.14cm},\n\ - botloop/.style={min distance = 8mm, out = -70, in = -110},\n toploop/.style\ -={min distance = 8mm, out = 70, in = 110}]\n\n % vertices and labels\n \\for\ -each \\i in {1,...,3} {\n \\node [vertex] at (\\i/1.5, 3) {};\n \\node [\ -ghost] (\\i) at (\\i/1.5, 3) {};\n }\n\n \\foreach \\i in {1,...,3} {\n \ -\\node [vertex] at (\\i/1.5, 0) {};\n \\node [ghost] (-\\i) at (\\i/1.5, 0)\ - {};\n }\n\n % arcs from vertex 1\n \\arc (1) to (-3);\n \\arc (1) to (-2)\ -;\n \\arc (1) to (-1);\n \\arc (1) .. controls (1.0666666666666667, 2.333333\ -3333333335) and (0.93333333333333324, 2.3333333333333335) .. (2);\n\n % arcs \ -from vertex -1\n \\arc (-1) .. controls (1.4666666666666668, 1.08333333333333\ -35) and (1.2, 1.0833333333333335) .. (-3);\n \\arc (-1) .. controls (1.066666\ -6666666667, 0.66666666666666674) and (0.93333333333333324, 0.66666666666666674\ -) .. (-2);\n \\arc (-1) edge [botloop] (-1);\n \\arc (-1) to (2);\n\n % arc\ -s from vertex 2\n \\arc (2) to (-3);\n \\arc (2) to (-2);\n \\arc (2) to (-\ -1);\n \\arc (2) .. controls (0.93333333333333324, 2.3333333333333335) and (1.\ -0666666666666667, 2.3333333333333335) .. (1);\n \\arc (2) edge [toploop] (2);\ -\n \\arc (2) .. controls (1.7333333333333334, 2.3333333333333335) and (1.6000\ -000000000001, 2.3333333333333335) .. (3);\n\n % arcs from vertex -2\n \\arc \ -(-2) .. controls (1.7333333333333334, 0.66666666666666674) and (1.600000000000\ -0001, 0.66666666666666674) .. (-3);\n \\arc (-2) edge [botloop] (-2);\n \\ar\ -c (-2) .. controls (0.93333333333333324, 0.66666666666666674) and (1.066666666\ -6666667, 0.66666666666666674) .. (-1);\n \\arc (-2) to (1);\n \\arc (-2) to \ -(3);\n\n % arcs from vertex 3\n \\arc (3) to (-3);\n \\arc (3) to (-2);\n \ -\\arc (3) to (-1);\n \\arc (3) .. controls (1.2, 1.9166666666666665) and (1.4\ -666666666666668, 1.9166666666666665) .. (1);\n \\arc (3) .. controls (1.60000\ -00000000001, 2.3333333333333335) and (1.7333333333333334, 2.3333333333333335) \ -.. (2);\n \\arc (3) edge [toploop] (3);\n\n % arcs from vertex -3\n \\arc (\ --3) edge [botloop] (-3);\n \\arc (-3) .. controls (1.6000000000000001, 0.6666\ -6666666666674) and (1.7333333333333334, 0.66666666666666674) .. (-2);\n \\arc\ - (-3) .. controls (1.2, 1.0833333333333335) and (1.4666666666666668, 1.0833333\ -333333335) .. (-1);\n \\arc (-3) to (1);\n \\arc (-3) to (2);\n \\arc (-3) \ -to (3);\n\n\\end{tikzpicture}\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}[\n\ - vertex/.style={circle, draw, fill=black, inner sep =0.04cm},\n ghost/.style\ -={circle, draw = none, inner sep = 0.14cm},\n botloop/.style={min distance = \ -8mm, out = -70, in = -110},\n toploop/.style={min distance = 8mm, out = 70, i\ -n = 110}]\n\n % vertices and labels\n \\foreach \\i in {1,...,3} {\n \\no\ -de [vertex] at (\\i/1.5, 3) {};\n \\node [ghost] (\\i) at (\\i/1.5, 3) {};\ -\n }\n\n \\foreach \\i in {1,...,3} {\n \\node [vertex] at (\\i/1.5, 0) {\ -};\n \\node [ghost] (-\\i) at (\\i/1.5, 0) {};\n }\n\n % arcs from vertex\ - 1\n \\arc (1) edge [toploop] (1);\n\n % arcs from vertex -1\n \\arc (-1) t\ -o (1);\n \\arc (-1) to (2);\n\n % arcs from vertex 2\n\n % arcs from vertex\ - -2\n \\arc (-2) edge [botloop] (-2);\n \\arc (-2) to (1);\n \\arc (-2) to \ -(2);\n\n % arcs from vertex 3\n\n % arcs from vertex -3\n \\arc (-3) to (1)\ -;\n \\arc (-3) to (2);\n \\arc (-3) to (3);\n\n\\end{tikzpicture}\n\n\\bigsk\ -ip\\bigskip\n\n\\begin{tikzpicture}[\n vertex/.style={circle, draw, fill=blac\ -k, inner sep =0.04cm},\n ghost/.style={circle, draw = none, inner sep = 0.14c\ -m},\n botloop/.style={min distance = 8mm, out = -70, in = -110},\n toploop/.\ -style={min distance = 8mm, out = 70, in = 110}]\n\n % vertices and labels\n \ -\\foreach \\i in {1,...,3} {\n \\node [vertex] at (\\i/1.5, 3) {};\n \\n\ -ode [ghost] (\\i) at (\\i/1.5, 3) {};\n }\n\n \\foreach \\i in {1,...,3} {\n\ - \\node [vertex] at (\\i/1.5, 0) {};\n \\node [ghost] (-\\i) at (\\i/1.5\ -, 0) {};\n }\n\n % arcs from vertex 1\n \\arc (1) edge [toploop] (1);\n\n \ -% arcs from vertex -1\n \\arc (-1) .. controls (1.4666666666666668, 1.0833333\ -333333335) and (1.2, 1.0833333333333335) .. (-3);\n \\arc (-1) .. controls (1\ -.0666666666666667, 0.66666666666666674) and (0.93333333333333324, 0.6666666666\ -6666674) .. (-2);\n \\arc (-1) edge [botloop] (-1);\n \\arc (-1) to (1);\n \ -\\arc (-1) to (2);\n \\arc (-1) to (3);\n\n % arcs from vertex 2\n\n % arcs\ - from vertex -2\n \\arc (-2) .. controls (1.7333333333333334, 0.6666666666666\ -6674) and (1.6000000000000001, 0.66666666666666674) .. (-3);\n \\arc (-2) edg\ -e [botloop] (-2);\n \\arc (-2) .. controls (0.93333333333333324, 0.6666666666\ -6666674) and (1.0666666666666667, 0.66666666666666674) .. (-1);\n \\arc (-2) \ -to (1);\n \\arc (-2) to (2);\n \\arc (-2) to (3);\n\n % arcs from vertex 3\ -\n\n % arcs from vertex -3\n \\arc (-3) edge [botloop] (-3);\n \\arc (-3) .\ -. controls (1.6000000000000001, 0.66666666666666674) and (1.7333333333333334, \ -0.66666666666666674) .. (-2);\n \\arc (-3) .. controls (1.2, 1.08333333333333\ -35) and (1.4666666666666668, 1.0833333333333335) .. (-1);\n \\arc (-3) to (1)\ -;\n \\arc (-3) to (2);\n \\arc (-3) to (3);\n\n\\end{tikzpicture}\n\n\\bigsk\ -ip\\bigskip\n\n\\begin{tikzpicture}[\n vertex/.style={circle, draw, fill=blac\ -k, inner sep =0.04cm},\n ghost/.style={circle, draw = none, inner sep = 0.14c\ -m},\n botloop/.style={min distance = 8mm, out = -70, in = -110},\n toploop/.\ -style={min distance = 8mm, out = 70, in = 110}]\n\n % vertices and labels\n \ -\\foreach \\i in {1,...,3} {\n \\node [vertex] at (\\i/1.5, 3) {};\n \\n\ -ode [ghost] (\\i) at (\\i/1.5, 3) {};\n }\n\n \\foreach \\i in {1,...,3} {\n\ - \\node [vertex] at (\\i/1.5, 0) {};\n \\node [ghost] (-\\i) at (\\i/1.5\ -, 0) {};\n }\n\n % arcs from vertex 1\n \\arc (1) .. controls (1.0666666666\ -666667, 2.3333333333333335) and (0.93333333333333324, 2.3333333333333335) .. (\ -2);\n\n % arcs from vertex -1\n \\arc (-1) to (1);\n \\arc (-1) to (2);\n \ -\\arc (-1) to (3);\n\n % arcs from vertex 2\n \\arc (2) .. controls (0.93333\ -333333333324, 2.3333333333333335) and (1.0666666666666667, 2.3333333333333335)\ - .. (1);\n \\arc (2) edge [toploop] (2);\n \\arc (2) .. controls (1.73333333\ -33333334, 2.3333333333333335) and (1.6000000000000001, 2.3333333333333335) .. \ -(3);\n\n % arcs from vertex -2\n \\arc (-2) edge [botloop] (-2);\n \\arc (-\ -2) to (1);\n \\arc (-2) to (2);\n \\arc (-2) to (3);\n\n % arcs from vertex\ - 3\n \\arc (3) .. controls (1.2, 1.9166666666666665) and (1.4666666666666668,\ - 1.9166666666666665) .. (1);\n \\arc (3) .. controls (1.6000000000000001, 2.3\ -333333333333335) and (1.7333333333333334, 2.3333333333333335) .. (2);\n \\arc\ - (3) edge [toploop] (3);\n\n % arcs from vertex -3\n \\arc (-3) to (1);\n \ -\\arc (-3) to (2);\n \\arc (-3) to (3);\n\n\\end{tikzpicture}\n\n\\bigskip\\b\ -igskip\n\n\\begin{tikzpicture}[\n vertex/.style={circle, draw, fill=black, in\ -ner sep =0.04cm},\n ghost/.style={circle, draw = none, inner sep = 0.14cm},\n\ - botloop/.style={min distance = 8mm, out = -70, in = -110},\n toploop/.style\ -={min distance = 8mm, out = 70, in = 110}]\n\n % vertices and labels\n \\for\ -each \\i in {1,...,3} {\n \\node [vertex] at (\\i/1.5, 3) {};\n \\node [\ -ghost] (\\i) at (\\i/1.5, 3) {};\n }\n\n \\foreach \\i in {1,...,3} {\n \ -\\node [vertex] at (\\i/1.5, 0) {};\n \\node [ghost] (-\\i) at (\\i/1.5, 0)\ - {};\n }\n\n % arcs from vertex 1\n \\arc (1) to (-3);\n \\arc (1) to (-2)\ -;\n \\arc (1) to (-1);\n \\arc (1) edge [toploop] (1);\n \\arc (1) .. contr\ -ols (1.0666666666666667, 2.3333333333333335) and (0.93333333333333324, 2.33333\ -33333333335) .. (2);\n \\arc (1) .. controls (1.4666666666666668, 1.916666666\ -6666665) and (1.2, 1.9166666666666665) .. (3);\n\n % arcs from vertex -1\n \ -\\arc (-1) .. controls (1.4666666666666668, 1.0833333333333335) and (1.2, 1.08\ -33333333333335) .. (-3);\n \\arc (-1) .. controls (1.0666666666666667, 0.6666\ -6666666666674) and (0.93333333333333324, 0.66666666666666674) .. (-2);\n \\ar\ -c (-1) edge [botloop] (-1);\n \\arc (-1) to (1);\n \\arc (-1) to (2);\n \\a\ -rc (-1) to (3);\n\n % arcs from vertex 2\n \\arc (2) to (-3);\n \\arc (2) t\ -o (-2);\n \\arc (2) to (-1);\n \\arc (2) .. controls (0.93333333333333324, 2\ -.3333333333333335) and (1.0666666666666667, 2.3333333333333335) .. (1);\n \\a\ -rc (2) edge [toploop] (2);\n \\arc (2) .. controls (1.7333333333333334, 2.333\ -3333333333335) and (1.6000000000000001, 2.3333333333333335) .. (3);\n\n % arc\ -s from vertex -2\n \\arc (-2) .. controls (1.7333333333333334, 0.666666666666\ -66674) and (1.6000000000000001, 0.66666666666666674) .. (-3);\n \\arc (-2) ed\ -ge [botloop] (-2);\n \\arc (-2) .. controls (0.93333333333333324, 0.666666666\ -66666674) and (1.0666666666666667, 0.66666666666666674) .. (-1);\n \\arc (-2)\ - to (1);\n \\arc (-2) to (2);\n \\arc (-2) to (3);\n\n % arcs from vertex 3\ -\n \\arc (3) to (-3);\n \\arc (3) to (-2);\n \\arc (3) to (-1);\n \\arc (3\ -) .. controls (1.2, 1.9166666666666665) and (1.4666666666666668, 1.91666666666\ -66665) .. (1);\n \\arc (3) .. controls (1.6000000000000001, 2.333333333333333\ -5) and (1.7333333333333334, 2.3333333333333335) .. (2);\n \\arc (3) edge [top\ -loop] (3);\n\n % arcs from vertex -3\n \\arc (-3) edge [botloop] (-3);\n \\\ -arc (-3) .. controls (1.6000000000000001, 0.66666666666666674) and (1.73333333\ -33333334, 0.66666666666666674) .. (-2);\n \\arc (-3) .. controls (1.2, 1.0833\ -333333333335) and (1.4666666666666668, 1.0833333333333335) .. (-1);\n \\arc (\ --3) to (1);\n \\arc (-3) to (2);\n \\arc (-3) to (3);\n\n\\end{tikzpicture}\ -\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}[\n vertex/.style={circle, draw\ -, fill=black, inner sep =0.04cm},\n ghost/.style={circle, draw = none, inner \ -sep = 0.14cm},\n botloop/.style={min distance = 8mm, out = -70, in = -110},\n\ - toploop/.style={min distance = 8mm, out = 70, in = 110}]\n\n % vertices and\ - labels\n \\foreach \\i in {1,...,3} {\n \\node [vertex] at (\\i/1.5, 3) {\ -};\n \\node [ghost] (\\i) at (\\i/1.5, 3) {};\n }\n\n \\foreach \\i in {1\ -,...,3} {\n \\node [vertex] at (\\i/1.5, 0) {};\n \\node [ghost] (-\\i) \ -at (\\i/1.5, 0) {};\n }\n\n % arcs from vertex 1\n \\arc (1) edge [toploop]\ - (1);\n\n % arcs from vertex -1\n \\arc (-1) to (1);\n \\arc (-1) to (2);\n\ - \\arc (-1) to (3);\n\n % arcs from vertex 2\n\n % arcs from vertex -2\n \ -\\arc (-2) edge [botloop] (-2);\n \\arc (-2) to (1);\n \\arc (-2) to (2);\n \ - \\arc (-2) to (3);\n\n % arcs from vertex 3\n\n % arcs from vertex -3\n \\\ -arc (-3) to (1);\n \\arc (-3) to (2);\n \\arc (-3) to (3);\n\n\\end{tikzpict\ -ure}\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}[\n vertex/.style={circle, \ -draw, fill=black, inner sep =0.04cm},\n ghost/.style={circle, draw = none, in\ -ner sep = 0.14cm},\n botloop/.style={min distance = 8mm, out = -70, in = -110\ -},\n toploop/.style={min distance = 8mm, out = 70, in = 110}]\n\n % vertices\ - and labels\n \\foreach \\i in {1,...,3} {\n \\node [vertex] at (\\i/1.5, \ -3) {};\n \\node [ghost] (\\i) at (\\i/1.5, 3) {};\n }\n\n \\foreach \\i i\ -n {1,...,3} {\n \\node [vertex] at (\\i/1.5, 0) {};\n \\node [ghost] (-\ -\\i) at (\\i/1.5, 0) {};\n }\n\n % arcs from vertex 1\n \\arc (1) .. contro\ -ls (1.0666666666666667, 2.3333333333333335) and (0.93333333333333324, 2.333333\ -3333333335) .. (2);\n\n % arcs from vertex -1\n \\arc (-1) .. controls (1.46\ -66666666666668, 1.0833333333333335) and (1.2, 1.0833333333333335) .. (-3);\n \ -\\arc (-1) .. controls (1.0666666666666667, 0.66666666666666674) and (0.933333\ -33333333324, 0.66666666666666674) .. (-2);\n \\arc (-1) edge [botloop] (-1);\ -\n \\arc (-1) to (1);\n \\arc (-1) to (2);\n \\arc (-1) to (3);\n\n % arcs\ - from vertex 2\n \\arc (2) .. controls (0.93333333333333324, 2.33333333333333\ -35) and (1.0666666666666667, 2.3333333333333335) .. (1);\n \\arc (2) edge [to\ -ploop] (2);\n \\arc (2) .. controls (1.7333333333333334, 2.3333333333333335) \ -and (1.6000000000000001, 2.3333333333333335) .. (3);\n\n % arcs from vertex -\ -2\n \\arc (-2) .. controls (1.7333333333333334, 0.66666666666666674) and (1.6\ -000000000000001, 0.66666666666666674) .. (-3);\n \\arc (-2) edge [botloop] (-\ -2);\n \\arc (-2) .. controls (0.93333333333333324, 0.66666666666666674) and (\ -1.0666666666666667, 0.66666666666666674) .. (-1);\n \\arc (-2) to (1);\n \\a\ -rc (-2) to (2);\n \\arc (-2) to (3);\n\n % arcs from vertex 3\n \\arc (3) .\ -. controls (1.2, 1.9166666666666665) and (1.4666666666666668, 1.91666666666666\ -65) .. (1);\n \\arc (3) .. controls (1.6000000000000001, 2.3333333333333335) \ -and (1.7333333333333334, 2.3333333333333335) .. (2);\n \\arc (3) edge [toploo\ -p] (3);\n\n % arcs from vertex -3\n \\arc (-3) edge [botloop] (-3);\n \\arc\ - (-3) .. controls (1.6000000000000001, 0.66666666666666674) and (1.73333333333\ -33334, 0.66666666666666674) .. (-2);\n \\arc (-3) .. controls (1.2, 1.0833333\ -333333335) and (1.4666666666666668, 1.0833333333333335) .. (-1);\n \\arc (-3)\ - to (1);\n \\arc (-3) to (2);\n \\arc (-3) to (3);\n\n\\end{tikzpicture}\n\n\ -\\bigskip\\bigskip\n\n\\begin{tikzpicture}[\n vertex/.style={circle, draw, fi\ -ll=black, inner sep =0.04cm},\n ghost/.style={circle, draw = none, inner sep \ -= 0.14cm},\n botloop/.style={min distance = 8mm, out = -70, in = -110},\n to\ -ploop/.style={min distance = 8mm, out = 70, in = 110}]\n\n % vertices and lab\ -els\n \\foreach \\i in {1,...,3} {\n \\node [vertex] at (\\i/1.5, 3) {};\n\ - \\node [ghost] (\\i) at (\\i/1.5, 3) {};\n }\n\n \\foreach \\i in {1,...\ -,3} {\n \\node [vertex] at (\\i/1.5, 0) {};\n \\node [ghost] (-\\i) at (\ -\\i/1.5, 0) {};\n }\n\n % arcs from vertex 1\n \\arc (1) edge [toploop] (1)\ -;\n \\arc (1) .. controls (1.0666666666666667, 2.3333333333333335) and (0.933\ -33333333333324, 2.3333333333333335) .. (2);\n \\arc (1) .. controls (1.466666\ -6666666668, 1.9166666666666665) and (1.2, 1.9166666666666665) .. (3);\n\n % a\ -rcs from vertex -1\n \\arc (-1) to (1);\n \\arc (-1) to (2);\n \\arc (-1) t\ -o (3);\n\n % arcs from vertex 2\n \\arc (2) .. controls (0.93333333333333324\ -, 2.3333333333333335) and (1.0666666666666667, 2.3333333333333335) .. (1);\n \ -\\arc (2) edge [toploop] (2);\n \\arc (2) .. controls (1.7333333333333334, 2.\ -3333333333333335) and (1.6000000000000001, 2.3333333333333335) .. (3);\n\n % \ -arcs from vertex -2\n \\arc (-2) edge [botloop] (-2);\n \\arc (-2) to (1);\n\ - \\arc (-2) to (2);\n \\arc (-2) to (3);\n\n % arcs from vertex 3\n \\arc \ -(3) .. controls (1.2, 1.9166666666666665) and (1.4666666666666668, 1.916666666\ -6666665) .. (1);\n \\arc (3) .. controls (1.6000000000000001, 2.3333333333333\ -335) and (1.7333333333333334, 2.3333333333333335) .. (2);\n \\arc (3) edge [t\ -oploop] (3);\n\n % arcs from vertex -3\n \\arc (-3) to (1);\n \\arc (-3) to\ - (2);\n \\arc (-3) to (3);\n\n\\end{tikzpicture}\n\n\\bigskip\\bigskip\n\n\\b\ -egin{tikzpicture}[\n vertex/.style={circle, draw, fill=black, inner sep =0.04\ -cm},\n ghost/.style={circle, draw = none, inner sep = 0.14cm},\n botloop/.st\ -yle={min distance = 8mm, out = -70, in = -110},\n toploop/.style={min distanc\ -e = 8mm, out = 70, in = 110}]\n\n % vertices and labels\n \\foreach \\i in {\ -1,...,3} {\n \\node [vertex] at (\\i/1.5, 3) {};\n \\node [ghost] (\\i) \ -at (\\i/1.5, 3) {};\n }\n\n \\foreach \\i in {1,...,3} {\n \\node [vertex\ -] at (\\i/1.5, 0) {};\n \\node [ghost] (-\\i) at (\\i/1.5, 0) {};\n }\n\n \ - % arcs from vertex 1\n \\arc (1) edge [toploop] (1);\n \\arc (1) .. control\ -s (1.0666666666666667, 2.3333333333333335) and (0.93333333333333324, 2.3333333\ -333333335) .. (2);\n \\arc (1) .. controls (1.4666666666666668, 1.91666666666\ -66665) and (1.2, 1.9166666666666665) .. (3);\n\n % arcs from vertex -1\n \\a\ -rc (-1) .. controls (1.4666666666666668, 1.0833333333333335) and (1.2, 1.08333\ -33333333335) .. (-3);\n \\arc (-1) .. controls (1.0666666666666667, 0.6666666\ -6666666674) and (0.93333333333333324, 0.66666666666666674) .. (-2);\n \\arc (\ --1) edge [botloop] (-1);\n \\arc (-1) to (1);\n \\arc (-1) to (2);\n \\arc \ -(-1) to (3);\n\n % arcs from vertex 2\n \\arc (2) .. controls (0.93333333333\ -333324, 2.3333333333333335) and (1.0666666666666667, 2.3333333333333335) .. (1\ -);\n \\arc (2) edge [toploop] (2);\n \\arc (2) .. controls (1.73333333333333\ -34, 2.3333333333333335) and (1.6000000000000001, 2.3333333333333335) .. (3);\n\ -\n % arcs from vertex -2\n \\arc (-2) .. controls (1.7333333333333334, 0.666\ -66666666666674) and (1.6000000000000001, 0.66666666666666674) .. (-3);\n \\ar\ -c (-2) edge [botloop] (-2);\n \\arc (-2) .. controls (0.93333333333333324, 0.\ -66666666666666674) and (1.0666666666666667, 0.66666666666666674) .. (-1);\n \ -\\arc (-2) to (1);\n \\arc (-2) to (2);\n \\arc (-2) to (3);\n\n % arcs fro\ -m vertex 3\n \\arc (3) .. controls (1.2, 1.9166666666666665) and (1.466666666\ -6666668, 1.9166666666666665) .. (1);\n \\arc (3) .. controls (1.6000000000000\ -001, 2.3333333333333335) and (1.7333333333333334, 2.3333333333333335) .. (2);\ -\n \\arc (3) edge [toploop] (3);\n\n % arcs from vertex -3\n \\arc (-3) edg\ -e [botloop] (-3);\n \\arc (-3) .. controls (1.6000000000000001, 0.66666666666\ -666674) and (1.7333333333333334, 0.66666666666666674) .. (-2);\n \\arc (-3) .\ -. controls (1.2, 1.0833333333333335) and (1.4666666666666668, 1.08333333333333\ -35) .. (-1);\n \\arc (-3) to (1);\n \\arc (-3) to (2);\n \\arc (-3) to (3);\ -\n\n\\end{tikzpicture}\n\n\\bigskip\\bigskip\n\n\\end{center}\\end{document}" +rcs from vertex 1\n \\arc (1) .. controls (1.0666666666666667, 2.333333333333\ +3335) and (0.93333333333333324, 2.3333333333333335) .. (2);\n\n % arcs from v\ +ertex -1\n \\arc (-1) .. controls (1.4666666666666668, 1.0833333333333335) an\ +d (1.2, 1.0833333333333335) .. (-3);\n \\arc (-1) .. controls (1.066666666666\ +6667, 0.66666666666666674) and (0.93333333333333324, 0.66666666666666674) .. (\ +-2);\n \\arc (-1) edge [botloop] (-1);\n \\arc (-1) to (1);\n \\arc (-1) to\ + (2);\n \\arc (-1) to (3);\n\n % arcs from vertex 2\n \\arc (2) .. controls\ + (0.93333333333333324, 2.3333333333333335) and (1.0666666666666667, 2.33333333\ +33333335) .. (1);\n \\arc (2) edge [toploop] (2);\n \\arc (2) .. controls (1\ +.7333333333333334, 2.3333333333333335) and (1.6000000000000001, 2.333333333333\ +3335) .. (3);\n\n % arcs from vertex -2\n \\arc (-2) .. controls (1.73333333\ +33333334, 0.66666666666666674) and (1.6000000000000001, 0.66666666666666674) .\ +. (-3);\n \\arc (-2) edge [botloop] (-2);\n \\arc (-2) .. controls (0.933333\ +33333333324, 0.66666666666666674) and (1.0666666666666667, 0.66666666666666674\ +) .. (-1);\n \\arc (-2) to (1);\n \\arc (-2) to (2);\n \\arc (-2) to (3);\n\ +\n % arcs from vertex 3\n \\arc (3) .. controls (1.2, 1.9166666666666665) an\ +d (1.4666666666666668, 1.9166666666666665) .. (1);\n \\arc (3) .. controls (1\ +.6000000000000001, 2.3333333333333335) and (1.7333333333333334, 2.333333333333\ +3335) .. (2);\n \\arc (3) edge [toploop] (3);\n\n % arcs from vertex -3\n \ +\\arc (-3) edge [botloop] (-3);\n \\arc (-3) .. controls (1.6000000000000001,\ + 0.66666666666666674) and (1.7333333333333334, 0.66666666666666674) .. (-2);\n\ + \\arc (-3) .. controls (1.2, 1.0833333333333335) and (1.4666666666666668, 1.\ +0833333333333335) .. (-1);\n \\arc (-3) to (1);\n \\arc (-3) to (2);\n \\ar\ +c (-3) to (3);\n\n\\end{tikzpicture}\n\n\\bigskip\\bigskip\n\n\\begin{tikzpict\ +ure}[\n vertex/.style={circle, draw, fill=black, inner sep =0.04cm},\n ghost\ +/.style={circle, draw = none, inner sep = 0.14cm},\n botloop/.style={min dist\ +ance = 8mm, out = -70, in = -110},\n toploop/.style={min distance = 8mm, out \ += 70, in = 110}]\n\n % vertices and labels\n \\foreach \\i in {1,...,3} {\n \ + \\node [vertex] at (\\i/1.5, 3) {};\n \\node [ghost] (\\i) at (\\i/1.5, \ +3) {};\n }\n\n \\foreach \\i in {1,...,3} {\n \\node [vertex] at (\\i/1.5\ +, 0) {};\n \\node [ghost] (-\\i) at (\\i/1.5, 0) {};\n }\n\n % arcs from \ +vertex 1\n \\arc (1) edge [toploop] (1);\n \\arc (1) .. controls (1.06666666\ +66666667, 2.3333333333333335) and (0.93333333333333324, 2.3333333333333335) ..\ + (2);\n \\arc (1) .. controls (1.4666666666666668, 1.9166666666666665) and (1\ +.2, 1.9166666666666665) .. (3);\n\n % arcs from vertex -1\n \\arc (-1) to (1\ +);\n \\arc (-1) to (2);\n \\arc (-1) to (3);\n\n % arcs from vertex 2\n \\\ +arc (2) .. controls (0.93333333333333324, 2.3333333333333335) and (1.066666666\ +6666667, 2.3333333333333335) .. (1);\n \\arc (2) edge [toploop] (2);\n \\arc\ + (2) .. controls (1.7333333333333334, 2.3333333333333335) and (1.6000000000000\ +001, 2.3333333333333335) .. (3);\n\n % arcs from vertex -2\n \\arc (-2) edge\ + [botloop] (-2);\n \\arc (-2) to (1);\n \\arc (-2) to (2);\n \\arc (-2) to \ +(3);\n\n % arcs from vertex 3\n \\arc (3) .. controls (1.2, 1.91666666666666\ +65) and (1.4666666666666668, 1.9166666666666665) .. (1);\n \\arc (3) .. contr\ +ols (1.6000000000000001, 2.3333333333333335) and (1.7333333333333334, 2.333333\ +3333333335) .. (2);\n \\arc (3) edge [toploop] (3);\n\n % arcs from vertex -\ +3\n \\arc (-3) to (1);\n \\arc (-3) to (2);\n \\arc (-3) to (3);\n\n\\end{t\ +ikzpicture}\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}[\n vertex/.style={c\ +ircle, draw, fill=black, inner sep =0.04cm},\n ghost/.style={circle, draw = n\ +one, inner sep = 0.14cm},\n botloop/.style={min distance = 8mm, out = -70, in\ + = -110},\n toploop/.style={min distance = 8mm, out = 70, in = 110}]\n\n % v\ +ertices and labels\n \\foreach \\i in {1,...,3} {\n \\node [vertex] at (\\\ +i/1.5, 3) {};\n \\node [ghost] (\\i) at (\\i/1.5, 3) {};\n }\n\n \\foreac\ +h \\i in {1,...,3} {\n \\node [vertex] at (\\i/1.5, 0) {};\n \\node [gho\ +st] (-\\i) at (\\i/1.5, 0) {};\n }\n\n % arcs from vertex 1\n \\arc (1) edg\ +e [toploop] (1);\n \\arc (1) .. controls (1.0666666666666667, 2.3333333333333\ +335) and (0.93333333333333324, 2.3333333333333335) .. (2);\n \\arc (1) .. con\ +trols (1.4666666666666668, 1.9166666666666665) and (1.2, 1.9166666666666665) .\ +. (3);\n\n % arcs from vertex -1\n \\arc (-1) .. controls (1.466666666666666\ +8, 1.0833333333333335) and (1.2, 1.0833333333333335) .. (-3);\n \\arc (-1) ..\ + controls (1.0666666666666667, 0.66666666666666674) and (0.93333333333333324, \ +0.66666666666666674) .. (-2);\n \\arc (-1) edge [botloop] (-1);\n \\arc (-1)\ + to (1);\n \\arc (-1) to (2);\n \\arc (-1) to (3);\n\n % arcs from vertex 2\ +\n \\arc (2) .. controls (0.93333333333333324, 2.3333333333333335) and (1.066\ +6666666666667, 2.3333333333333335) .. (1);\n \\arc (2) edge [toploop] (2);\n \ + \\arc (2) .. controls (1.7333333333333334, 2.3333333333333335) and (1.6000000\ +000000001, 2.3333333333333335) .. (3);\n\n % arcs from vertex -2\n \\arc (-2\ +) .. controls (1.7333333333333334, 0.66666666666666674) and (1.600000000000000\ +1, 0.66666666666666674) .. (-3);\n \\arc (-2) edge [botloop] (-2);\n \\arc (\ +-2) .. controls (0.93333333333333324, 0.66666666666666674) and (1.066666666666\ +6667, 0.66666666666666674) .. (-1);\n \\arc (-2) to (1);\n \\arc (-2) to (2)\ +;\n \\arc (-2) to (3);\n\n % arcs from vertex 3\n \\arc (3) .. controls (1.\ +2, 1.9166666666666665) and (1.4666666666666668, 1.9166666666666665) .. (1);\n \ + \\arc (3) .. controls (1.6000000000000001, 2.3333333333333335) and (1.7333333\ +333333334, 2.3333333333333335) .. (2);\n \\arc (3) edge [toploop] (3);\n\n %\ + arcs from vertex -3\n \\arc (-3) edge [botloop] (-3);\n \\arc (-3) .. contr\ +ols (1.6000000000000001, 0.66666666666666674) and (1.7333333333333334, 0.66666\ +666666666674) .. (-2);\n \\arc (-3) .. controls (1.2, 1.0833333333333335) and\ + (1.4666666666666668, 1.0833333333333335) .. (-1);\n \\arc (-3) to (1);\n \\\ +arc (-3) to (2);\n \\arc (-3) to (3);\n\n\\end{tikzpicture}\n\n\\bigskip\\big\ +skip\n\n\\end{center}\\end{document}" # TikzString for a bipartition collection gap> TikzString(PartitionMonoid(2)); -"%latex\n\\documentclass{minimal}\n\\usepackage{tikz}\n\n\\begin{document}\n\\\ -begin{center}\n\\begin{tikzpicture}\n\n %block number 1\n %vertices and labe\ -ls\n \\fill(1, 2)circle(.125);\n \\draw(0.94999999999999996, 2.2) node [abov\ -e] {$1$};\n \\fill(1, 0)circle(.125);\n \\draw(1, -0.2) node [below] {$-1$};\ -\n\n %lines\n \\draw(1, 2)--(1, 0);\n\n %block number 2\n %vertices and la\ -bels\n \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2) node [above] {$2$};\n \ -\\fill(2, 0)circle(.125);\n \\draw(2, -0.2) node [below] {$-2$};\n\n %lines\ -\n \\draw(2, 2)--(2, 0);\n\\end{tikzpicture}\n\n\n\\bigskip\\bigskip\n\n\\beg\ -in{tikzpicture}\n\n %block number 1\n %vertices and labels\n \\fill(1, 2)ci\ -rcle(.125);\n \\draw(0.94999999999999996, 2.2) node [above] {$1$};\n \\fill(\ -2, 0)circle(.125);\n \\draw(2, -0.2) node [below] {$-2$};\n\n %lines\n \\dr\ -aw(1, 2)--(2, 0);\n\n %block number 2\n %vertices and labels\n \\fill(2, 2)\ -circle(.125);\n \\draw(1.95, 2.2) node [above] {$2$};\n \\fill(1, 0)circle(.\ -125);\n \\draw(1, -0.2) node [below] {$-1$};\n\n %lines\n \\draw(2, 2)--(1,\ - 0);\n\\end{tikzpicture}\n\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}\n\n \ -%block number 1\n %vertices and labels\n \\fill(1, 2)circle(.125);\n \\draw\ -(0.94999999999999996, 2.2) node [above] {$1$};\n\n %lines\n\n %block number \ -2\n %vertices and labels\n \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2) no\ -de [above] {$2$};\n \\fill(2, 0)circle(.125);\n \\draw(2, -0.2) node [below]\ - {$-2$};\n\n %lines\n \\draw(2, 2)--(2, 0);\n\n %block number 3\n %vertice\ -s and labels\n \\fill(1, 0)circle(.125);\n \\draw(1, -0.2) node [below] {$-1\ -$};\n\n %lines\n\\end{tikzpicture}\n\n\n\\bigskip\\bigskip\n\n\\begin{tikzpic\ -ture}\n\n %block number 1\n %vertices and labels\n \\fill(1, 2)circle(.125)\ -;\n \\draw(0.94999999999999996, 2.2) node [above] {$1$};\n \\fill(2, 2)circl\ -e(.125);\n \\draw(1.95, 2.2) node [above] {$2$};\n \\fill(1, 0)circle(.125);\ -\n \\draw(1, -0.2) node [below] {$-1$};\n \\fill(2, 0)circle(.125);\n \\dra\ -w(2, -0.2) node [below] {$-2$};\n\n %lines\n \\draw(1, 1.875) .. controls (1\ -, 1.25) and (2, 1.25) .. (2, 1.875);\n \\draw(1, 0.125) .. controls (1, 0.75)\ - and (2, 0.75) .. (2, 0.125);\n \\draw(1, 2)--(1, 0);\n\\end{tikzpicture}\n\n\ -\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}\n\n %block number 1\n %vertices\ - and labels\n \\fill(1, 2)circle(.125);\n \\draw(0.94999999999999996, 2.2) n\ -ode [above] {$1$};\n \\fill(2, 0)circle(.125);\n \\draw(2, -0.2) node [below\ -] {$-2$};\n\n %lines\n \\draw(1, 2)--(2, 0);\n\n %block number 2\n %vertic\ -es and labels\n \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2) node [above] {\ -$2$};\n\n %lines\n\n %block number 3\n %vertices and labels\n \\fill(1, 0)\ -circle(.125);\n \\draw(1, -0.2) node [below] {$-1$};\n\n %lines\n\\end{tikzp\ -icture}\n\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}\n\n %block number 1\n\ - %vertices and labels\n \\fill(1, 2)circle(.125);\n \\draw(0.94999999999999\ -996, 2.2) node [above] {$1$};\n\n %lines\n\n %block number 2\n %vertices an\ -d labels\n \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2) node [above] {$2$};\ -\n \\fill(1, 0)circle(.125);\n \\draw(1, -0.2) node [below] {$-1$};\n\n %li\ -nes\n \\draw(2, 2)--(1, 0);\n\n %block number 3\n %vertices and labels\n \ -\\fill(2, 0)circle(.125);\n \\draw(2, -0.2) node [below] {$-2$};\n\n %lines\ -\n\\end{tikzpicture}\n\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}\n\n %blo\ -ck number 1\n %vertices and labels\n \\fill(1, 2)circle(.125);\n \\draw(0.9\ -4999999999999996, 2.2) node [above] {$1$};\n\n %lines\n\n %block number 2\n \ - %vertices and labels\n \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2) node [\ -above] {$2$};\n \\fill(1, 0)circle(.125);\n \\draw(1, -0.2) node [below] {$-\ -1$};\n \\fill(2, 0)circle(.125);\n \\draw(2, -0.2) node [below] {$-2$};\n\n \ - %lines\n \\draw(1, 0.125) .. controls (1, 0.75) and (2, 0.75) .. (2, 0.125);\ -\n \\draw(2, 2)--(2, 0);\n\\end{tikzpicture}\n\n\n\\bigskip\\bigskip\n\n\\beg\ -in{tikzpicture}\n\n %block number 1\n %vertices and labels\n \\fill(1, 2)ci\ -rcle(.125);\n \\draw(0.94999999999999996, 2.2) node [above] {$1$};\n \\fill(\ -2, 2)circle(.125);\n \\draw(1.95, 2.2) node [above] {$2$};\n \\fill(2, 0)cir\ +"1\n2\n3\n4\n5\n\\begin{center}\n\\begin{tikzpicture}\n\n %block number 1\n \ +%vertices and labels\n \\fill(1, 2)circle(.125);\n \\draw(0.9499999999999999\ +6, 2.2) node [above] {$1$};\n \\fill(1, 0)circle(.125);\n \\draw(1, -0.2) no\ +de [below] {$-1$};\n\n %lines\n \\draw(1, 2)--(1, 0);\n\n %block number 2\n\ + %vertices and labels\n \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2) node \ +[above] {$2$};\n \\fill(2, 0)circle(.125);\n \\draw(2, -0.2) node [below] {$\ +-2$};\n\n %lines\n \\draw(2, 2)--(2, 0);\n\\end{tikzpicture}\n\n\n\\bigskip\ +\\bigskip\n\n\\begin{tikzpicture}\n\n %block number 1\n %vertices and labels\ +\n \\fill(1, 2)circle(.125);\n \\draw(0.94999999999999996, 2.2) node [above]\ + {$1$};\n \\fill(2, 0)circle(.125);\n \\draw(2, -0.2) node [below] {$-2$};\n\ +\n %lines\n \\draw(1, 2)--(2, 0);\n\n %block number 2\n %vertices and labe\ +ls\n \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2) node [above] {$2$};\n \\\ +fill(1, 0)circle(.125);\n \\draw(1, -0.2) node [below] {$-1$};\n\n %lines\n \ + \\draw(2, 2)--(1, 0);\n\\end{tikzpicture}\n\n\n\\bigskip\\bigskip\n\n\\begin{\ +tikzpicture}\n\n %block number 1\n %vertices and labels\n \\fill(1, 2)circl\ +e(.125);\n \\draw(0.94999999999999996, 2.2) node [above] {$1$};\n\n %lines\n\ +\n %block number 2\n %vertices and labels\n \\fill(2, 2)circle(.125);\n \\\ +draw(1.95, 2.2) node [above] {$2$};\n \\fill(2, 0)circle(.125);\n \\draw(2, \ +-0.2) node [below] {$-2$};\n\n %lines\n \\draw(2, 2)--(2, 0);\n\n %block nu\ +mber 3\n %vertices and labels\n \\fill(1, 0)circle(.125);\n \\draw(1, -0.2)\ + node [below] {$-1$};\n\n %lines\n\\end{tikzpicture}\n\n\n\\bigskip\\bigskip\ +\n\n\\begin{tikzpicture}\n\n %block number 1\n %vertices and labels\n \\fil\ +l(1, 2)circle(.125);\n \\draw(0.94999999999999996, 2.2) node [above] {$1$};\n\ + \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2) node [above] {$2$};\n \\fill\ +(1, 0)circle(.125);\n \\draw(1, -0.2) node [below] {$-1$};\n \\fill(2, 0)cir\ cle(.125);\n \\draw(2, -0.2) node [below] {$-2$};\n\n %lines\n \\draw(1, 1.\ -875) .. controls (1, 1.25) and (2, 1.25) .. (2, 1.875);\n \\draw(2, 2)--(2, 0\ -);\n\n %block number 2\n %vertices and labels\n \\fill(1, 0)circle(.125);\n\ - \\draw(1, -0.2) node [below] {$-1$};\n\n %lines\n\\end{tikzpicture}\n\n\n\\\ -bigskip\\bigskip\n\n\\begin{tikzpicture}\n\n %block number 1\n %vertices and\ - labels\n \\fill(1, 2)circle(.125);\n \\draw(0.94999999999999996, 2.2) node \ -[above] {$1$};\n \\fill(1, 0)circle(.125);\n \\draw(1, -0.2) node [below] {$\ --1$};\n\n %lines\n \\draw(1, 2)--(1, 0);\n\n %block number 2\n %vertices a\ -nd labels\n \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2) node [above] {$2$}\ -;\n\n %lines\n\n %block number 3\n %vertices and labels\n \\fill(2, 0)circ\ -le(.125);\n \\draw(2, -0.2) node [below] {$-2$};\n\n %lines\n\\end{tikzpictu\ -re}\n\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}\n\n %block number 1\n %v\ -ertices and labels\n \\fill(1, 2)circle(.125);\n \\draw(0.94999999999999996,\ - 2.2) node [above] {$1$};\n \\fill(1, 0)circle(.125);\n \\draw(1, -0.2) node\ - [below] {$-1$};\n \\fill(2, 0)circle(.125);\n \\draw(2, -0.2) node [below] \ -{$-2$};\n\n %lines\n \\draw(1, 0.125) .. controls (1, 0.75) and (2, 0.75) ..\ - (2, 0.125);\n \\draw(1, 2)--(1, 0);\n\n %block number 2\n %vertices and la\ -bels\n \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2) node [above] {$2$};\n\n\ - %lines\n\\end{tikzpicture}\n\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}\n\ -\n %block number 1\n %vertices and labels\n \\fill(1, 2)circle(.125);\n \\\ -draw(0.94999999999999996, 2.2) node [above] {$1$};\n\n %lines\n\n %block num\ -ber 2\n %vertices and labels\n \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2\ -) node [above] {$2$};\n\n %lines\n\n %block number 3\n %vertices and labels\ -\n \\fill(1, 0)circle(.125);\n \\draw(1, -0.2) node [below] {$-1$};\n\n %li\ -nes\n\n %block number 4\n %vertices and labels\n \\fill(2, 0)circle(.125);\ -\n \\draw(2, -0.2) node [below] {$-2$};\n\n %lines\n\\end{tikzpicture}\n\n\n\ -\\bigskip\\bigskip\n\n\\begin{tikzpicture}\n\n %block number 1\n %vertices a\ -nd labels\n \\fill(1, 2)circle(.125);\n \\draw(0.94999999999999996, 2.2) nod\ -e [above] {$1$};\n \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2) node [above\ -] {$2$};\n \\fill(1, 0)circle(.125);\n \\draw(1, -0.2) node [below] {$-1$};\ -\n\n %lines\n \\draw(1, 1.875) .. controls (1, 1.25) and (2, 1.25) .. (2, 1.\ -875);\n \\draw(1, 2)--(1, 0);\n\n %block number 2\n %vertices and labels\n \ - \\fill(2, 0)circle(.125);\n \\draw(2, -0.2) node [below] {$-2$};\n\n %lines\ -\n\\end{tikzpicture}\n\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}\n\n %blo\ -ck number 1\n %vertices and labels\n \\fill(1, 2)circle(.125);\n \\draw(0.9\ -4999999999999996, 2.2) node [above] {$1$};\n\n %lines\n\n %block number 2\n \ - %vertices and labels\n \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2) node [\ -above] {$2$};\n\n %lines\n\n %block number 3\n %vertices and labels\n \\fi\ -ll(1, 0)circle(.125);\n \\draw(1, -0.2) node [below] {$-1$};\n \\fill(2, 0)c\ -ircle(.125);\n \\draw(2, -0.2) node [below] {$-2$};\n\n %lines\n \\draw(1, \ -0.125) .. controls (1, 0.75) and (2, 0.75) .. (2, 0.125);\n\\end{tikzpicture}\ -\n\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}\n\n %block number 1\n %vert\ -ices and labels\n \\fill(1, 2)circle(.125);\n \\draw(0.94999999999999996, 2.\ -2) node [above] {$1$};\n \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2) node \ -[above] {$2$};\n\n %lines\n \\draw(1, 1.875) .. controls (1, 1.25) and (2, 1\ -.25) .. (2, 1.875);\n\n %block number 2\n %vertices and labels\n \\fill(1, \ -0)circle(.125);\n \\draw(1, -0.2) node [below] {$-1$};\n\n %lines\n\n %bloc\ -k number 3\n %vertices and labels\n \\fill(2, 0)circle(.125);\n \\draw(2, -\ -0.2) node [below] {$-2$};\n\n %lines\n\\end{tikzpicture}\n\n\n\\bigskip\\bigs\ -kip\n\n\\begin{tikzpicture}\n\n %block number 1\n %vertices and labels\n \\\ -fill(1, 2)circle(.125);\n \\draw(0.94999999999999996, 2.2) node [above] {$1$}\ -;\n \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2) node [above] {$2$};\n\n %\ -lines\n \\draw(1, 1.875) .. controls (1, 1.25) and (2, 1.25) .. (2, 1.875);\n\ -\n %block number 2\n %vertices and labels\n \\fill(1, 0)circle(.125);\n \\\ -draw(1, -0.2) node [below] {$-1$};\n \\fill(2, 0)circle(.125);\n \\draw(2, -\ -0.2) node [below] {$-2$};\n\n %lines\n \\draw(1, 0.125) .. controls (1, 0.75\ -) and (2, 0.75) .. (2, 0.125);\n\\end{tikzpicture}\n\n\n\\bigskip\\bigskip\n\n\ -\\end{center}\\end{document}" +875) .. controls (1, 1.25) and (2, 1.25) .. (2, 1.875);\n \\draw(1, 0.125) ..\ + controls (1, 0.75) and (2, 0.75) .. (2, 0.125);\n \\draw(1, 2)--(1, 0);\n\\e\ +nd{tikzpicture}\n\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}\n\n %block nu\ +mber 1\n %vertices and labels\n \\fill(1, 2)circle(.125);\n \\draw(0.949999\ +99999999996, 2.2) node [above] {$1$};\n \\fill(2, 0)circle(.125);\n \\draw(2\ +, -0.2) node [below] {$-2$};\n\n %lines\n \\draw(1, 2)--(2, 0);\n\n %block \ +number 2\n %vertices and labels\n \\fill(2, 2)circle(.125);\n \\draw(1.95, \ +2.2) node [above] {$2$};\n\n %lines\n\n %block number 3\n %vertices and lab\ +els\n \\fill(1, 0)circle(.125);\n \\draw(1, -0.2) node [below] {$-1$};\n\n \ +%lines\n\\end{tikzpicture}\n\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}\n\n\ + %block number 1\n %vertices and labels\n \\fill(1, 2)circle(.125);\n \\dr\ +aw(0.94999999999999996, 2.2) node [above] {$1$};\n\n %lines\n\n %block numbe\ +r 2\n %vertices and labels\n \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2) \ +node [above] {$2$};\n \\fill(1, 0)circle(.125);\n \\draw(1, -0.2) node [belo\ +w] {$-1$};\n\n %lines\n \\draw(2, 2)--(1, 0);\n\n %block number 3\n %verti\ +ces and labels\n \\fill(2, 0)circle(.125);\n \\draw(2, -0.2) node [below] {$\ +-2$};\n\n %lines\n\\end{tikzpicture}\n\n\n\\bigskip\\bigskip\n\n\\begin{tikzp\ +icture}\n\n %block number 1\n %vertices and labels\n \\fill(1, 2)circle(.12\ +5);\n \\draw(0.94999999999999996, 2.2) node [above] {$1$};\n\n %lines\n\n %\ +block number 2\n %vertices and labels\n \\fill(2, 2)circle(.125);\n \\draw(\ +1.95, 2.2) node [above] {$2$};\n \\fill(1, 0)circle(.125);\n \\draw(1, -0.2)\ + node [below] {$-1$};\n \\fill(2, 0)circle(.125);\n \\draw(2, -0.2) node [be\ +low] {$-2$};\n\n %lines\n \\draw(1, 0.125) .. controls (1, 0.75) and (2, 0.7\ +5) .. (2, 0.125);\n \\draw(2, 2)--(2, 0);\n\\end{tikzpicture}\n\n\n\\bigskip\ +\\bigskip\n\n\\begin{tikzpicture}\n\n %block number 1\n %vertices and labels\ +\n \\fill(1, 2)circle(.125);\n \\draw(0.94999999999999996, 2.2) node [above]\ + {$1$};\n \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2) node [above] {$2$};\ +\n \\fill(2, 0)circle(.125);\n \\draw(2, -0.2) node [below] {$-2$};\n\n %li\ +nes\n \\draw(1, 1.875) .. controls (1, 1.25) and (2, 1.25) .. (2, 1.875);\n \ +\\draw(2, 2)--(2, 0);\n\n %block number 2\n %vertices and labels\n \\fill(1\ +, 0)circle(.125);\n \\draw(1, -0.2) node [below] {$-1$};\n\n %lines\n\\end{t\ +ikzpicture}\n\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}\n\n %block number\ + 1\n %vertices and labels\n \\fill(1, 2)circle(.125);\n \\draw(0.9499999999\ +9999996, 2.2) node [above] {$1$};\n \\fill(1, 0)circle(.125);\n \\draw(1, -0\ +.2) node [below] {$-1$};\n\n %lines\n \\draw(1, 2)--(1, 0);\n\n %block numb\ +er 2\n %vertices and labels\n \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2)\ + node [above] {$2$};\n\n %lines\n\n %block number 3\n %vertices and labels\ +\n \\fill(2, 0)circle(.125);\n \\draw(2, -0.2) node [below] {$-2$};\n\n %li\ +nes\n\\end{tikzpicture}\n\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}\n\n %\ +block number 1\n %vertices and labels\n \\fill(1, 2)circle(.125);\n \\draw(\ +0.94999999999999996, 2.2) node [above] {$1$};\n \\fill(1, 0)circle(.125);\n \ +\\draw(1, -0.2) node [below] {$-1$};\n \\fill(2, 0)circle(.125);\n \\draw(2,\ + -0.2) node [below] {$-2$};\n\n %lines\n \\draw(1, 0.125) .. controls (1, 0.\ +75) and (2, 0.75) .. (2, 0.125);\n \\draw(1, 2)--(1, 0);\n\n %block number 2\ +\n %vertices and labels\n \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2) nod\ +e [above] {$2$};\n\n %lines\n\\end{tikzpicture}\n\n\n\\bigskip\\bigskip\n\n\\\ +begin{tikzpicture}\n\n %block number 1\n %vertices and labels\n \\fill(1, 2\ +)circle(.125);\n \\draw(0.94999999999999996, 2.2) node [above] {$1$};\n\n %l\ +ines\n\n %block number 2\n %vertices and labels\n \\fill(2, 2)circle(.125);\ +\n \\draw(1.95, 2.2) node [above] {$2$};\n\n %lines\n\n %block number 3\n \ +%vertices and labels\n \\fill(1, 0)circle(.125);\n \\draw(1, -0.2) node [bel\ +ow] {$-1$};\n\n %lines\n\n %block number 4\n %vertices and labels\n \\fill\ +(2, 0)circle(.125);\n \\draw(2, -0.2) node [below] {$-2$};\n\n %lines\n\\end\ +{tikzpicture}\n\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}\n\n %block numb\ +er 1\n %vertices and labels\n \\fill(1, 2)circle(.125);\n \\draw(0.94999999\ +999999996, 2.2) node [above] {$1$};\n \\fill(2, 2)circle(.125);\n \\draw(1.9\ +5, 2.2) node [above] {$2$};\n \\fill(1, 0)circle(.125);\n \\draw(1, -0.2) no\ +de [below] {$-1$};\n\n %lines\n \\draw(1, 1.875) .. controls (1, 1.25) and (\ +2, 1.25) .. (2, 1.875);\n \\draw(1, 2)--(1, 0);\n\n %block number 2\n %vert\ +ices and labels\n \\fill(2, 0)circle(.125);\n \\draw(2, -0.2) node [below] {\ +$-2$};\n\n %lines\n\\end{tikzpicture}\n\n\n\\bigskip\\bigskip\n\n\\begin{tikz\ +picture}\n\n %block number 1\n %vertices and labels\n \\fill(1, 2)circle(.1\ +25);\n \\draw(0.94999999999999996, 2.2) node [above] {$1$};\n\n %lines\n\n \ +%block number 2\n %vertices and labels\n \\fill(2, 2)circle(.125);\n \\draw\ +(1.95, 2.2) node [above] {$2$};\n\n %lines\n\n %block number 3\n %vertices \ +and labels\n \\fill(1, 0)circle(.125);\n \\draw(1, -0.2) node [below] {$-1$}\ +;\n \\fill(2, 0)circle(.125);\n \\draw(2, -0.2) node [below] {$-2$};\n\n %l\ +ines\n \\draw(1, 0.125) .. controls (1, 0.75) and (2, 0.75) .. (2, 0.125);\n\ +\\end{tikzpicture}\n\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}\n\n %block\ + number 1\n %vertices and labels\n \\fill(1, 2)circle(.125);\n \\draw(0.949\ +99999999999996, 2.2) node [above] {$1$};\n \\fill(2, 2)circle(.125);\n \\dra\ +w(1.95, 2.2) node [above] {$2$};\n\n %lines\n \\draw(1, 1.875) .. controls (\ +1, 1.25) and (2, 1.25) .. (2, 1.875);\n\n %block number 2\n %vertices and la\ +bels\n \\fill(1, 0)circle(.125);\n \\draw(1, -0.2) node [below] {$-1$};\n\n \ + %lines\n\n %block number 3\n %vertices and labels\n \\fill(2, 0)circle(.12\ +5);\n \\draw(2, -0.2) node [below] {$-2$};\n\n %lines\n\\end{tikzpicture}\n\ +\n\n\\bigskip\\bigskip\n\n\\begin{tikzpicture}\n\n %block number 1\n %vertic\ +es and labels\n \\fill(1, 2)circle(.125);\n \\draw(0.94999999999999996, 2.2)\ + node [above] {$1$};\n \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2) node [a\ +bove] {$2$};\n\n %lines\n \\draw(1, 1.875) .. controls (1, 1.25) and (2, 1.2\ +5) .. (2, 1.875);\n\n %block number 2\n %vertices and labels\n \\fill(1, 0)\ +circle(.125);\n \\draw(1, -0.2) node [below] {$-1$};\n \\fill(2, 0)circle(.1\ +25);\n \\draw(2, -0.2) node [below] {$-2$};\n\n %lines\n \\draw(1, 0.125) .\ +. controls (1, 0.75) and (2, 0.75) .. (2, 0.125);\n\\end{tikzpicture}\n\n\n\\b\ +igskip\\bigskip\n\n\\end{center}\\end{document}" # Test TikzString for a bipartition gap> TikzString(Bipartition([[1, 3], [2, -1], [-2, -3]])); -"%latex\n\\documentclass{minimal}\n\\usepackage{tikz}\n\n\\begin{document}\n\\\ -begin{tikzpicture}\n\n %block number 1\n %vertices and labels\n \\fill(1, 2\ -)circle(.125);\n \\draw(0.94999999999999996, 2.2) node [above] {$1$};\n \\fi\ -ll(3, 2)circle(.125);\n \\draw(2.9500000000000002, 2.2) node [above] {$3$};\n\ -\n %lines\n \\draw(1, 1.875) .. controls (1, 1.1666666666666667) and (3, 1.1\ -666666666666667) .. (3, 1.875);\n\n %block number 2\n %vertices and labels\n\ - \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2) node [above] {$2$};\n \\fill\ -(1, 0)circle(.125);\n \\draw(1, -0.2) node [below] {$-1$};\n\n %lines\n \\d\ -raw(2, 2)--(1, 0);\n\n %block number 3\n %vertices and labels\n \\fill(2, 0\ -)circle(.125);\n \\draw(2, -0.2) node [below] {$-2$};\n \\fill(3, 0)circle(.\ -125);\n \\draw(3, -0.2) node [below] {$-3$};\n\n %lines\n \\draw(2, 0.125) \ -.. controls (2, 0.66666666666666663) and (3, 0.66666666666666663) .. (3, 0.125\ -);\n\\end{tikzpicture}\n\n\\end{document}" +"1\n2\n3\n4\n5\n\\begin{tikzpicture}\n\n %block number 1\n %vertices and lab\ +els\n \\fill(1, 2)circle(.125);\n \\draw(0.94999999999999996, 2.2) node [abo\ +ve] {$1$};\n \\fill(3, 2)circle(.125);\n \\draw(2.9500000000000002, 2.2) nod\ +e [above] {$3$};\n\n %lines\n \\draw(1, 1.875) .. controls (1, 1.16666666666\ +66667) and (3, 1.1666666666666667) .. (3, 1.875);\n\n %block number 2\n %ver\ +tices and labels\n \\fill(2, 2)circle(.125);\n \\draw(1.95, 2.2) node [above\ +] {$2$};\n \\fill(1, 0)circle(.125);\n \\draw(1, -0.2) node [below] {$-1$};\ +\n\n %lines\n \\draw(2, 2)--(1, 0);\n\n %block number 3\n %vertices and la\ +bels\n \\fill(2, 0)circle(.125);\n \\draw(2, -0.2) node [below] {$-2$};\n \ +\\fill(3, 0)circle(.125);\n \\draw(3, -0.2) node [below] {$-3$};\n\n %lines\ +\n \\draw(2, 0.125) .. controls (2, 0.66666666666666663) and (3, 0.6666666666\ +6666663) .. (3, 0.125);\n\\end{tikzpicture}\n\n\\end{document}" gap> TikzString(Bipartition([[1, 3], [2, -1], [-2, -3]]), > rec(colors := true, labels := true, beginDocument := true, > endDocument := true)); -"%latex\n\\documentclass{minimal}\n\\usepackage{tikz}\n\n\\begin{document}\n\\\ -begin{tikzpicture}\n\n %block number 1\n %vertices and labels\n \\fill[red]\ -(1, 2)circle(.125);\n \\draw[red](0.94999999999999996, 2.2) node [above] {$1$\ -};\n \\fill[red](3, 2)circle(.125);\n \\draw[red](2.9500000000000002, 2.2) n\ -ode [above] {$3$};\n\n %lines\n \\draw[red](1, 1.875) .. controls (1, 1.1666\ -666666666667) and (3, 1.1666666666666667) .. (3, 1.875);\n\n %block number 2\ -\n %vertices and labels\n \\fill[green](2, 2)circle(.125);\n \\draw[green](\ -1.95, 2.2) node [above] {$2$};\n \\fill[green](1, 0)circle(.125);\n \\draw[g\ -reen](1, -0.2) node [below] {$-1$};\n\n %lines\n \\draw[green](2, 2)--(1, 0)\ -;\n\n %block number 3\n %vertices and labels\n \\fill[blue](2, 0)circle(.12\ -5);\n \\draw[blue](2, -0.2) node [below] {$-2$};\n \\fill[blue](3, 0)circle(\ -.125);\n \\draw[blue](3, -0.2) node [below] {$-3$};\n\n %lines\n \\draw[blu\ -e](2, 0.125) .. controls (2, 0.66666666666666663) and (3, 0.66666666666666663)\ - .. (3, 0.125);\n\\end{tikzpicture}\n\n\\end{document}" +"1\n2\n3\n4\n5\n\\begin{tikzpicture}\n\n %block number 1\n %vertices and lab\ +els\n \\fill[red](1, 2)circle(.125);\n \\draw[red](0.94999999999999996, 2.2)\ + node [above] {$1$};\n \\fill[red](3, 2)circle(.125);\n \\draw[red](2.950000\ +0000000002, 2.2) node [above] {$3$};\n\n %lines\n \\draw[red](1, 1.875) .. c\ +ontrols (1, 1.1666666666666667) and (3, 1.1666666666666667) .. (3, 1.875);\n\n\ + %block number 2\n %vertices and labels\n \\fill[green](2, 2)circle(.125);\ +\n \\draw[green](1.95, 2.2) node [above] {$2$};\n \\fill[green](1, 0)circle(\ +.125);\n \\draw[green](1, -0.2) node [below] {$-1$};\n\n %lines\n \\draw[gr\ +een](2, 2)--(1, 0);\n\n %block number 3\n %vertices and labels\n \\fill[blu\ +e](2, 0)circle(.125);\n \\draw[blue](2, -0.2) node [below] {$-2$};\n \\fill[\ +blue](3, 0)circle(.125);\n \\draw[blue](3, -0.2) node [below] {$-3$};\n\n %l\ +ines\n \\draw[blue](2, 0.125) .. controls (2, 0.66666666666666663) and (3, 0.\ +66666666666666663) .. (3, 0.125);\n\\end{tikzpicture}\n\n\\end{document}" # Test DotString for a semigroup gap> DotString(RegularBooleanMatMonoid(3)); diff --git a/tst/testinstall.tst b/tst/testinstall.tst index b87c40e8c..a44d7cba5 100644 --- a/tst/testinstall.tst +++ b/tst/testinstall.tst @@ -1001,7 +1001,7 @@ false # TestInstall63: Issue 127: # Bug in Enumerate for an acting semigroup ideal that knows it is regular at its -# point of creation. +# point of creation. gap> S := Semigroup([[[Z(2) ^ 0, 0 * Z(2), 0 * Z(2), 0 * Z(2)], > [0 * Z(2), Z(2) ^ 0, 0 * Z(2), 0 * Z(2)], > [0 * Z(2), 0 * Z(2), Z(2) ^ 0, 0 * Z(2)], @@ -1023,7 +1023,7 @@ gap> I := SemigroupIdeal(T, Idempotents(T));; gap> Size(I); 21 -# TestInstall64: Bug fixed by changeset 949553d +# TestInstall64: Bug fixed by changeset 949553d gap> S := InverseSemigroup(PartialPerm([1], [2]), PartialPerm([2], [1])); gap> Size(S); @@ -1072,7 +1072,7 @@ gap> hom := HomomorphismQuotientSemigroup(ReesCongruenceOfSemigroupIdeal(I));; gap> map := IsomorphismTransformationSemigroup(Range(hom));; # Checking for correct non-removal of one from generating sets in -# SemigroupByGenerators +# SemigroupByGenerators gap> S := Semigroup(PartialPerm([1])); gap> GeneratorsOfSemigroup(S); @@ -1091,7 +1091,7 @@ gap> GeneratorsOfMonoid(S); [ IdentityTransformation ] # Checking for correct non-removal of one from generating sets in -# MonoidByGenerators +# MonoidByGenerators gap> S := Monoid(PartialPerm([1])); gap> S := Monoid(PartialPerm([1])); @@ -1573,8 +1573,8 @@ gap> x := 0;; gap> for x in [1 .. Length(gns) - 1] do > Append(rel, List(gns, y -> [gns[x] * y, y * gns[x]])); > Add(rel, [gns[x] ^ (x + 1), gns[x]]); -> Add(rel, [gns[x] * gns[Length(gns)], gns[x]]); -> Add(rel, [gns[Length(gns)] * gns[x], gns[x]]); +> Add(rel, [gns[x] * Last(gns), gns[x]]); +> Add(rel, [Last(gns) * gns[x], gns[x]]); > od; gap> s := f / rel;; gap> sgns := GeneratorsOfSemigroup(s);; @@ -1635,7 +1635,7 @@ gap> NrEquivalenceClasses(cong); 3 # Issue 300: problem with InverseOfSemigroupElement for an acting monoid -gap> S := Monoid(Transformation([1, 2, 4, 4]), +gap> S := Monoid(Transformation([1, 2, 4, 4]), > Transformation([4, 2, 3, 4]), > Transformation([1, 4, 3, 4]));; gap> IsEUnitaryInverseSemigroup(S); @@ -1701,7 +1701,7 @@ true # Issue 389: NaturalPartialOrder gap> S := Semigroup(SymmetricInverseMonoid(3), rec(acting := true));; -gap> es := IdempotentGeneratedSubsemigroup(S);; +gap> es := IdempotentGeneratedSubsemigroup(S);; gap> NaturalPartialOrder(es); [ [ ], [ 1 ], [ 1 ], [ 1, 2, 3 ], [ 1 ], [ 1, 3, 5 ], [ 1, 2, 5 ], [ 1, 2, 3, 4, 5, 6, 7 ] ] @@ -1771,7 +1771,7 @@ gap> NonTrivialEquivalenceClasses(cong); # Issue 680 gap> F := FreeSemigroup(2);; gap> s1 := F.1;; s2 := F.2;; -gap> rels := [[s2 * s1 * s2, s2 * s1], [s1, s1], [s2, s2], +gap> rels := [[s2 * s1 * s2, s2 * s1], [s1, s1], [s2, s2], > [s1 * s2, s1 * s2], [s2 * s1, s2 * s1]];; gap> cong := SemigroupCongruence(F, rels); <2-sided semigroup congruence over