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

Agemo not working for trivial groups #5492

Closed
laurentbartholdi opened this issue Aug 20, 2023 · 3 comments · Fixed by #5494
Closed

Agemo not working for trivial groups #5492

laurentbartholdi opened this issue Aug 20, 2023 · 3 comments · Fixed by #5494
Labels
kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them kind: bug Issues describing general bugs, and PRs fixing them

Comments

@laurentbartholdi
Copy link
Contributor

In the latest gap, I encounter the following problem:

gap> List(AllSmallGroups(2^7),x->Agemo(Agemo(x,2,1),2,1));
Error, Agemo: <G> must be a p-group at /usr/local/src/gap/lib/grp.gi:2283 called from
Agemo( Agemo( x, 2, 1 ), 2, 1 ) at *errin*:1 called from
func( C[i] ) at /usr/local/src/gap/lib/coll.gi:663 called from
Error( "Agemo: <G> must be a p-group" ); at /usr/local/src/gap/lib/grp.gi:2283 called from
Agemo( Agemo( x, 2, 2 ), 2, 1 ) at *stdin*:1 called from
func( elm ) at /usr/local/src/gap/lib/coll.gi:1456 called from

The problem seems to be that if Agemo, say, creates a trivial subgroup of a p-group, then it is marked as being a p-group, but its prime p is forgotten. Then the prime p is recomputed by PrimePGroup, which looks at orders of generators rather than remembering.

The problem can be "fixed" by InstallOtherMethod(PrimePGroup,[IsGroup],1000,x->2);

@fingolfin
Copy link
Member

There is no mathematical valid return value for PrimePGroup for the trivial group. If you read the documentation for PrimePGroup it explicitly states that it returns fail for trivial groups.

However Agemo should handle trivial groups as input. I'll open a PR fixing that.

@fingolfin fingolfin changed the title PrimePGroup not set for trivial subgroups Agemo not working for trivial groups Aug 25, 2023
@fingolfin fingolfin added kind: bug Issues describing general bugs, and PRs fixing them kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them labels Aug 25, 2023
@laurentbartholdi
Copy link
Contributor Author

laurentbartholdi commented Aug 25, 2023 via email

@fingolfin
Copy link
Member

Your impression was wrong then, the documentation is quite explicit about this, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them kind: bug Issues describing general bugs, and PRs fixing them
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants