Skip to content
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

Merged
merged 6 commits into from
Aug 26, 2020

Conversation

ChristopherRussell
Copy link
Collaborator

@ChristopherRussell ChristopherRussell commented Nov 16, 2018

This adds a few attributes for Rees (zero) matrix semigroups. Given a Rees (zero) matrix semigroup S the function CanonicalMatrix returns a matrix over UnderlyingSemigroup(S) which defines a Rees (zero) matrix semigroup isomorphic to S. This matrix is canonical in the sense that given any two isomorphic Rees (zero) matrix semigroups the function CanonicalMatrix will return the same matrix. CanonicalRees(Zero)MatrixSemigroup(S) simply returns Rees(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.

@james-d-mitchell james-d-mitchell added new-feature A label for PRs that contain new features 4.* labels Nov 23, 2018
doc/isorms.xml Outdated
[ [ (), () ], [ (), (1,2,3) ] ]
gap> IsIsomorphicSemigroup(S, T);
true
gap> CanonicalMatrix([[(), ()], [(), (1, 2, 3)]]. SymmetricGroup(3));
Copy link
Collaborator

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.

@james-d-mitchell
Copy link
Collaborator

In conversation just now, @ChristopherRussell and I, decided that he would revise this PR to include:

  • ReesMatrixSemigroupCanonicalLabelling: returns the permutation or whatever
    that takes the RZMS to its canonical version.
  • OnReesMatrixSemigroup: action
  • CanonicalReesMatrixSemigroup: OnReesMatrixSemigroup(RZMS,
    ReesMatrixSemigroupCanonicalLabelling);
  1. Remove CanonicalMatrix

  2. Make the function currently installed in SEMIGROUPS local to the only method using them.

@james-d-mitchell james-d-mitchell added the do not merge Label for PR that should not be merged label Nov 27, 2018
@ChristopherRussell ChristopherRussell force-pushed the iso_semi_rms branch 5 times, most recently from 3b27895 to 33aa5ee Compare November 28, 2018 16:58
@james-d-mitchell james-d-mitchell changed the title rzmsiso: add CanonicalMatrix and CanonicalRees(Zero)MatrixSemigroup Add CanonicalMatrix and CanonicalRees(Zero)MatrixSemigroup Mar 4, 2019
@james-d-mitchell james-d-mitchell added this to the 3.2.0 milestone Mar 6, 2019
@james-d-mitchell james-d-mitchell modified the milestones: 3.2.0, 3.3.0 Oct 7, 2019
ChristopherRussell added 2 commits April 22, 2020 16:11
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).
@ChristopherRussell
Copy link
Collaborator Author

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
Copy link
Collaborator

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?

Copy link
Collaborator Author

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">
Copy link
Collaborator

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?

Copy link
Collaborator Author

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zero matrix -> 0-matrix

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also group -> semigroup

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Collaborator

@james-d-mitchell james-d-mitchell left a 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.

@james-d-mitchell james-d-mitchell removed the do not merge Label for PR that should not be merged label May 13, 2020
Copy link
Collaborator

@james-d-mitchell james-d-mitchell left a 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.

@james-d-mitchell james-d-mitchell merged commit 5953260 into semigroups:master Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature A label for PRs that contain new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants