-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CanonicalMatrix and CanonicalRees(Zero)MatrixSemigroup #560
Add CanonicalMatrix and CanonicalRees(Zero)MatrixSemigroup #560
Conversation
doc/isorms.xml
Outdated
[ [ (), () ], [ (), (1,2,3) ] ] | ||
gap> IsIsomorphicSemigroup(S, T); | ||
true | ||
gap> CanonicalMatrix([[(), ()], [(), (1, 2, 3)]]. SymmetricGroup(3)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
full stop -> comma, looks like you forgot to actually include the documentation.
In conversation just now, @ChristopherRussell and I, decided that he would revise this PR to include:
|
3b27895
to
33aa5ee
Compare
CanonicalMatrix -> ReesZeroMatrixSemigroupCanonicalLabelling Add OnReesZeroMatrixSemigroups I'm not sure if OnReesZeroMatrixSemigroups is satisfactory. It's possible for the user to apply it using a permutation which doesn't actually act on the space of RZMS over whichever group - it could then cause an error by not returning a valid matrix to construct an RZMS. The other issue it would be very difficult for a user to define permutation which acts on this space and especially hard to define one which corresponds to some isomorphism of a triple they have in mind. The easiest way I can think to test whether the permutation corresponds to some isomorphism by a triple is to construct the group of all these permutations and check membership (sounds bad).
33aa5ee
to
54a6c4a
Compare
I have very belatedly updated this PR. In summary, I have acted on the points you mentioned except the one regarding OnReesMatrixSemigroup - which is no longer included. I also had to rebase and fix some tests, and fix some manual examples, because this was quite an old PR. I'm including the message I sent you on Slack below incase my reasoning for this needs to be known in the future. I think I acted on points 2 & 3 in your review. I seem to have started on 1 but didn’t like the result. It works but isn’t at all user friendly and I didn’t see how to make it so. The issue is that it would be very difficult for a user to define a permutation which acts on one of these matrices unless they understand my work and code very well. For the case of a m \times n RZMS over the group G the permutation has to be an element of the group (G^m \times G^n) \rtimes (S_m \times S_n \times \Aut(G)) - already quite a difficult thing for a user to define. Furthermore I represent matrices as integers (e.g. the 2^(mn) many m x n binary matrices can be represented by the set [1 .. 2^(mn)] in a sensible way) so that I can use faster perm group methods in GAP. So the group (G^m \times G^n) \rtimes (S_m \times S_n \times \Aut(G)). is actually represented as permutations of the set {1, …, 2^(mn)} and theres no way the user could define one of those permutations. My best idea to make it more user friendly is to have a function that maps a quintuple from the set G^m \times G^n \times S_m \times S_n \times \Aut(G) to the perm it represents on {1, …, 2^(mn)}. I believe I thought of this before but I guess I must have decided it was either difficult/awkward, or else seemed inefficient (calculates too much stuff about the whole of this huge group action) in the case a user just wants to use ‘OnReesMatrixSemigroup’ a few times. |
doc/isorms.xml
Outdated
</Returns> | ||
|
||
<Description> | ||
This returns the Rees (zero) matrix semigroup <C>T</C> which has the same |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work for Rees matrix semigroups too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I accidentally removed that functionality but I added it back. There's no special method it just uses the rees 0-matrix semigroup method and converted back and forth from non 0 rees matrix semigroups.
doc/isorms.xml
Outdated
@@ -266,3 +266,65 @@ gap> ImagesElm(map, RMSElement(R, 1, (2, 8), 2)); | |||
</Description> | |||
</ManSection> | |||
<#/GAPDoc> | |||
|
|||
<#GAPDoc Label="ReesZeroMatrixSemigroupCanonicalLabelling"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this as a user facing function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
doc/isorms.xml
Outdated
</Returns> | ||
|
||
<Description> | ||
If <A>S</A> is a Rees zero matrix group then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zero matrix -> 0-matrix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also group -> semigroup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes requested as discussed.
…nicalReesMatrixSemigroup
613f343
to
3e11c70
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a couple of minor changes to the documentation, but I'm happy to (squash and) merge this, when/if the CI completes again.
This adds a few attributes for Rees (zero) matrix semigroups. Given a Rees (zero) matrix semigroup
S
the functionCanonicalMatrix
returns a matrix overUnderlyingSemigroup(S)
which defines a Rees (zero) matrix semigroup isomorphic toS
. This matrix is canonical in the sense that given any two isomorphic Rees (zero) matrix semigroups the functionCanonicalMatrix
will return the same matrix.CanonicalRees(Zero)MatrixSemigroup(S)
simply returnsRees(Zero)MatrixSemigroup(CanonicalMatrix(S), UnderlyingSemigroup(S))
.The idea behind the method is that two Rees zero matrix semigroups M_0[G;{1 .. m}, {1 .. n};P] and M_0[G;{1 .. m}, {1 .. n};Q] are isomorphic if and only if they lie in the same orbit of the set of all m x n matrices over G_0 with respect to the group action of permuting rows and columns, multiplying rows and columns by group elements and applying automorphisms of G_0 to all entries simultaneously. By constructing this action we can take a matrix and use
SmallestImageSet
to find a canonical representative of its orbit in the space of all these matrices.