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

Fix One issue #4768

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

james-d-mitchell
Copy link
Contributor

This PR resolves Issue #4763 and changes the behaviour of SemigroupByGenerators to stop it from returning a monoid if the One of the generators is one of the generators. This PR builds on #4766 and supersedes #4767.

@james-d-mitchell james-d-mitchell changed the title Fix one issue Fix One issue Feb 14, 2022
@ThomasBreuer
Copy link
Contributor

Are we sure that removing the method in question from lib/arith.gi will not break some users' code?
(I agree that this method is likely to do something that is not intended, but perhaps it is too brave to just remove it.)

@fingolfin
Copy link
Member

Hi @james-d-mitchell thanks for the PR, wasn't expecting you to spend time on this :-).

But I agree with @ThomasBreuer, I think we need to be a bit careful. E.g. the Semigroups package definitely relies on this method (I just checked), and others might as well. Before removing this, I'd rather first have the ability again to run tests of all distributed packages (to be tackled during GAP Days next week); then we can update packages; and then maybe we can think about it for GAP 4.13 -- although that doesn't solve the issue of people possibly having unpublished code relying on this...

@james-d-mitchell
Copy link
Contributor Author

Thanks for your comments, @fingolfin and @ThomasBreuer. I agree this is probably too big a change to make all at once, perhaps the right thing to do is to merge #4767, and to leave this PR open to be merged at some point in the future?

@ThomasBreuer
Copy link
Contributor

@james-d-mitchell Thanks. Yes, eventually this PR should be merged, but for the moment merging just #4767 is safer.

Comment on lines 1551 to +1558
<Example><![CDATA[
gap> f := PartialPerm( [ 1, 2, 3, 6, 8, 10 ], [ 2, 6, 7, 9, 1, 5 ] );;
gap> S := Semigroup(f, One(f));
<commutative partial perm monoid of rank 9 with 1 generator>
<partial perm semigroup of rank 9 with 2 generators>
gap> IsMonoid(S);
true
false
gap> IsPartialPermMonoid(S);
true]]></Example>
false]]></Example>

This comment was marked as outdated.

Copy link
Member

Choose a reason for hiding this comment

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

I can no longer make sense of my comment here (at least the first half) so I've hidden it.

@fingolfin
Copy link
Member

I've merged Thomas' PR #4767 for now.

To make progress on this PR here, I think first we need to adjust any packages currently relying on these One methods -- hopefully that's "just" semigroups. Then once there is a Semigroups release which doesn't need it anymore in the package distro, we could apply this PR.

@fingolfin
Copy link
Member

Should this PR also remove these methods?

InstallMethod(OneImmutable, "for a partial perm coll",
[IsPartialPermCollection],
function(x)
  return JoinOfIdempotentPartialPermsNC(List(x, OneImmutable));
end);

InstallMethod(OneMutable, "for a partial perm coll",
[IsPartialPermCollection], OneImmutable);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants