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

Quelle  isomorph.tst   Sprache: unbekannt

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

#############################################################################
##
#W  standard/attributes/isomorph.tst
#Y  Copyright (C) 2015-2022                              James D. Mitchell
##
##  Licensing information can be found in the README file of this package.
##
#############################################################################
##

#@local A, BruteForceInverseCheck, BruteForceIsoCheck, F, G, S, T, U, V, inv
#@local map, x, y, M, N, R, L
gap> START_TEST("Semigroups package: standard/attributes/isomorph.tst");
gap> LoadPackage("semigroups", false);;

#
gap> SEMIGROUPS.StartTest();

# helper functions
gap> BruteForceIsoCheck := function(iso)
>   local x, y;
>   if not IsInjective(iso) or not IsSurjective(iso) then
>     return false;
>   fi;
>   for x in Generators(Source(iso)) do
>     for y in Generators(Source(iso)) do
>       if x ^ iso * y ^ iso <> (x * y) ^ iso then
>         return false;
>       fi;
>     od;
>   od;
>   return true;
> end;;
gap> BruteForceInverseCheck := function(map)
> local inv;
>   inv := InverseGeneralMapping(map);
>   return ForAll(Source(map), x -> x = (x ^ map) ^ inv)
>     and ForAll(Range(map), x -> x = (x ^ inv) ^ map);
> end;;

# isomorph: SmallestMultiplicationTable, 1/2
gap> S := DualSymmetricInverseMonoid(2);
<inverse block bijection monoid of degree 2 with 2 generators>
gap> Size(S);
3
gap> SmallestMultiplicationTable(S);
[ [ 123 ], [ 213 ], [ 333 ] ]

# isomorph: SmallestMultiplicationTable, 2/2
gap> S := Semigroup(
> [PBR([[-4123], [-4124], [-2, -11], [-4, -1124]],
>      [[-4, -314], [-3, -13], [-4, -1124], [-4, -3, -234]]),
>  PBR([[-3, -2, -1134], [-4, -3, -2, -123], [-3, -2, -11],
>       [-1123]],
>      [[-3, -2, -1234], [-314],
>       [-312], [-4, -31234]]),
>  PBR([[-3, -113], [-112], [-2, -11], [-4, -3, -11234]],
>      [[-4, -3, -2], [], [-4, -112], [-4, -3, -2, -1234]]),
>  PBR([[-3, -2, -123], [-2, -124], [-3, -213],
>       [-4, -3, -2, -11234]],
>      [[-4, -2, -14], [-4, -3, -223], [-3, -2, -1134], [-32]]),
>  PBR([[-4, -3, -2, -123], [-4, -11234], [-3123],
>       [-4, -3, -2, -114]],
>      [[-4, -3, -124], [-3, -2234], [-4, -2, -11],
>       [-4, -214]]),
>  PBR([[-4, -2, -123], [-4, -3, -113], [-424], [-3, -11]],
>      [[-4, -3, -113], [-4, -323], [-4, -3, -2, -124],
>       [-4, -1134]])]);
<pbr semigroup of degree 4 with 6 generators>
gap> Size(S);
11
gap> SmallestMultiplicationTable(S);
[ [ 111116669911 ], [ 111116669911 ], 
  [ 111116669911 ], [ 111116669911 ], 
  [ 111116679911 ], [ 1111116669911 ],
  [ 1111116669911 ], [ 1111116669911 ]
    , [ 111116669911 ], 
  [ 111116669911 ], [ 111116669911 ] ]
gap> CanonicalMultiplicationTable(S);
[ [ 1111111091110891011 ], 
  [ 1111111091110891011 ], 
  [ 1111111091110891011 ], 
  [ 811111091110891011 ], 
  [ 1111111091110891011 ], 
  [ 111111791110891011 ], 
  [ 811111091110891011 ], 
  [ 1111111091110891011 ], 
  [ 1111111091110891011 ], 
  [ 811111091110891011 ], 
  [ 1111111091110891011 ] ]

# isomorph: IsIsomorphicSemigroup, 1/2
gap> S := DualSymmetricInverseMonoid(2);;
gap> T := Semigroup([Transformation([2122]),
>                    Transformation([1233])]);;
gap> IsIsomorphicSemigroup(S, T);
false

# isomorph: IsIsomorphicSemigroup, 2/2
gap> S := Semigroup([
>  Matrix(IsNTPMatrix, [[012], [430], [020]], 94),
>  Matrix(IsNTPMatrix, [[110], [411], [000]], 94)]);
<semigroup of 3x3 ntp matrices with 2 generators>
gap> IsIsomorphicSemigroup(S, S);
true
gap> T := AsSemigroup(IsTransformationSemigroup, S);
<transformation semigroup of size 46, degree 47 with 2 generators>
gap> IsIsomorphicSemigroup(S, T);
true
gap> S := Semigroup(IdentityTransformation);
<trivial transformation group of degree 0 with 1 generator>
gap> T := Semigroup(PartialPerm([]));
<trivial partial perm group of rank 0 with 1 generator>
gap> IsIsomorphicSemigroup(S, T);
true
gap> T := JonesMonoid(4);
<regular bipartition *-monoid of degree 4 with 3 generators>
gap> IsIsomorphicSemigroup(S, T);
false

