-
Notifications
You must be signed in to change notification settings - Fork 161
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
Don't use One
on collections that are not domains
#5155
base: master
Are you sure you want to change the base?
Conversation
1b12a0e
to
7a8266a
Compare
One
on collections that are not domainsOne
on collections that are not domains
@@ -289,7 +289,9 @@ true | |||
# Test IsomorphismPartialPermMonoid for a partial perm semigroup | |||
gap> S := Semigroup(PartialPerm([2], [2]), PartialPerm([1], [1]));; | |||
gap> IsomorphismPartialPermMonoid(S); | |||
Error, the argument must be a semigroup with a multiplicative neutral element | |||
MappingByFunction( <partial perm monoid of rank 2 with 2 generators>, |
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.
This makes no sense I’m afraid, the semigroup generated by the two partial perms given is not a monoid, and I think that with the changes in this pr it wouldn’t be the case that the return value of One was a multiplicative neutral element. I’m not sure what the motivation behind this is, and I’m pretty sure that making this change will badly break lots of the code for Semigroups
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.
In case it helps others reviewing, the identity returned by One is not the identity for the entire family of partial perms, but only for those partial perms with the same support. This is very different from the permutation case where all permutations have the same support (all positive integers). This means that One would need to be called on the list or the domain generated by the list, but this is the function that creates that domain, so seems hard to get right without calling it on a list.
gap> gens := [ PartialPerm([2], [2]), PartialPerm([1], [1]) ];
[ <identity partial perm on [ 2 ]>, <identity partial perm on [ 1 ]> ]
gap> One(gens);
<identity partial perm on [ 1, 2 ]>
gap> One(Representative(gens));
<identity partial perm on [ 2 ]>
gap> One(gens[1]);
<identity partial perm on [ 2 ]>
I understand this pull request as a step towards removing the The remark by @james-d-mitchell points to a second problem. Namely, I think the right solution would be to eventually get rid of both |
This patch is a few months old, I think meant to workaround some problem with semigroups. I think this was resolved differently but I still think the change is generally a good idea...