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

Quelle  ideals.tst   Sprache: unbekannt

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

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

#@local A, I, J, S, T, acting, ideals, regular, x, y, z
gap> START_TEST("Semigroups package: standard/ideals/ideals.tst");
gap> LoadPackage("semigroups", false);;

# The tests in this file do not attempt to test every line in ideals.gi
# since that file needs to be completely rewritten.

#
gap> SEMIGROUPS.StartTest();

# Test SupersemigroupOfIdeal
gap> S := RegularBooleanMatMonoid(3);;
gap> I := SemigroupIdeal(S, 
>                        Matrix(IsBooleanMat, 
>                               [[111], [101], [111]]));
<semigroup ideal of 3x3 boolean matrices with 1 generator>
gap> J := MinimalIdeal(I);
<simple semigroup ideal of 3x3 boolean matrices with 1 generator>
gap> SupersemigroupOfIdeal(I) = S;
true
gap> SupersemigroupOfIdeal(J) = S;
true
gap> Parent(J) = I;
true

# Test PrintString
gap> S := RegularBooleanMatMonoid(3);;
gap> I := SemigroupIdeal(S, 
>                        Matrix(IsBooleanMat, 
>                               [[111], [101], [111]]));
<semigroup ideal of 3x3 boolean matrices with 1 generator>
gap> PrintString(I);
"\>\>SemigroupIdeal(\< \>Monoid( \>\>\>Matrix(\<\>IsBooleanMat\<, \>[\>\>[01\
0]\<, \<\>\>[100]\<, \<\>\>[001]\<\<]\<)\<\>\>\>Matrix(\<\>IsBoolean\
Mat\<, \>[\>\>[010]\<, \<\>\>[001]\<, \<\>\>[100]\<\<]\<)\<\<, \>\
\>\>Matrix(\<\>IsBooleanMat\<, \>[\>\>[100]\<, \<\>\>[010]\<, \<\>\>[1\
01]\<\<]\<)\<\<, \>\>\>Matrix(\<\>IsBooleanMat\<, \>[\>\>[100]\<, \<\>\
\>[010]\<, \<\>\>[000]\<\<]\<)\<\<\<\> )\<,\< \>\>\>Matrix(\<\>IsBoole\
anMat\<, \>[\>\>[111]\<, \<\>\>[101]\<, \<\>\>[111]\<\<]\<\< )\<"

# Test ViewString
gap> S := RegularBooleanMatMonoid(1);;
gap> I := MinimalIdeal(S);
<group of 1x1 boolean matrices>
gap> IsTrivial(I);
true
gap> I;
<trivial group of 1x1 boolean matrices>
gap> S := SymmetricInverseMonoid(3);;
gap> MinimalIdeal(S);
<partial perm group of rank 0>
gap> S := RegularBooleanMatMonoid(3);;
gap> x := Matrix(IsBooleanMat, [[111], [111], [111]]);;
gap> I := SemigroupIdeal(S, x);
<semigroup ideal of 3x3 boolean matrices with 1 generator>
gap> IsZeroSimpleSemigroup(I);
true
gap> I;
<0-simple regular semigroup ideal of size 503x3 boolean matrices with
  1 generator>
gap> x := Matrix(IsBooleanMat, [[010], [101], [110]]);;
gap> I := SemigroupIdeal(S, x);
<semigroup ideal of 3x3 boolean matrices with 1 generator>
gap> IsRegularSemigroup(I);
false
gap> I;
<non-regular semigroup ideal of size 4283x3 boolean matrices with
  1 generator>
gap> S := SymmetricInverseMonoid(3);;
gap> x := PartialPerm([12]);;
gap> I := SemigroupIdeal(S, x);
<inverse partial perm semigroup ideal of rank 3 with 1 generator>
gap> I := SemigroupIdeal(S, S);
<inverse partial perm semigroup ideal of rank 3 with 5 generators>
gap> Size(I);
34
gap> I;
<inverse partial perm semigroup ideal of size 34, rank 3 with 5 generators>
gap> IsMonoid(I);
false

# Test \. (for accessing generators)
gap> S := RegularBooleanMatMonoid(3);;
gap> I := SemigroupIdeal(S, S.1, S.2);;
gap> I.1 = S.1;
true
gap> I.2 = S.2;
true
gap> I.3;
Error, the 2nd argument (a positive integer) exceeds the number of generators \
of the 1st argument (an ideal)

# Test \= for semigroup ideals
gap> S := RegularBooleanMatMonoid(3);;
gap> I := SemigroupIdeal(S, S.1, S.2);;
gap> J := SemigroupIdeal(S, S.1, S.2, S.3);;
gap> I = J;
true
gap> J = I;
true
gap> I := SemigroupIdeal(FullBooleanMatMonoid(3), S.1, S.2);;
gap> I = J;
false

# Test \= for semigroup and semigroup ideal
gap> S := RegularBooleanMatMonoid(3);;
gap> I := SemigroupIdeal(S, S.1, S.2);;
gap> S = I;
true
gap> I = S;
true
gap> I := SemigroupIdeal(FullBooleanMatMonoid(3), S.1, S.2);;
gap> I = S;
false
gap> S = I;
false
gap> I := SemigroupIdeal(FullBooleanMatMonoid(3), S.1, S.2);;
gap> GeneratorsOfSemigroup(I);;
gap> I = S;
false
gap> S = I;
false
gap> S = MinimalIdeal(S);
false

# Test SemigroupIdeal (the function)
gap> SemigroupIdeal("a");
Error, there must be 2 or more arguments
gap> S := RegularBooleanMatMonoid(1);;
gap> SemigroupIdeal(S);
Error, there must be 2 or more arguments
gap> S := Semigroup([[Z(2)]]);
<trivial group with 1 generator>
gap> SemigroupIdeal(S, S.1);
<commutative inverse semigroup ideal with 1 generator>
gap> S := RegularBooleanMatMonoid(2);;
gap> I := SemigroupIdeal(S, [S.1, S.2]);
<semigroup ideal of 2x2 boolean matrices with 2 generators>
gap> J := SemigroupIdeal(S, I, S.3);
<semigroup ideal of 2x2 boolean matrices with 3 generators>
gap> I := SemigroupIdeal(S, [S.1, S.2], rec());
<semigroup ideal of 2x2 boolean matrices with 2 generators>
gap> I := SemigroupIdeal(S, MaximalDClasses(S)[1]);
<semigroup ideal of 2x2 boolean matrices with 2 generators>
gap> I := SemigroupIdeal(S, []);
Error, the 2nd argument is not a combination of generators, lists of generator\
s, nor semigroups
gap> SemigroupIdeal();
Error, there must be 2 or more arguments
gap> SemigroupIdeal(S, NullDigraph(2));
Error, invalid arguments

# Test SemigroupIdealByGenerators
gap> S := RegularBooleanMatMonoid(1);;
gap> T := RegularBooleanMatMonoid(2);;
gap> SemigroupIdeal(S, T.1);
Error, the 2nd argument (a mult. elt. coll.) do not all belong to the semigrou\
p

# Test SemigroupIdealByGeneratorsNC
gap> S := FullTransformationMonoid(3);;
gap> I := SemigroupIdeal(S, S.1, rec(regular := true));
<regular transformation semigroup ideal of degree 3 with 1 generator>
gap> S := GLM(32);;
gap> I := SemigroupIdeal(S, S.3);
<regular semigroup ideal of 3x3 matrices over GF(2) with 1 generator>
gap> IsMatrixOverFiniteFieldSemigroup(I);
true
gap> S := PartitionMonoid(3);;
gap> I := SemigroupIdeal(S, S.3);
<regular bipartition *-semigroup ideal of degree 3 with 1 generator>
gap> HasIsStarSemigroup(I) and IsStarSemigroup(I);
true
gap> S := RegularBooleanMatMonoid(3);;
gap> IsRegularSemigroup(S);
false
gap> I := SemigroupIdeal(S, S.1);
<semigroup ideal of 3x3 boolean matrices with 1 generator>
gap> S := Semigroup(FullTransformationMonoid(3));;
gap> I := SemigroupIdeal(S, S.1);;

# Test MinimalIdealGeneratingSet
gap> S := FullTransformationMonoid(3);;
gap> I := SemigroupIdeal(S, S);
<regular transformation semigroup ideal of degree 3 with 4 generators>
gap> MinimalIdealGeneratingSet(I);
[ IdentityTransformation ]
gap> I := SemigroupIdeal(S, S.1);
<regular transformation semigroup ideal of degree 3 with 1 generator>
gap> MinimalIdealGeneratingSet(I);
[ Transformation( [ 231 ] ) ]
gap> S := RegularBooleanMatMonoid(3);;
gap> I := SemigroupIdeal(S, 
>  Matrix(IsBooleanMat, [[111], [110], [101]]),
>  Matrix(IsBooleanMat, [[111], [110], [001]]),
>  Matrix(IsBooleanMat, [[100], [011], [101]]),
>  Matrix(IsBooleanMat, [[110], [100], [101]]),
>  Matrix(IsBooleanMat, [[001], [001], [010]]),
>  Matrix(IsBooleanMat, [[100], [000], [001]]),
>  Matrix(IsBooleanMat, [[101], [011], [111]]),
>  Matrix(IsBooleanMat, [[110], [001], [111]]),
>  Matrix(IsBooleanMat, [[101], [000], [010]]),
>  Matrix(IsBooleanMat, [[011], [011], [101]]));
<semigroup ideal of 3x3 boolean matrices with 10 generators>
gap> MinimalIdealGeneratingSet(I);
[ Matrix(IsBooleanMat, [[010], [101], [110]]), 
  Matrix(IsBooleanMat, [[100], [110], [101]]) ]

# Test InversesOfSemigroupElementNC
gap> S := RegularBooleanMatMonoid(3);;
gap> I := SemigroupIdeal(S, 
>  Matrix(IsBooleanMat, [[111], [110], [101]]),
>  Matrix(IsBooleanMat, [[111], [110], [001]]),
>  Matrix(IsBooleanMat, [[100], [011], [101]]),
>  Matrix(IsBooleanMat, [[110], [100], [101]]),
>  Matrix(IsBooleanMat, [[001], [001], [010]]),
>  Matrix(IsBooleanMat, [[100], [000], [001]]),
>  Matrix(IsBooleanMat, [[101], [011], [111]]),
>  Matrix(IsBooleanMat, [[110], [001], [111]]),
>  Matrix(IsBooleanMat, [[101], [000], [010]]),
>  Matrix(IsBooleanMat, [[011], [011], [101]]));;
gap> x := Matrix(IsBooleanMat, [[101], [010], [101]]);;
gap> AsSet(InversesOfSemigroupElement(I, x));
[ Matrix(IsBooleanMat, [[000], [010], [001]]), 
  Matrix(IsBooleanMat, [[000], [010], [100]]), 
  Matrix(IsBooleanMat, [[000], [010], [101]]), 
  Matrix(IsBooleanMat, [[001], [010], [000]]), 
  Matrix(IsBooleanMat, [[001], [010], [001]]), 
  Matrix(IsBooleanMat, [[100], [010], [000]]), 
  Matrix(IsBooleanMat, [[100], [010], [100]]), 
  Matrix(IsBooleanMat, [[101], [010], [000]]), 
  Matrix(IsBooleanMat, [[101], [010], [101]]) ]

# Test IsCommutativeSemigroup
gap> x := Transformation([1341214147124921451413,
18158189]);;
gap> y := Transformation([131571842812107811121217,
61391613]);;
gap> T := DirectProduct(Semigroup(x), Semigroup(y));
<commutative transformation semigroup of size 45, degree 40 with 13 
 generators>
gap> z := Transformation([142144141471424414141414,
141414144323128283132323131283228313128,
2832323132]);;
gap> I := SemigroupIdeal(T, z);;
gap> IsCommutativeSemigroup(I);
true
gap> S := RegularBooleanMatMonoid(3);;
gap> I := SemigroupIdeal(S, 
> [Matrix(IsBooleanMat, [[010], [101], [110]]), 
>  Matrix(IsBooleanMat, [[100], [110], [101]])]);;
gap> IsCommutativeSemigroup(I);
false
gap> T := Semigroup(T);
<transformation semigroup of degree 40 with 13 generators>
gap> I := SemigroupIdeal(T, z);;
gap> IsCommutativeSemigroup(I);
true
gap> T := Semigroup(T);
<transformation semigroup of degree 40 with 13 generators>
gap> I := SemigroupIdeal(T, z);;
gap> IsCommutativeSemigroup(T);
true
gap> IsCommutativeSemigroup(I);
true