# isomorph: IsIsomorphicSemigroup, for finite simple semigroups
gap> M := [[(123), ()], [(), ()], [(), ()]];
[ [ (1,2,3), () ], [ (), () ], [ (), () ] ]
gap> N := [[(132), ()], [(), (123)], [(132), (132)]];
[ [ (1,3,2), () ], [ (), (1,2,3) ], [ (1,3,2), (1,3,2) ] ]
gap> R := ReesMatrixSemigroup(AlternatingGroup([1 .. 3]), M);
<Rees matrix semigroup 2x3 over Alt( [ 1 .. 3 ] )>
gap> S := ReesMatrixSemigroup(Group([(123)]), N);
<Rees matrix semigroup 2x3 over Group([ (1,2,3) ])>
gap> IsIsomorphicSemigroup(R, S);
true
gap> R := SemigroupByMultiplicationTable(MultiplicationTable(R));;
gap> S := SemigroupByMultiplicationTable(MultiplicationTable(S));;
gap> IsIsomorphicSemigroup(R, S);
true
gap> L := [[(), ()], [(), ()], [(123), ()]];
[ [ (), () ], [ (), () ], [ (1,2,3), () ] ]
gap> T := ReesMatrixSemigroup(SymmetricGroup([1 .. 3]), L);
<Rees matrix semigroup 2x3 over Sym( [ 1 .. 3 ] )>
gap> IsIsomorphicSemigroup(S, T);
false
gap> IsIsomorphicSemigroup(T, T);
true
gap> M := [[(123), ()], [(), ()], [(), ()]];
[ [ (1,2,3), () ], [ (), () ], [ (), () ] ]
gap> N := [[(132), ()], [(), (123)]];
[ [ (1,3,2), () ], [ (), (1,2,3) ] ]
gap> R := ReesMatrixSemigroup(AlternatingGroup([1 .. 3]), M);;
gap> S := ReesMatrixSemigroup(AlternatingGroup([1 .. 3]), N);;
gap> IsIsomorphicSemigroup(R, S);
false
gap> R := ReesMatrixSemigroup(AlternatingGroup([1 .. 5]),
> [[(), ()], [(), (13245)]]);;
gap> S := ReesMatrixSemigroup(AlternatingGroup([1 .. 5]),
> [[(15432), ()], [(145), (14)(35)]]);;
gap> IsIsomorphicSemigroup(R, S);
false

# isomorph: IsomorphismSemigroups, for infinite semigroup(s)
gap> S := FreeSemigroup(1);;
gap> T := TrivialSemigroup();;
gap> IsomorphismSemigroups(S, T);
fail
gap> IsomorphismSemigroups(S, FreeSemigroup(2));
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `IsomorphismSemigroups' on 2 arguments

# isomorph: IsomorphismSemigroups, for trivial semigroups
gap> S := TrivialSemigroup(IsTransformationSemigroup);
<trivial transformation group of degree 0 with 1 generator>
gap> T := TrivialSemigroup(IsBipartitionSemigroup);
<trivial block bijection group of degree 1 with 1 generator>
gap> map := IsomorphismSemigroups(S, T);;
gap> BruteForceIsoCheck(map);
true
gap> BruteForceInverseCheck(map);
true

# isomorph: IsomorphismSemigroups, for monogenic semigroups
gap> S := MonogenicSemigroup(IsTransformationSemigroup, 32);
<commutative non-regular transformation semigroup of size 4, degree 5 with 1 
 generator>
gap> T := MonogenicSemigroup(IsBipartitionSemigroup, 32);
<commutative non-regular block bijection semigroup of size 4, degree 6 with 1 
 generator>
gap> map := IsomorphismSemigroups(S, T);
<commutative non-regular transformation semigroup of size 4, degree 5 with 1 
  generator> -> <commutative non-regular block bijection semigroup of size 4
  degree 6 with 1 generator>
gap> BruteForceIsoCheck(map);
true
gap> BruteForceInverseCheck(map);
true

# isomorph: IsomorphismSemigroups, for simple semigroups
gap> S := ReesMatrixSemigroup(SymmetricGroup(3), [[(), (132)],
>                                                 [(23), (12)],
>                                                 [(), (231)]]);
<Rees matrix semigroup 2x3 over Sym( [ 1 .. 3 ] )>
gap> T := ReesMatrixSemigroup(SymmetricGroup(3), [[(), ()],
>                                                 [(), ()],
>                                                 [(), ()]]);
<Rees matrix semigroup 2x3 over Sym( [ 1 .. 3 ] )>
gap> U := AsSemigroup(IsBipartitionSemigroup, S);
<bipartition semigroup of size 36, degree 37 with 4 generators>
gap> V := AsSemigroup(IsTransformationSemigroup, S);
<transformation semigroup of size 36, degree 37 with 4 generators>
gap> map := IsomorphismSemigroups(S, U);;
gap> BruteForceIsoCheck(map);
true
gap> BruteForceInverseCheck(map);
true
gap> map := IsomorphismSemigroups(U, S);;
gap> BruteForceIsoCheck(map);
true
gap> BruteForceInverseCheck(map);
true
gap> map := IsomorphismSemigroups(U, V);;
gap> BruteForceIsoCheck(map);
true
gap> BruteForceInverseCheck(map);
true
gap> IsomorphismSemigroups(U, T);
fail

# isomorph: IsomorphismSemigroups, for 0-simple semigroups
gap> S := ReesZeroMatrixSemigroup(SymmetricGroup(3), [[(), (132)],
>                                                     [0, (12)],
>                                                     [(), (231)]]);
<Rees 0-matrix semigroup 2x3 over Sym( [ 1 .. 3 ] )>
gap> T := ReesZeroMatrixSemigroup(SymmetricGroup(3), [[(), ()],
>                                                     [(), ()],
>                                                     [(), 0]]);
<Rees 0-matrix semigroup 2x3 over Sym( [ 1 .. 3 ] )>
gap> U := AsSemigroup(IsBipartitionSemigroup, S);
<bipartition semigroup of size 37, degree 38 with 5 generators>
gap> V := AsSemigroup(IsTransformationSemigroup, S);
<transformation semigroup of size 37, degree 38 with 5 generators>
gap> map := IsomorphismSemigroups(S, U);;
gap> BruteForceIsoCheck(map);
true
gap> BruteForceInverseCheck(map);
true
gap> map := IsomorphismSemigroups(U, S);;
gap> BruteForceIsoCheck(map);
true
gap> BruteForceInverseCheck(map);
true
gap> map := IsomorphismSemigroups(U, V);;
gap> BruteForceIsoCheck(map);
true
gap> BruteForceInverseCheck(map);
true
gap> IsomorphismSemigroups(U, T);
fail
gap> F := FreeSemigroup(1);;
gap> F := F / [[F.1 ^ 4, F.1]];;
gap> S := ReesZeroMatrixSemigroup(F, [[F.1]]);;
gap> T := ReesZeroMatrixSemigroup(F, [[F.1 ^ 2]]);;
gap> map := IsomorphismSemigroups(S, T);;
gap> BruteForceIsoCheck(map);
true
gap> BruteForceInverseCheck(map);
true

# isomorph: IsomorphismSemigroups, non-isomorphic partial order of D-classes
gap> S := ZeroSemigroup(3);
<commutative non-regular transformation semigroup of size 3, degree 4 with 2 
 generators>
gap> T := MonogenicSemigroup(31);
<commutative non-regular transformation semigroup of size 3, degree 4 with 1 
 generator>
gap> IsomorphismSemigroups(S, T);
fail

# for monogenic semigroups
gap> S := MonogenicSemigroup(45);;
gap> T := MonogenicSemigroup(201);;
gap> IsomorphismSemigroups(S, T);
fail
gap> S := MonogenicSemigroup(14);;
gap> T := MonogenicSemigroup(23);;
gap> IsomorphismSemigroups(S, T);
fail
gap> S := MonogenicSemigroup(14);;
gap> T := Semigroup(Generators(S) ^ (12));;
gap> IsomorphismSemigroups(S, T) <> fail;
true

# for larger semigroups, Sean Clark's PLU monoid
gap> A := [DigraphFromDiSparse6String(".[{?`abcdefghijklmnopqrstuvwxyz"),
> DigraphFromDiSparse6String(
> ".[_bAdCfEhGjIlKnMpOrQtSvU{_bAdCfEhGjIlKnMpOrQtSvUwxyz"),
> DigraphFromDiSparse6String(".[h?jAlCnE`gbidkfm{h?jAlCnE`gbidkfmwxyz"),
> DigraphFromSparse6String(":[w?BGJORaDILQTcFKNSV`EHMPU")];;
gap> S := Semigroup(List(A, AsBooleanMat));
<monoid of 28x28 boolean matrices with 3 generators>
gap> Size(S);
40
gap> CanonicalMultiplicationTable(S);
[ [ 35343940343539403534394022111133
      333331134353940442111334 ], 
  [ 34354039353440393435403911222244
      444442235344039331222443 ], 
  [ 40393435394034354039343544333311
      111113339403435224333112 ], 
  [ 39403534403935343940353433444422
      222224440393534113444221 ], 
  [ 34354039353440393436403816525248
      488885536344038731225443 ], 
  [ 35343940343539403634384052161673
      737776634363840482116334 ], 
  [ 40393435394034354038343648737316
      166667738403436524337112 ], 
  [ 39403534403935343840363473484852
      525558840383634163448221 ], 
  [ 3534394013162133353439402211991111
      3311111199131621334421991134 ], 
  [ 3435403915143222343540391122101012
      12441212121010151432223312101012
      43 ], 
  [ 4039343521331316403934354433111199
      1199911112133131622431111912 ], 
  [ 3940353432221514394035343344121210
      10221010101212322215141134121210
      21 ], 
  [ 2143124329411351613341334403340
      33333333131392411213935343413404039 
     ], [ 2143124310112315353414341432
      4032403232321414110123392235343414
      404039 ], 
  [ 12342134110312341415351535392239
      2222222215151013123240343535153939
      40 ], 
  [ 1234213492114133435163516213921
      39212121161629114403334353516393940 
     ], [ 1234567811031234141535173638
      2039222020201717286731324034353617
      383940 ], 
  [ 1234567892114133435163618193821
      3919191918185293084033343536183839
      40 ], 
  [ 4321785641129403321391938361835
      1618181819193085291334403938193635
      34 ], [ 43217856123101324039223820
      1736153517171720207312863414403938
      20363534 ], 
  [ 4321342141129403321392139351635
      16161616212111429133440393921353534 
     ], [ 4321342112310132403922392215
      3515351515152222312101341440393922
      353534 ], 
  [ 4321785612111093233212219201718
      151637262724253031282913144039382336
      3534 ], 
  [ 4321785612111093233212219201718
      151627372625233031282913144039382436
      3534 ], 
  [ 4321785612111093233212219201718
      151626273723243031282913144039382536
      3534 ], 
  [ 1234567891011121314151617181920
      212225232427372829303132333435362638
      3940 ], 
  [ 1234567891011121314151617181920
      212224252337262829303132333435362738
      3940 ], 
  [ 3435403915143222343640381652281012
      31483131312828171432207312102812
      43 ], 
  [ 353439401316213336343840521692930
      11733030302929131819334821929113
      4 ], [ 403934352133131640383436487330
      1192916292929303019331318524311
      30912 ], 
  [ 3940353432221514384036347348123128
      10522828283131322017141634123110
      21 ], [ 34124312312110392232403240
      3414341414141432321231101535394040
      32343435 ], 
  [ 3412431211492213940334033133413
      34131313333341192351639404033343435 
     ], [ 2143124321433535343434344040
      4040404040343412433939353434344040
      39 ], [ 12342134123434343535353539
      3939393939393535213440403435353539
      3940 ], 
  [ 123456781234343435353636383839
      3938383836365678404034353636383940 ]
    , [ 12345678910111213141516171819
      202122232425262728293031323334353637
      383940 ], 
  [ 432178564321404039393838363635
      3536363638387856343440393838363534 ]
    , [ 4321342143214040393939393535
      3535353535393934213434403939393535
      34 ], [ 34124312341239394040404034
      3434343434344040431235353940404034
      3435 ] ]

# IsomorphismSemigroups
gap> S := FullTransformationMonoid(3);
<full transformation monoid of degree 3>
gap> T := AsMonoid(IsPBRMonoid, S);
<pbr monoid of size 27, degree 3 with 3 generators>
gap> map := IsomorphismSemigroups(S, T);
<full transformation monoid of degree 3> -> <pbr monoid of size 27, degree 3 
  with 3 generators>
gap> BruteForceIsoCheck(map);
true
gap> BruteForceInverseCheck(map);
true

# AutomorphismGroup
gap> S := JonesMonoid(5);
<regular bipartition *-monoid of degree 5 with 4 generators>
gap> G := AutomorphismGroup(S);;
gap> StructureDescription(G);
"C2"
gap> S := FullTransformationMonoid(3);
<full transformation monoid of degree 3>
gap> G := AutomorphismGroup(S);
<group with 2 generators>
gap> StructureDescription(G);
"S3"
gap> S := Semigroup(Matrix(IsMaxPlusMatrix,
> [[1, -infinity, 2], [-24, -infinity], [103]]));
<commutative semigroup of 3x3 max-plus matrices with 1 generator>
gap> AutomorphismGroup(S);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `AutomorphismGroup' on 1 arguments

#
gap> SEMIGROUPS.StopTest();
gap> STOP_TEST("Semigroups package: standard/attributes/isomorph.tst");

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