Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/semigroups/tst/extreme/   (GAP Algebra Version 4.15.1©)  Datei vom 29.7.2025 mit Größe 37 kB image not shown  

Quelle  maximal.tst   Sprache: unbekannt

 
Spracherkennung für: .tst vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

############################################################################
##
#W  extreme/maximal.tst
#Y  Copyright (C) 2013-16                                   Wilf A. Wilson
##
##  Licensing information can be found in the README file of this package.
##
#############################################################################
##

#@local B, C, G, R, R1, R2, R3, S, T, T3, U, a, acting, an, correct, gens, mat
#@local max, s1, s2, t1, t2
gap> START_TEST("Semigroups package: extreme/maximal.tst");
gap> LoadPackage("semigroups", false);;

#
gap> SEMIGROUPS.StartTest();;

# MaximalTest1: IsMaximalSubsemigroup
gap> S := Semigroup([
>   Transformation([12441]),
>   Transformation([4414]),
>   Transformation([51423])]);
<transformation semigroup of degree 5 with 3 generators>
gap> T := Semigroup([
>   Transformation([51423]),
>   Transformation([44241]),
>   Transformation([31222])]);
<transformation semigroup of degree 5 with 3 generators>
gap> IsMaximalSubsemigroup(S, T);
true
gap> U := Semigroup([
>   Transformation([55115]),
>   Transformation([22343]),
>   Transformation([34543])]);
<transformation semigroup of degree 5 with 3 generators>
gap> IsSubsemigroup(S, U);
true
gap> IsMaximalSubsemigroup(S, U);
false
gap> IsSubsemigroup(U, S);
false
gap> IsMaximalSubsemigroup(U, S);
false
gap> IsSubsemigroup(S, S);
true
gap> S <> S;
false
gap> IsMaximalSubsemigroup(S, S);
false

# MaximalTest2: MaximalSubsemigroups for a Rees matrix semigroup
gap> G := Group([(12), (34)]);
Group([ (1,2), (3,4) ])
gap> mat := [[(), (12), (12)(34)], [(), (12), ()]];;
gap> R := ReesMatrixSemigroup(G, mat);  # 3x2 RMS over C2 x C2
<Rees matrix semigroup 3x2 over Group([ (1,2), (3,4) ])>
gap> max := MaximalSubsemigroups(R);
[ <Rees matrix semigroup 3x1 over Group([ (1,2), (3,4) ])>, 
  <Rees matrix semigroup 3x1 over Group([ (1,2), (3,4) ])>, 
  <Rees matrix semigroup 2x2 over Group([ (1,2), (3,4) ])>, 
  <Rees matrix semigroup 2x2 over Group([ (1,2), (3,4) ])>, 
  <Rees matrix semigroup 2x2 over Group([ (1,2), (3,4) ])>, 
  <subsemigroup of 3x2 Rees matrix semigroup with 3 generators> ]
gap> NrMaximalSubsemigroups(R);
6
gap> G := Group([(123)]);
Group([ (1,2,3) ])
gap> mat := [[(), (123)], [(), (123)]];;
gap> R := ReesMatrixSemigroup(G, mat);  # 2x2 RMS over C3
<Rees matrix semigroup 2x2 over Group([ (1,2,3) ])>
gap> max := MaximalSubsemigroups(R);
[ <Rees matrix semigroup 2x1 over Group([ (1,2,3) ])>, 
  <Rees matrix semigroup 2x1 over Group([ (1,2,3) ])>, 
  <Rees matrix semigroup 1x2 over Group([ (1,2,3) ])>, 
  <Rees matrix semigroup 1x2 over Group([ (1,2,3) ])>, 
  <subsemigroup of 2x2 Rees matrix semigroup with 2 generators> ]
gap> G := Group([(123), (12)]);;
gap> mat := [[(), (132)], [(13), (23)], [(123), ()]];;
gap> R := ReesMatrixSemigroup(G, mat);  # 2x3 RMS over Sym(3)
<Rees matrix semigroup 2x3 over Group([ (1,2,3), (1,2) ])>
gap> max := MaximalSubsemigroups(R);
[ <Rees matrix semigroup 2x2 over Group([ (1,2,3), (1,2) ])>, 
  <Rees matrix semigroup 2x2 over Group([ (1,2,3), (1,2) ])>, 
  <Rees matrix semigroup 2x2 over Group([ (1,2,3), (1,2) ])>, 
  <Rees matrix semigroup 1x3 over Group([ (1,2,3), (1,2) ])>, 
  <Rees matrix semigroup 1x3 over Group([ (1,2,3), (1,2) ])>, 
  <subsemigroup of 2x3 Rees matrix semigroup with 3 generators> ]
gap> S := max[6];  # a non-RMS subsemigroup of an RMS
<subsemigroup of 2x3 Rees matrix semigroup with 3 generators>
gap> IsReesMatrixSubsemigroup(S);
true
gap> IsReesMatrixSemigroup(S);
false
gap> IsRegularSemigroup(S);
true
gap> max := MaximalSubsemigroups(S);;
gap> NrMaximalSubsemigroups(S);
5
gap> IsDuplicateFreeList(max);
true
gap> T := FullTransformationMonoid(3);;
gap> mat := [[Transformation([323])]];;
gap> R := ReesMatrixSemigroup(T, mat);  # 1x1 RMS over a non-group semigroup
<Rees matrix semigroup 1x1 over <full transformation monoid of degree 3>>
gap> IsReesMatrixSubsemigroup(R);
true
gap> IsReesMatrixSemigroup(R);
true
gap> IsGroup(T);
false
gap> IsSimpleSemigroup(T);
false
gap> NrMaximalSubsemigroups(R);
6
gap> S := Semigroup([
> Transformation([121]),
> Transformation([122])]);
<transformation semigroup of degree 3 with 2 generators>
gap> mat := [[Transformation([121])]];;
gap> R := ReesMatrixSemigroup(S, mat);  # simple 1x1 RMS over non-group semigroup
<Rees matrix semigroup 1x1 over <transformation semigroup of degree 3 with 2 
  generators>>
gap> IsReesMatrixSubsemigroup(R);
true
gap> IsReesMatrixSemigroup(R);
true
gap> IsGroup(S);
false
gap> IsSimpleSemigroup(S);
true
gap> MaximalSubsemigroups(R);
[ <subsemigroup of 1x1 Rees matrix semigroup with 1 generator>, 
  <subsemigroup of 1x1 Rees matrix semigroup with 1 generator> ]

# MaximalTest4: MaximalSubsemigroups for a Rees 0-matrix semigroup
gap> R := ReesZeroMatrixSemigroup(Group(()), [[0]]);  # a non-regular RZMS
<Rees 0-matrix semigroup 1x1 over Group(())>
gap> MaximalSubsemigroups(R);
[ <commutative Rees 0-matrix semigroup ideal with 1 generator> ]
gap> R1 := ReesZeroMatrixSemigroup(Group(()), [[()]]);  # 2-elt regular RZMS
<Rees 0-matrix semigroup 1x1 over Group(())>
gap> MaximalSubsemigroups(R1);
[ <subsemigroup of 1x1 Rees 0-matrix semigroup with 1 generator>, 
  <subsemigroup of 1x1 Rees 0-matrix semigroup with 1 generator> ]
gap> R2 := last[2];  # RZMS subsemigroup, but not itself a RZMS
<subsemigroup of 1x1 Rees 0-matrix semigroup with 1 generator>
gap> IsReesZeroMatrixSubsemigroup(R2);
true
gap> IsReesZeroMatrixSemigroup(R2);
false
gap> MaximalSubsemigroups(R2);
[  ]
gap> s1 := Transformation([121]);;
gap> s2 := Transformation([122]);;
gap> S := Semigroup([s1, s2]);
<transformation semigroup of degree 3 with 2 generators>
gap> R := ReesZeroMatrixSemigroup(S, [[s1]]);  # 0-simple RZMS over non-gp
<Rees 0-matrix semigroup 1x1 over <transformation semigroup of size 2
  degree 3 with 2 generators>>
gap> IsReesZeroMatrixSemigroup(R);
true
gap> IsRegularSemigroup(R);
true
gap> G := UnderlyingSemigroup(R);
<transformation semigroup of size 2, degree 3 with 2 generators>
gap> IsGroup(G);
false
gap> IsZeroSimpleSemigroup(R);
true
gap> MaximalSubsemigroups(R);
[ <subsemigroup of 1x1 Rees 0-matrix semigroup with 2 generators>, 
  <subsemigroup of 1x1 Rees 0-matrix semigroup with 2 generators>, 
  <subsemigroup of 1x1 Rees 0-matrix semigroup with 2 generators> ]
gap> t1 := Transformation([4313]);;
gap> t2 := Transformation([3322]);;
gap> T := Semigroup([t1, t2]);
<transformation semigroup of degree 4 with 2 generators>
gap> IsRegularSemigroup(T);
true
gap> IsGroup(T);
false
gap> mat := [[t2, t1], [t1, t2]];;
gap> R3 := ReesZeroMatrixSemigroup(T, mat);  # a RZMS over a non-group semigroup
<Rees 0-matrix semigroup 2x2 over <regular transformation semigroup 
  of size 39, degree 4 with 2 generators>>
gap> IsReesZeroMatrixSubsemigroup(R3);
true
gap> IsReesZeroMatrixSemigroup(R3);
true
gap> IsRegularSemigroup(R3);
true
gap> max := MaximalSubsemigroups(R3);;
gap> NrMaximalSubsemigroups(R3);
10
gap> IsDuplicateFreeList(max);
true
gap> G := Group([(12), (123)]);;
gap> mat := [[(12), 0], [0, (23)]];;
gap> R := ReesZeroMatrixSemigroup(G, mat);  # un-connected 2x2 inverse RZMS / S3
<Rees 0-matrix semigroup 2x2 over Group([ (1,2), (1,2,3) ])>
gap> max := MaximalSubsemigroups(R);
[ <subsemigroup of 2x2 Rees 0-matrix semigroup with 5 generators>, 
  <subsemigroup of 2x2 Rees 0-matrix semigroup with 5 generators>, 
  <subsemigroup of 2x2 Rees 0-matrix semigroup with 5 generators>, 
  <subsemigroup of 2x2 Rees 0-matrix semigroup with 5 generators>, 
  <subsemigroup of 2x2 Rees 0-matrix semigroup with 5 generators>, 
  <subsemigroup of 2x2 Rees 0-matrix semigroup with 5 generators>, 
  <subsemigroup of 2x2 Rees 0-matrix semigroup with 5 generators>, 
  <subsemigroup of 2x2 Rees 0-matrix semigroup with 5 generators>, 
  <subsemigroup of 2x2 Rees 0-matrix semigroup with 5 generators>, 
  <subsemigroup of 2x2 Rees 0-matrix semigroup with 5 generators>, 
  <subsemigroup of 2x2 Rees 0-matrix semigroup with 5 generators>, 
  <subsemigroup of 2x2 Rees 0-matrix semigroup with 5 generators>, 
  <subsemigroup of 2x2 Rees 0-matrix semigroup with 5 generators> ]