#Test IsTrivial
gap> S := Semigroup(Matrix(IsBooleanMat, [[11], [11]]));
<commutative semigroup of 2x2 boolean matrices with 1 generator>
gap> I := SemigroupIdeal(S, S.1);
<commutative semigroup ideal of 2x2 boolean matrices with 1 generator>
gap> IsTrivial(S);
true
gap> IsTrivial(I);
true

# IsFactorisableInverseMonoid
gap> S := UniformBlockBijectionMonoid(4);
<inverse block bijection monoid of degree 4 with 3 generators>
gap> I := SemigroupIdeal(S, S.1);
<inverse bipartition semigroup ideal of degree 4 with 1 generator>
gap> IsFactorisableInverseMonoid(I);
true
gap> I := MinimalIdeal(I);
<bipartition group of degree 4>
gap> IsFactorisableInverseMonoid(I);
true

# IsFactorisableInverseMonoid
gap> S := SymmetricInverseMonoid(5);;
gap> I := MinimalIdeal(S);;
gap> IsFactorisableInverseMonoid(I);
true
gap> J := InverseMonoid(I);;
gap> I = J;
true
gap> IsFactorisableInverseMonoid(J);
true

# Test Ideals method
gap> S := Semigroup([Transformation([53153]),
>                    Transformation([43155]),
>                    Transformation([15542])]);;
gap> ideals := Ideals(S);;
gap> Size(ideals);
17
gap> IsDuplicateFreeList(ideals);
true
gap> S := TrivialSemigroup(IsBlockBijectionSemigroup);;
gap> ideals := Ideals(S);;
gap> Size(ideals);
1
gap> Size(ideals[1]);
1
gap> A := AlternatingGroup(100);;
gap> ideals := Ideals(S);;
gap> Size(ideals);
1
gap> S := Semigroup([
>           Bipartition([[12, -1, -4], [3, -5], [4], [5, -2], [-3]]), 
>           Bipartition([[124, -3, -5], [3, -4], [5, -1, -2]]),
>           Bipartition([[125, -3, -4], [34, -1, -2], [-5]])]);;
gap> ideals := Ideals(S);;
gap> Size(ideals);
179

# MultiplicativeZero
gap> S := FreeSemigroup(2);;
gap> I := SemigroupIdeal(S, S.1);;
gap> IsTrivial(I);
false
gap> MultiplicativeZero(I);
fail
gap> S := FreeSemigroup(2);;
gap> I := SemigroupIdeal(S, S.2 * S.1);;
gap> MultiplicativeZero(I);
fail
gap> S := SymmetricInverseMonoid(3);;
gap> I := SemigroupIdeal(S, PartialPerm([21]));;
gap> MultiplicativeZero(I);
<empty partial perm>

# IsMultiplicativeZero
gap> S := SingularTransformationMonoid(3);;
gap> S := Semigroup(S, rec(acting := false));;
gap> IsMultiplicativeZero(S, IdentityTransformation);
false
gap> GeneratorsOfSemigroup(S);;
gap> IsMultiplicativeZero(S, Transformation([111]));
false
gap> S := Semigroup(SymmetricInverseSemigroup(3), rec(acting := false));
<partial perm monoid of rank 3 with 4 generators>
gap> S := SemigroupIdeal(S, PartialPerm([2]),
> rec(acting := false));;
gap> GeneratorsOfSemigroup(S);;
gap> IsMultiplicativeZero(S, EmptyPartialPerm());
true
gap> IsMultiplicativeZero(S, PartialPerm([123]));
false
gap> S := SemigroupIdeal(SymmetricInverseSemigroup(3), PartialPerm([2]));;
gap> IsMultiplicativeZero(S, EmptyPartialPerm());
true

# SemigroupIdeal bad input
gap> SemigroupIdeal("bananas", "bananas");
Error, the 1st argument is not a semigroup

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

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