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

Quelle  small.tst   Sprache: unbekannt

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

#############################################################################
##
#W  small.tst                       smallsemi - a GAP library of semigroups
#Y  Copyright (C) 2008-2024             Andreas Distler & James D. Mitchell
##
##  Licensing information can be found in the README file of this package.
##
#############################################################################
##

# This file contains the tests for the file small.gi.


#ReadTest(Filename(DirectoriesPackageLibrary("smallsemi","tst"),"small.tst"));
gap> START_TEST("Smallsemi package: small.tst");
gap> LoadPackage("smallsemi", false);;
gap> if IsBound(SEMIGROUPS) then SEMIGROUPS.StartTest(); fi;
gap> cur := InfoLevel(InfoSmallsemi);;
gap> SetInfoLevel(InfoSmallsemi, 1);
gap> Info(InfoSmallsemi, 1, "This is a test for the info class.");
#I  This is a test for the info class.
gap> SetInfoLevel(InfoSmallsemi, 0);
gap> sgrp := SemigroupByMultiplicationTable([[1]]);;
gap> map := EquivalenceSmallSemigroup(sgrp);;
gap> Size(Range(map));
1
gap> grp := SmallGroup(71);;
gap> map := EquivalenceSmallSemigroup(grp);
SemigroupHomomorphismByImages ( Group( [ f1 ] )-><small semigroup of size 7>)
gap> id := IdSmallSemigroup(Range(map));
7836017 ]
gap> IsGroupAsSemigroup(SmallSemigroup(id));
true
gap> t1 := Transformation([221]);;
gap> t2 := Transformation([211]);;
gap> sgrp := SemigroupByGenerators([t1, t2]);
<transformation semigroup of degree 3 with 2 generators>
gap> map := EquivalenceSmallSemigroup(sgrp);
MappingByFunction( <transformation semigroup of size 6, degree 3 with 2
 generators>, <small semigroup of size 6>, function( x ) ... end )
gap> RespectsMultiplication(map);
false
gap> PreImage(map, MinimalGeneratingSet(Range(map)));
[ Transformation( [ 112 ] ), Transformation( [ 211 ] ) ]
gap> Idempotents(Range(map));
[ s1, s3, s5 ]
gap> sgrp := RandomSmallSemigroup(5);
<small semigroup of size 5>
gap> IsSmallSemigroup(sgrp);
true
gap> sgrp := Semigroup(Transformation([1]));;
gap> IsSmallSemigroup(sgrp);
false
gap> IsSmallSemigroupElt(Transformation([1]));
false
gap> sgrp := RandomSmallSemigroup(5);;
gap> IsSmallSemigroupElt(Random(sgrp));
true
gap> RecoverMultiplicationTable(51000);
[ [ 11111 ], [ 11111 ], [ 12345 ], [ 12453 ],
  [ 12534 ] ]
gap> SmallSemigroupCreator(last);
<small semigroup of size 5>
gap> s := SemigroupByMultiplicationTableNC([[12], [21]]);
<semigroup of size 2, with 2 generators>
gap> IsSmallSemigroup(s);
false
gap> RecoverMultiplicationTable(102);
fail
gap> RecoverMultiplicationTable(12);
fail
gap> RecoverMultiplicationTable(21);
[ [ 11 ], [ 11 ] ]
gap> RecoverMultiplicationTable(811111111);
[ [ 11111111 ], [ 11111113 ],
  [ 33333333 ], [ 11144441 ],
  [ 12345671 ], [ 12345671 ],
  [ 12345671 ], [ 88888888 ] ]
gap> RecoverMultiplicationTable(211111111);
fail
gap> SmallSemigroup(81353452);
<small semigroup of size 8>
gap> s := Semigroup(Transformation([122]), Transformation([123]));;
gap> IdSmallSemigroup(s);
23 ]
gap> map := EquivalenceSmallSemigroup(s);;
gap> IsBijective(map);
true
gap> s := SemigroupByMultiplicationTableNC([[12], [12]]);
<semigroup of size 2, with 2 generators>
gap> map := EquivalenceSmallSemigroup(s);
MappingByFunction( <semigroup of size 2, with 2 generators>
 , <small semigroup of size 2>, function( x ) ... end )
gap> RespectsMultiplication(map);
false
gap> SmallSemigroupEltFamily;;
gap> SmallSemigroupEltType;;
gap> SmallSemigroupType;;
gap> UnloadSmallsemiData(true);
gap> IsBound(DATA2TO7[1]);
false
gap> RecoverMultiplicationTable(21);;
gap> DATA2TO7[1];
[ "0100", "0101", "0011" ]
gap> UnloadSmallsemiData(true);
gap> DATA2TO7;
[  ]
gap> DATA8;
[  ]
gap> Display(BLUEPRINT_MATS(3));
[ [  1,  1,  1,  1,  1,  1,  1,  1 ],
  [  1,  1,  1,  1,  1,  1,  1,  1 ],
  [  1,  1,  1,  1,  1,  1,  1,  1 ],
  [  1,  1,  1 ],
  [  1,  1,  1 ],
  [  1,  1,  1 ],
  [  1,  1,  1 ],
  [  1,  1,  1 ] ]
gap> 3NIL_DATA;
rec( diag := fail )
gap> SmallSemigroup(811433105);;
gap> DATA8;
[ ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
  ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
  ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
  ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
  ,,,,,,,,,,,,,,
  [ "111", "222", "333", "444", "444", "333", "333", "111", "444", "000",
      "333", "333", "000", "000", "222", "444", "111", "000", "000", "111",
      "111", "333", "000", "111", "222", "222", "444", "444", "444", "333",
      "000", "222", "111", "222", "222", "444", "333", "000", "222", "111",
      "222", "222", "333", "000", "111", "444", "222", "222", "445", "333",
      "000", "111", "444", "222", "222", "455" ] ]
gap> SmallSemigroup(8, NrSmallSemigroups(8) - 2);;
gap> 3NIL_DATA;
rec( diag := [ 23 ], next := 4, positions := [ 1347 ],
  strlist := [ "0013", "0313" ] )
gap> SmallSemigroupNC(51);
<small semigroup of size 5>
gap> SmallSemigroupNC(51) = SmallSemigroup(51);
true

# Issue 2 (Github 2019)
gap> BruteForceIsoCheck := function(iso)
>   local x, y;
>   if not IsInjective(iso) or not IsSurjective(iso) then
>     return false;
>   fi;
>   for x in GeneratorsOfSemigroup(Source(iso)) do
>     for y in GeneratorsOfSemigroup(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;;
gap> S := SmallSemigroup(418);
<small semigroup of size 4>
gap> map := IsomorphismTransformationSemigroup(S);
SemigroupHomomorphismByImages ( <small semigroup of size 4>->Semigroup(
[ Transformation( [ 11142 ] ), Transformation( [ 11143 ] ),
  Transformation( [ 11144 ] ) ] ))
gap> BruteForceIsoCheck(map);
true
gap> BruteForceInverseCheck(map);
true

#
gap> SetInfoLevel(InfoSmallsemi, cur);
gap> if IsBound(SEMIGROUPS) then SEMIGROUPS.StopTest(); fi;
gap> STOP_TEST("Smallsemi package: small.tst", 10000);

[Dauer der Verarbeitung: 0.32 Sekunden, vorverarbeitet 2026-06-18]