gap> NrMaximalSubsemigroups(R);
13
gap> IsDuplicateFreeList(max);
true
gap> ForAll(max, x -> IsMaximalSubsemigroup(R, x));
true
gap> G := Group([(1234), (1324)]);;
gap> mat := [
> [(), (43), 000],
> [(13)(24), 0000],
> [00, (43), 00],
> [000, (), 0],
> [000, (), ()],
> [000, (), 0]];;
gap> R := ReesZeroMatrixSemigroup(G, mat);  # (3-component) 5x6 RZMS over Sym(4)
<Rees 0-matrix semigroup 5x6 over Group([ (1,2,3,4), (1,3,2,4) ])>
gap> NrMaximalSubsemigroups(R);
116
gap> mat := [
>   [(), 000000000000],
>   [0, (), 00000000000],
>   [00, (), 0000000000],
>   [000, (), 000000000],
>   [0000, (), 00000000],
>   [00000, (), 0000000],
>   [000000, (), 000000],
>   [0000000, (), 00000],
>   [00000000, (), 0000],
>   [000000000, (), 000],
>   [0000000000, (), 00],
>   [00000000000, (), 0],
>   [000000000000, ()]];;
gap> G := Group(());;
gap> R := ReesZeroMatrixSemigroup(G, mat);;  # 13x13 inverse RZMS over triv group
gap> NrMaximalSubsemigroups(R);
8190
gap> G := Group([(142), (145)]);;
gap> mat := [
> [00, (142), (145), 0],
> [0, (), (125), 00],
> [(), (125), 000],
> [(), 000, (152)],
> [000, (142), (145)]];;
gap> R1 := ReesZeroMatrixSemigroup(G, mat);  # a connected 5x5 RZMS over Sym(3)
<Rees 0-matrix semigroup 5x5 over Group([ (1,4,2), (1,4,5) ])>
gap> max := MaximalSubsemigroups(R1);
[ <Rees 0-matrix semigroup 5x4 over Group([ (1,4,2), (1,4,5) ])>, 
  <Rees 0-matrix semigroup 5x4 over Group([ (1,4,2), (1,4,5) ])>, 
  <Rees 0-matrix semigroup 5x4 over Group([ (1,4,2), (1,4,5) ])>, 
  <Rees 0-matrix semigroup 5x4 over Group([ (1,4,2), (1,4,5) ])>, 
  <Rees 0-matrix semigroup 5x4 over Group([ (1,4,2), (1,4,5) ])>, 
  <Rees 0-matrix semigroup 4x5 over Group([ (1,4,2), (1,4,5) ])>, 
  <Rees 0-matrix semigroup 4x5 over Group([ (1,4,2), (1,4,5) ])>, 
  <Rees 0-matrix semigroup 4x5 over Group([ (1,4,2), (1,4,5) ])>, 
  <Rees 0-matrix semigroup 4x5 over Group([ (1,4,2), (1,4,5) ])>, 
  <Rees 0-matrix semigroup 4x5 over Group([ (1,4,2), (1,4,5) ])>, 
  <subsemigroup of 5x5 Rees 0-matrix semigroup with 10 generators>, 
  <subsemigroup of 5x5 Rees 0-matrix semigroup with 10 generators>, 
  <subsemigroup of 5x5 Rees 0-matrix semigroup with 10 generators>, 
  <subsemigroup of 5x5 Rees 0-matrix semigroup with 10 generators>, 
  <subsemigroup of 5x5 Rees 0-matrix semigroup with 10 generators>, 
  <subsemigroup of 5x5 Rees 0-matrix semigroup with 10 generators>, 
  <subsemigroup of 5x5 Rees 0-matrix semigroup with 10 generators>, 
  <subsemigroup of 5x5 Rees 0-matrix semigroup with 10 generators>, 
  <subsemigroup of 5x5 Rees 0-matrix semigroup with 10 generators>, 
  <subsemigroup of 5x5 Rees 0-matrix semigroup with 10 generators>, 
  <subsemigroup of 5x5 Rees 0-matrix semigroup with 10 generators>, 
  <subsemigroup of 5x5 Rees 0-matrix semigroup with 10 generators>, 
  <subsemigroup of 5x5 Rees 0-matrix semigroup with 10 generators>, 
  <subsemigroup of 5x5 Rees 0-matrix semigroup with 10 generators>, 
  <subsemigroup of 5x5 Rees 0-matrix semigroup with 10 generators>, 
  <subsemigroup of 5x5 Rees 0-matrix semigroup with 10 generators> ]
gap> NrMaximalSubsemigroups(R1);
26

# MaximalTest5: MaximalSubsemigroups for a transformation semigroup
gap> S := Semigroup(Transformation([]));  # trivial semigroup
<trivial transformation group of degree 0 with 1 generator>
gap> MaximalSubsemigroups(S);
[  ]
gap> S := Semigroup(Transformation([231]));  # group C3 as semigroup
<commutative transformation semigroup of degree 3 with 1 generator>
gap> MaximalSubsemigroups(S);
[ <trivial transformation group of degree 0 with 1 generator> ]
gap> S := Semigroup([
> Transformation([121]),
> Transformation([122])]);  # simple semigroup
<transformation semigroup of degree 3 with 2 generators>
gap> max := MaximalSubsemigroups(S);
[ <commutative transformation semigroup of degree 3 with 1 generator>, 
  <commutative transformation semigroup of degree 3 with 1 generator> ]
gap> List(max, Size);
11 ]
gap> S := Monoid([
> Transformation([11])]);  # simple semigroup with adjoined zero
<commutative transformation monoid of degree 2 with 1 generator>
gap> max := MaximalSubsemigroups(S);;
gap> ForAll(max, IsTrivial);
true
gap> S := Monoid([
> Transformation([112])]);  # semigroup with gen in non-regular D-class
<commutative transformation monoid of degree 3 with 1 generator>
gap> max := MaximalSubsemigroups(S);;
gap> List(max, Elements);
[ [ Transformation( [ 111 ] ), Transformation( [ 112 ] ) ], 
  [ Transformation( [ 111 ] ), IdentityTransformation ] ]
gap> S := Monoid([
> Transformation([11111]),  # semigroup with a result arising
> Transformation([21432]),  # from non-maximal regular D-class
> Transformation([21434])]);  # which intersects every H-class
<transformation monoid of degree 5 with 3 generators>
gap> max := MaximalSubsemigroups(S);;
gap> NrMaximalSubsemigroups(S);
5
gap> IsDuplicateFreeList(max);
true
gap> ForAll(max, x -> IsMaximalSubsemigroup(S, x));
true
gap> List(max, Elements);
[ [ Transformation( [ 11111 ] ), Transformation( [ 12341 ] ), 
      Transformation( [ 12343 ] ), Transformation( [ 21432 ] )
        , Transformation( [ 21434 ] ), 
      Transformation( [ 22222 ] ) ], 
  [ Transformation( [ 12341 ] ), Transformation( [ 12343 ] ), 
      IdentityTransformation, Transformation( [ 21432 ] ), 
      Transformation( [ 21434 ] ) ], 
  [ Transformation( [ 11111 ] ), Transformation( [ 12343 ] ), 
      IdentityTransformation, Transformation( [ 21434 ] ), 
      Transformation( [ 22222 ] ) ], 
  [ Transformation( [ 11111 ] ), Transformation( [ 12341 ] ), 
      IdentityTransformation, Transformation( [ 21432 ] ), 
      Transformation( [ 22222 ] ) ], 
  [ Transformation( [ 11111 ] ), Transformation( [ 12341 ] ), 
      Transformation( [ 12343 ] ), IdentityTransformation, 
      Transformation( [ 22222 ] ) ] ]
gap> S := Monoid([
> Transformation([224466881010121214141616,
>      181820202222242414]),
>  Transformation([121210108866442224242222,
>      202018181616141412]),
>  Transformation([557711331111991717191913,
>      131515232321215])]);  # highlights a special case
<transformation monoid of degree 25 with 3 generators>
gap> max := MaximalSubsemigroups(S);;
gap> NrMaximalSubsemigroups(S);
9
gap> correct := [
>  Semigroup([
>    Transformation([2244668810101212141416,
>        16181820202222242414]),
>    Transformation([5577113311119917171919,
>        13131515232321215]),
>    Transformation([1212101088664422242422,
>        22202018181616141412])]),
>  Monoid([
>    Transformation([3311991111557715151313,
>        212123231717191915]),
>    Transformation([1111997755331123232121,
>        191917171515131311])]),
>  Monoid([
>    Transformation([1010121244228866222224,
>        24161614142020181822]),
>    Transformation([1212101088664422242422,
>        22202018181616141412])]),
>  Monoid([
>    Transformation([8866121210102244202018,
>        1824242222141416168]),
>    Transformation([1111997755331123232121,
>        191917171515131311])]),
>  Monoid([
>    Transformation([1133557799111113131515,
>        171719192121232313]),
>    Transformation([1010121244228866222224,
>        24161614142020181822]),
>    Transformation([1212101088664422242422,
>        22202018181616141424])]),
>  Monoid([
>    Transformation([1133557799111113131515,
>        17171919212123231]),
>    Transformation([1010121244228866222224,
>        24161614142020181822])]),
>  Monoid([
>    Transformation([1133557799111113131515,
>        17171919212123231]),
>    Transformation([1212101088664422242422,
>        22202018181616141424])]),
>  Monoid([
>    Transformation([1133557799111113131515,
>        17171919212123231]),
>    Transformation([6688224412121010181820,
>        20141416162424222218])]),
>  Monoid([
>    Transformation([1133557799111113131515,
>        17171919212123231]),
>    Transformation([4422101012126688161614,
>        14222224241818202016])])];;
gap> ForAll(max, x -> IsMaximalSubsemigroup(S, x));
true
gap> T3 := FullTransformationMonoid(3);  # Trans(3)
<full transformation monoid of degree 3>
gap> max := MaximalSubsemigroups(T3);;
gap> IsDuplicateFreeList(max);
true
gap> NrMaximalSubsemigroups(T3);
5
gap> correct := [
>   Semigroup([
>     Transformation([231]),
>     Transformation([311])]),
>   Semigroup([
>     Transformation([132]),
>     Transformation([311]),
>     Transformation([332]),
>     Transformation([131])]),
>   Semigroup([Transformation([21]),
>     Transformation([331]),
>     Transformation([133]),
>     Transformation([122])]),
>   Semigroup([Transformation([321]),
>     Transformation([121]),
>     Transformation([331]),
>     Transformation([112])]),
>   Semigroup([Transformation([21]),
>     Transformation([231]),
>     Transformation([222])])];;
gap> max = correct or max = correct{[13425]};
true
gap> S := Semigroup([
>   Transformation([21524]),
>   Transformation([23431]),
>   Transformation([34143]),
>   Transformation([34222]),
>   Transformation([51123])]);  # A random example
<transformation semigroup of degree 5 with 5 generators>
gap> max := MaximalSubsemigroups(S);;
gap> NrMaximalSubsemigroups(S);
8
gap> correct := [
>   Semigroup([
>     Transformation([15312]),
>     Transformation([21524]),
>     Transformation([23431]),
>     Transformation([32214]),
>     Transformation([34143]),
>     Transformation([34222]),
>     Transformation([4221])]),
>   Semigroup([
>     Transformation([15312]),
>     Transformation([23431]),
>     Transformation([34143]),
>     Transformation([34222]),
>     Transformation([4221]),
>     Transformation([43143]),
>     Transformation([51123])]),
>  Semigroup([
>    Transformation([12234]),
>    Transformation([21153]),
>    Transformation([21524]),
>    Transformation([23431]),
>    Transformation([31531]),
>    Transformation([34143]),
>    Transformation([34222])]),
>  Semigroup([
>    Transformation([21423]),
>    Transformation([23431]),
>    Transformation([24521]),
>    Transformation([34143]),
>    Transformation([34222]),
>    Transformation([51123])]),
>  Semigroup([
>    Transformation([12234]),
>    Transformation([21524]),
>    Transformation([23434]),
>    Transformation([34143]),
>    Transformation([34222]),
>    Transformation([34342]),
>    Transformation([51123])]),
>  Semigroup([
>    Transformation([21524]),
>    Transformation([23431]),
>    Transformation([34243]),
>    Transformation([43222]),
>    Transformation([51123])]),
>  Semigroup([
>    Transformation([21524]),
>    Transformation([23431]),
>    Transformation([43134]),
>    Transformation([51123]),
>    Transformation([55222])]),
>  Semigroup([
>    Transformation([21524]),
>    Transformation([23431]),
>    Transformation([43111]),
>    Transformation([51123])])];;
gap> max = correct or max = correct{[21435687]};
true

# MaximalTest7: MaximalSubsemigroups for an inverse semigroup of partial 
# permutations
gap> gens := [
>   PartialPerm([1345], [6524]),
>   PartialPerm([12346], [54316]),
>   PartialPerm([1257], [3146])];;
gap> S := InverseSemigroup(gens);  # a random inverse semigroup of partial perms
<inverse partial perm semigroup of rank 7 with 3 generators>
gap> max := MaximalSubsemigroups(S);;
gap> NrMaximalSubsemigroups(S);
6
gap> IsDuplicateFreeList(max);
true
gap> a := List(max, Size);;
gap> Sort(a);
gap> a;
713713714714715715 ]
gap> gens := [PartialPerm([1234], [3254]),
>  PartialPerm([124], [354]),
>  PartialPerm([1234], [5231]),
>  PartialPerm([1345], [5341]),
>  PartialPerm([12345], [54321])];;
gap> S := InverseSemigroup(gens);  # a random inverse semigroup of partial perms
<inverse partial perm semigroup of rank 5 with 5 generators>
gap> max := MaximalSubsemigroups(S);;
gap> NrMaximalSubsemigroups(S);
9
gap> List(max, Size);
924924892892892892892892955 ]
gap> correct := [
>  Semigroup([
>      PartialPerm([2345], [2435]),
>      PartialPerm([2345], [4523]),
>      PartialPerm([1235], [1325]),
>      PartialPerm([1235], [2435]),
>      PartialPerm([1235], [3152]),
>      PartialPerm([12345], [54321])]),
>  Semigroup([
>      PartialPerm([2345], [2143]),
>      PartialPerm([2345], [2435]),
>      PartialPerm([2345], [2513]),
>      PartialPerm([1235], [3512]),
>      PartialPerm([1235], [5231]),
>      PartialPerm([12345], [54321])]),
>  Semigroup([
>      PartialPerm([2345], [1325]),
>      PartialPerm([2345], [2435]),
>      PartialPerm([2345], [5432]),
>      PartialPerm([1235], [2435]),
>      PartialPerm([12345], [54321])]),
>  Semigroup([
>      PartialPerm([2345], [2435]),
>      PartialPerm([2345], [2513]),
>      PartialPerm([2345], [5432]),
>      PartialPerm([1345], [3524]),
>      PartialPerm([12345], [54321])]),
>  Semigroup([
>      PartialPerm([2345], [1325]),
>      PartialPerm([2345], [4523]),
>      PartialPerm([2345], [5432]),
>      PartialPerm([1235], [2435]),
>      PartialPerm([12345], [54321])]),
>  Semigroup([
>      PartialPerm([2345], [4523]),
>      PartialPerm([2345], [5431]),
>      PartialPerm([2345], [5432]),
>      PartialPerm([1235], [2345]),
>      PartialPerm([12345], [54321])]),
>  Semigroup([
>      PartialPerm([2345], [1325]),
>      PartialPerm([2345], [4253]),
>      PartialPerm([1345], [5342]),
>      PartialPerm([12345], [54321])]),
>  Semigroup([
>      PartialPerm([2345], [1235]),
>      PartialPerm([2345], [4253]),
>      PartialPerm([1345], [5432]),
>      PartialPerm([12345], [54321])]),
>  Monoid([
>      PartialPerm([1234], [3254]),
>      PartialPerm([1234], [5231]),
>      PartialPerm([2345], [2143]),
>      PartialPerm([2345], [2435]),
>      PartialPerm([2345], [4153]),
>      PartialPerm([2345], [4523]),
>      PartialPerm([1345], [3524]),
>      PartialPerm([1235], [4231])])];;
gap> max = correct or max = correct{[124356879]};
true

# MaximalTest8: MaximalSubsemigroups for a semigroup of partitions
gap> B := PartitionMonoid(3);  # partition monoid of degree 3
<regular bipartition *-monoid of size 203, degree 3 with 4 generators>
gap> max := MaximalSubsemigroups(B);;
gap> NrMaximalSubsemigroups(B);
8
gap> List(max, Size);
200199199199167167167167 ]
gap> S := max[1];;  # the first maximal subsemigroup of partition monoid 3
gap> NrMaximalSubsemigroups(S);
5

# a random example
gap> B := Semigroup([
> Bipartition([[12, -4], [3457], [6, -5, -7], [-1, -3, -6], [-2]]),
> Bipartition([[156, -2, -4, -6, -7], [234, -3, -5], [7, -1]]),
> Bipartition([[16], [234], [5], [7, -6, -7], [-1, -3, -4], [-2], [-5]]),
> Bipartition([[1, -4], [237], [45, -7], [6, -1, -2, -3, -5], [-6]]),
> Bipartition([[17, -3], [245, -4], [36], [-1], [-2], [-5], [-6],
>              [-7]]),
> Bipartition([[15, -2, -4, -6, -7], [2, -1, -3, -5], [3467]])]);
<bipartition semigroup of degree 7 with 6 generators>
gap> max := MaximalSubsemigroups(B);;
gap> NrMaximalSubsemigroups(B);
7
gap> correct := [
>  Semigroup([
>    Bipartition([[126, -6, -7], [3457], [-1, -3, -4], [-2], [-5]]),
>    Bipartition([[12], [3457], [6, -6, -7], [-1, -3, -4], [-2], [-5]]),
>    Bipartition([[156, -2, -4, -6, -7], [234, -3, -5], [7, -1]]),
>    Bipartition([[16], [234], [5], [7, -4, -5, -7], [-1, -3, -6], [-2]]),
>    Bipartition([[16], [234], [5], [7, -4], [-1, -3, -6], [-2],
>                 [-5, -7]]),
>    Bipartition([[1, -4], [237], [45, -7], [6, -1, -2, -3, -5], [-6]]),
>    Bipartition([[17, -3], [245, -4], [36], [-1], [-2], [-5], [-6],
>                 [-7]]),
>    Bipartition([[15, -2, -4, -6, -7], [2, -1, -3, -5], [3467]])]),
>  Semigroup([
>    Bipartition([[123456, -1, -2, -3, -5, -7], [7, -4], [-6]]),
>    Bipartition([[126, -3, -5], [3457], [-1], [-2, -4, -6, -7]]),
>    Bipartition([[12, -4], [3457], [6, -5, -7], [-1, -3, -6], [-2]]),
>    Bipartition([[16], [234], [5], [7, -6, -7], [-1, -3, -4], [-2],
>                 [-5]]),
>    Bipartition([[16, -2, -3, -4, -5, -6, -7], [237], [45, -1]]),
>    Bipartition([[1, -4], [237], [45, -7], [6, -1, -2, -3, -5], [-6]]),
>    Bipartition([[17, -3], [245, -4], [36], [-1], [-2], [-5], [-6],
>                 [-7]]),
>    Bipartition([[15, -2, -4, -6, -7], [2, -1, -3, -5], [3467]])]),
>  Semigroup([
>    Bipartition([[12, -4], [3457], [6, -5, -7], [-1, -3, -6], [-2]]),
>    Bipartition([[156, -2, -4, -6, -7], [234, -3, -5], [7, -1]]),
>    Bipartition([[16], [234], [5], [7, -4, -5, -7], [-1, -3, -6], [-2]]),
>    Bipartition([[16], [234], [5], [7], [-1, -3, -4], [-2], [-5],
>                 [-6, -7]]),
>    Bipartition([[1, -4], [237], [45, -7], [6, -1, -2, -3, -5], [-6]]),
>    Bipartition([[17, -3], [245, -4], [36], [-1], [-2], [-5], [-6],
>                 [-7]]),
>    Bipartition([[15, -2, -4, -6, -7], [2, -1, -3, -5], [3467]])]),
>  Semigroup([
>    Bipartition([[12, -4], [3457], [6, -5, -7], [-1, -3, -6], [-2]]),
>    Bipartition([[12], [3457], [6, -6, -7], [-1, -3, -4], [-2], [-5]]),
>    Bipartition([[156, -2, -4, -6, -7], [234, -3, -5], [7, -1]]),
>    Bipartition([[16], [234], [5], [7], [-1, -3, -4], [-2], [-5],
>                 [-6, -7]]),
>    Bipartition([[16], [237], [45, -1, -2, -3, -5, -7], [-4], [-6]]),
>    Bipartition([[1, -4], [237], [45, -7], [6, -1, -2, -3, -5], [-6]]),
>    Bipartition([[17, -3], [245, -4], [36], [-1], [-2], [-5], [-6],
>                 [-7]]),
>    Bipartition([[15, -2, -4, -6, -7], [2, -1, -3, -5], [3467]])]),
>  Semigroup([
>    Bipartition([[123456, -1, -2, -3, -5, -7], [7, -4], [-6]]),
>    Bipartition([[126, -4, -7], [3457], [-1, -2, -3, -5], [-6]]),
>    Bipartition([[126, -7], [3457], [-1, -2, -3, -5], [-4], [-6]]),
>    Bipartition([[12, -4], [3457], [6, -5, -7], [-1, -3, -6], [-2]]),
>    Bipartition([[156, -2, -4, -6, -7], [234, -3, -5], [7, -1]]),
>    Bipartition([[16], [234], [5], [7, -6, -7], [-1, -3, -4], [-2],
>                 [-5]]),
>    Bipartition([[16, -1, -2, -3, -5, -7], [237], [45, -4], [-6]]),
>    Bipartition([[16, -2, -3, -4, -5, -6, -7], [237], [45, -1]]),
>    Bipartition([[16], [237], [45, -4, -5, -7], [-1, -3, -6], [-2]]),
>    Bipartition([[17, -3], [245, -4], [36], [-1], [-2], [-5], [-6],
>       [-7]]),
>    Bipartition([[15, -2, -4, -6, -7], [2, -1, -3, -5], [3467]])]),
>  Semigroup([
>    Bipartition([[12457, -6, -7], [36], [-1, -3, -4], [-2], [-5]]),
>    Bipartition([[12, -4], [3457], [6, -5, -7], [-1, -3, -6], [-2]]),
>    Bipartition([[156, -2, -4, -6, -7], [234, -3, -5], [7, -1]]),
>    Bipartition([[16], [234], [5], [7, -3, -4], [-1], [-2], [-5], [-6],
>                 [-7]]),
>    Bipartition([[16], [234], [5], [7, -4], [-1], [-2], [-3], [-5], [-6],
>                 [-7]]),
>    Bipartition([[1, -4], [237], [45, -7], [6, -1, -2, -3, -5], [-6]]),
>    Bipartition([[17], [245, -6, -7], [36], [-1, -3, -4], [-2], [-5]]),
>    Bipartition([[15, -2, -4, -6, -7], [2, -1, -3, -5], [3467]])]),
>  Semigroup([
>    Bipartition([[125, -6, -7], [3467], [-1, -3, -4], [-2], [-5]]),
>    Bipartition([[12, -4], [3457], [6, -5, -7], [-1, -3, -6], [-2]]),
>    Bipartition([[156, -2, -4, -6, -7], [234, -3, -5], [7, -1]]),
>    Bipartition([[16], [234], [5], [7, -2, -4, -6, -7], [-1, -3, -5]]),
>    Bipartition([[1, -4], [237], [45, -7], [6, -1, -2, -3, -5], [-6]]),
>    Bipartition([[17, -3], [245, -4], [36], [-1], [-2], [-5], [-6],
>                 [-7]])])];;
gap> max = correct;
true

# MaximalTest9: MaximalSubsemigroups for a semigroup of block bijections

# a random inverse semigroup of block bijections
gap> C := InverseSemigroup([
>  Bipartition([[1, -4], [2, -5], [34567, -1, -2, -3, -6, -7]]),
>  Bipartition([[1, -6], [2, -3], [3567, -1, -4, -5, -7], [4, -2]]),
>  Bipartition([[1, -6], [2, -2], [367, -1, -5, -7], [4, -4], [5, -3]]),
>  Bipartition([[1, -6], [2, -3], [3, -2], [457, -1, -5, -7], [6, -4]])]);
<inverse block bijection semigroup of degree 7 with 4 generators>
gap> max := MaximalSubsemigroups(C);;
gap> NrMaximalSubsemigroups(C);
8
gap> Number(max, x -> Size(x) = 446);
6
gap> Number(max, x -> Size(x) = 433);
2
gap> correct := [
>  Semigroup([
>    Bipartition([[12367, -2, -3, -5, -6, -7], [4, -1], [5, -4]]),
>    Bipartition([[14567, -1, -2, -3, -6, -7], [2, -4], [3, -5]]),
>    Bipartition([[157, -3, -6, -7], [2, -2], [3, -5], [4, -4], [6, -1]]),
>    Bipartition([[157, -4, -5, -7], [2, -3], [3, -2], [4, -6], [6, -1]]),
>    Bipartition([[1, -4], [2, -2], [3567, -1, -3, -6, -7], [4, -5]]),
>    Bipartition([[1, -6], [2, -2], [3567, -1, -3, -5, -7], [4, -4]]),
>    Bipartition([[1, -6], [2, -3], [3, -2], [457, -1, -5, -7], [6, -4]]),
>    Bipartition([[1, -6], [2, -2], [367, -1, -5, -7], [4, -4], [5, -3]])]),
>  Semigroup([
>    Bipartition([[12367, -1, -4, -5, -6, -7], [4, -2], [5, -3]]),
>    Bipartition([[1, -4], [23567, -1, -2, -3, -6, -7], [4, -5]]),
>    Bipartition([[1457, -2, -4, -5, -7], [2, -6], [3, -3], [6, -1]]),
>    Bipartition([[1, -1], [2457, -3, -5, -6, -7], [3, -2], [6, -4]]),
>    Bipartition([[157, -3, -6, -7], [2, -2], [3, -5], [4, -4], [6, -1]]),
>    Bipartition([[157, -4, -5, -7], [2, -3], [3, -2], [4, -6], [6, -1]]),
>    Bipartition([[1, -6], [2, -3], [3, -2], [457, -1, -5, -7], [6, -4]]),
>    Bipartition([[1, -6], [2, -2], [367, -1, -5, -7], [4, -4], [5, -3]])]),
>  Semigroup([
>    Bipartition([[1457, -1, -3, -5, -7], [2, -4], [3, -2], [6, -6]]),
>    Bipartition([[1457, -1, -5, -6, -7], [2, -3], [3, -2], [6, -4]]),
>    Bipartition([[1, -6], [2457, -1, -4, -5, -7], [3, -3], [6, -2]]),
>    Bipartition([[157, -3, -6, -7], [2, -2], [3, -5], [4, -4], [6, -1]]),
>    Bipartition([[1, -6], [2, -3], [3, -2], [4567, -1, -4, -5, -7]]),
>    Bipartition([[1, -1], [2, -2], [3, -3], [457, -4, -5, -7], [6, -6]]),
>    Bipartition([[1, -1], [2, -3], [367, -4, -5, -7], [4, -6], [5, -2]]),
>    Bipartition([[1, -6], [2, -2], [367, -1, -5, -7], [4, -4], [5, -3]])]),
>  Semigroup([
>    Bipartition([[1367, -1, -4, -5, -7], [2, -3], [4, -6], [5, -2]]),
>    Bipartition([[1457, -2, -4, -5, -7], [2, -6], [3, -3], [6, -1]]),
>    Bipartition([[1, -6], [2, -2], [3467, -1, -4, -5, -7], [5, -3]]),
>    Bipartition([[157, -3, -6, -7], [2, -2], [3, -5], [4, -4], [6, -1]]),
>    Bipartition([[157, -4, -5, -7], [2, -3], [3, -2], [4, -6], [6, -1]]),
>    Bipartition([[1, -6], [2, -3], [3567, -1, -4, -5, -7], [4, -2]]),
>    Bipartition([[1, -6], [2, -3], [3, -2], [457, -1, -5, -7], [6, -4]]),
>    Bipartition([[1, -1], [2, -2], [367, -3, -6, -7], [4, -4], [5, -5]])]),
>  Semigroup([
>    Bipartition([[1457, -1, -3, -5, -7], [2, -4], [3, -2], [6, -6]]),
>    Bipartition([[1457, -1, -5, -6, -7], [2, -3], [3, -2], [6, -4]]),
>    Bipartition([[157, -1, -5, -7], [2, -2], [3, -3], [4, -4], [6, -6]]),
>    Bipartition([[157, -4, -5, -7], [2, -3], [3, -2], [4, -6], [6, -1]]),
>    Bipartition([[1, -6], [2, -3], [3567, -1, -4, -5, -7], [4, -2]]),
>    Bipartition([[1, -6], [2, -3], [3, -2], [4567, -1, -4, -5, -7]]),
>    Bipartition([[1, -1], [2, -5], [3, -2], [457, -3, -6, -7], [6, -4]]),
>    Bipartition([[1, -1], [2, -3], [367, -4, -5, -7], [4, -6], [5, -2]])]),
>  Semigroup([
>    Bipartition([[1357, -1, -4, -5, -7], [2, -3], [4, -2], [6, -6]]),
>    Bipartition([[1457, -3, -4, -6, -7], [2, -2], [3, -5], [6, -1]]),
>    Bipartition([[1457, -3, -5, -6, -7], [2, -4], [3, -2], [6, -1]]),
>    Bipartition([[1567, -1, -4, -5, -7], [2, -3], [3, -2], [4, -6]]),
>    Bipartition([[157, -1, -5, -7], [2, -2], [3, -3], [4, -4], [6, -6]]),
>    Bipartition([[1, -1], [2, -5], [3, -2], [457, -3, -6, -7], [6, -4]]),
>    Bipartition([[1, -1], [2, -3], [367, -4, -5, -7], [4, -6], [5, -2]]),
>    Bipartition([[1, -6], [2, -2], [367, -1, -5, -7], [4, -4], [5, -3]])]),
>  Semigroup([
>    Bipartition([[1457, -1, -3, -6, -7], [2, -5], [3, -2], [6, -4]]),
>    Bipartition([[1457, -3, -4, -6, -7], [2, -2], [3, -5], [6, -1]]),
>    Bipartition([[1457, -3, -5, -6, -7], [2, -4], [3, -2], [6, -1]]),
>    Bipartition([[1, -6], [2457, -1, -4, -5, -7], [3, -3], [6, -2]]),
>    Bipartition([[157, -4, -5, -7], [2, -3], [3, -2], [4, -6], [6, -1]]),
>    Bipartition([[1, -6], [2, -3], [3, -2], [457, -1, -5, -7], [6, -4]]),
>    Bipartition([[1, -1], [2, -2], [367, -3, -6, -7], [4, -4], [5, -5]]),
>    Bipartition([[1, -1], [2, -3], [367, -4, -5, -7], [4, -6], [5, -2]])]),
>  Semigroup([
>    Bipartition([[1457, -2, -4, -5, -7], [2, -6], [3, -3], [6, -1]]),
>    Bipartition([[1457, -4, -5, -6, -7], [2, -3], [3, -2], [6, -1]]),
>    Bipartition([[1567, -1, -4, -5, -7], [2, -3], [3, -2], [4, -6]]),
>    Bipartition([[157, -3, -6, -7], [2, -2], [3, -5], [4, -4], [6, -1]]),
>    Bipartition([[1, -6], [2, -3], [3567, -1, -4, -5, -7], [4, -2]]),
>    Bipartition([[1, -1], [2, -2], [3, -3], [457, -4, -5, -7], [6, -6]]),
>    Bipartition([[1, -1], [2, -5], [3, -2], [457, -3, -6, -7], [6, -4]]),
>    Bipartition([[1, -6], [2, -2], [367, -1, -5, -7], [4, -4],
>                 [5, -3]])])];;
gap> max = correct;
true

# MaximalTest10: MaximalSubsemigroups for a transformation semigroup ideal
gap> S := SingularTransformationSemigroup(5);  # Trans(5) \ Sym(5)
<regular transformation semigroup ideal of degree 5 with 1 generator>
gap> max := MaximalSubsemigroups(S);;
gap> NrMaximalSubsemigroups(S);
40
gap> S = max[1];
false

# MaximalTest11: Issue 107
# (problems with Green's classes of ideals, and inverse semigroups)
gap> gens := [PartialPerm([1234], [3254]),
>  PartialPerm([124], [354]),
>  PartialPerm([1234], [5231]),
>  PartialPerm([1345], [5341]),
>  PartialPerm([12345], [54321])];;
gap> S := InverseSemigroup(gens);;
gap> S := Semigroup(S);;
gap> NrMaximalSubsemigroups(S);
9

# maximal: NrMaximalSubsemigroups, for a transformation semigroup, 1
gap> S := Semigroup([Transformation([14258627]),
>  Transformation([26642212]),
>  Transformation([36678215]),
>  Transformation([37454662]),
>  Transformation([57528124])],
>  rec(acting := true));;
gap> NrMaximalSubsemigroups(S);
5

# maximal: NrMaximalSubsemigroups, for a transformation semigroup, 2
gap> S := Semigroup([Transformation([84645388]),
>  Transformation([13558418]),
>  Transformation([17533775]),
>  Transformation([4745171]),
>  Transformation([55814145]),
>  Transformation([28865813]),
>  Transformation([66285445])]);;
gap> NrMaximalSubsemigroups(S);
39

# maximal: NrMaximalSubsemigroups, for a transformation semigroup, 3
gap> S := Semigroup([Transformation([63252842]),
>  Transformation([16633545]),
>  Transformation([42738533]),
>  Transformation([28183744]),
>  Transformation([46688178]),
>  Transformation([61367576]),
>  Transformation([27741582])]);;
gap> NrMaximalSubsemigroups(S);
18

#
gap> SEMIGROUPS.StopTest();
gap> STOP_TEST("Semigroups package: extreme/maximal.tst");

[Dauer der Verarbeitung: 0.38 Sekunden, vorverarbeitet 2026-06-17]