Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/tst/testinstall/   (GAP Algebra Version 4.15.1©)  Datei vom 18.9.2025 mit Größe 1 kB image not shown  

Quelle  magma.tst   Sprache: unbekannt

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

#@local F,M,T
gap> START_TEST( "magma.tst" );

#
gap> M:= MagmaByMultiplicationTable( [ [ 11 ], [ 11 ] ] );;
gap> IsGeneratorsOfMagmaWithInverses( Elements( M ) );
false

# IsAssociative and IsCommutative
gap> T := [
>   [ 24345 ],
>   [ 33233 ],
>   [ 55544 ],
>   [ 51411 ],
>   [ 53345 ]
> ];;
gap> M := MagmaByMultiplicationTable(T);
<magma with 5 generators>
gap> IsAssociative(M) or IsCommutative(M);
false
gap> Filtered(Combinations(Elements(M)), x -> Size(x) > 0 and IsAssociative(x));
[ [ m5 ] ]
gap> Filtered(Combinations(Elements(M)), x -> Size(x) > 0 and IsCommutative(x));
[ [ m1 ], [ m1, m5 ], [ m2 ], [ m2, m5 ], [ m3 ], [ m3, m4 ], [ m4 ], [ m5 ] ]
gap> T := [
>   [ 14332 ],
>   [ 42442 ],
>   [ 34341 ],
>   [ 14543 ],
>   [ 22353 ]
> ];;
gap> M := MagmaByMultiplicationTable(T);
<magma with 5 generators>
gap> IsAssociative(M) or IsCommutative(M);
false
gap> Filtered(Combinations(Elements(M)), x -> Size(x) > 0 and IsAssociative(x));
[ [ m1 ], [ m1, m3 ], [ m2 ], [ m2, m4 ], [ m3 ], [ m4 ] ]
gap> AsSemigroup([Elements(M)[1], Elements(M)[2]]);
fail
gap> AsSemigroup([Elements(M)[1], Elements(M)[3]]);
<semigroup of size 2, with 2 generators>
gap> Filtered(Combinations(Elements(M)), x -> Size(x) > 0 and IsCommutative(x));
[ [ m1 ], [ m1, m2 ], [ m1, m2, m3 ], [ m1, m2, m5 ], [ m1, m3 ], [ m1, m5 ], 
  [ m2 ], [ m2, m3 ], [ m2, m4 ], [ m2, m5 ], [ m3 ], [ m4 ], [ m5 ] ]

#
gap> F := Elements( GL(2,2) );;
gap> IsAssociative( F );
true
gap> IsCommutative( F );
false
gap> Number( Combinations( F, 3 ), IsCommutative );
1
gap> AsSemigroup( F );
<semigroup of size 6, with 2 generators>

#
gap> STOP_TEST( "magma.tst" );

[Dauer der Verarbeitung: 0.12 Sekunden, vorverarbeitet 2026-06-07]