-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce associativity check to
AsSemigroup
- Loading branch information
1 parent
8839587
commit eb0c8ea
Showing
3 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# https://github.com/gap-system/gap/issues/4030 | ||
# | ||
gap> T := [ | ||
> [ 1, 2, 6, 5, 4, 3 ], | ||
> [ 2, 1, 4, 2, 2, 5 ], | ||
> [ 6, 5, 1, 6, 6, 4 ], | ||
> [ 5, 6, 3, 4, 1, 2 ], | ||
> [ 4, 3, 2, 1, 5, 6 ], | ||
> [ 3, 4, 5, 3, 3, 1 ] | ||
> ];; | ||
gap> M := MagmaByMultiplicationTable(T); | ||
<magma with 6 generators> | ||
gap> IsAssociative(M); | ||
false | ||
gap> AsSemigroup(M); | ||
fail | ||
gap> M := MagmaByMultiplicationTable(T); | ||
<magma with 6 generators> | ||
gap> AsSemigroup(M); | ||
fail | ||
gap> AsSemigroup(Elements(M)); | ||
fail | ||
|
||
# | ||
gap> T := [ | ||
> [ 1, 2, 3, 4, 5 ], | ||
> [ 2, 2, 2, 5, 5 ], | ||
> [ 3, 2, 3, 4, 5 ], | ||
> [ 4, 2, 4, 3, 5 ], | ||
> [ 5, 2, 5, 2, 5 ] | ||
> ];; | ||
gap> M := MagmaByMultiplicationTable(T); | ||
<magma with 5 generators> | ||
gap> IsAssociative(M); | ||
true | ||
gap> S := AsSemigroup(M);; | ||
gap> IsSemigroup(S); | ||
true | ||
gap> Size(S); | ||
5 | ||
gap> M := MagmaByMultiplicationTable(T); | ||
<magma with 5 generators> | ||
gap> S := AsSemigroup(M);; | ||
gap> IsSemigroup(S); | ||
true | ||
gap> Size(S); | ||
5 | ||
gap> S := AsSemigroup(Elements(M));; | ||
gap> IsSemigroup(S); | ||
true | ||
gap> Size(S); | ||
5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters