gap-system / gap

Main development repository for GAP - Groups, Algorithms, Programming, a System for Computational Discrete Algebra
https://www.gap-system.org
GNU General Public License v2.0
763 stars 159 forks source link

a question about pcgs #5703

Open ThomasBreuer opened 1 month ago

ThomasBreuer commented 1 month ago

How can GAP find out whether a given list of elements in a (pc) group is a pcgs? I thought that PcgsByPcSequence might be suitable for that, and that this function would return fail if the elements do not form a pcgs, but it returns an object that claims to be a pcgs also in this situation. (Note that there is an NC variant, which one could call if one wants to skip consistency checks.) The documentation for the function does not help with this question.

Here is a use case for the answer to my question: When I want to compute an IsomorphismFpGroupByGenerators for a group then a method is available for the case that the given generators are actually a pcgs object. This suggests that trying to turn the given plain list of generators into a pcgs object would be reasonable.

ThomasBreuer commented 2 weeks ago

Follow-up: If the input for PcGroupWithPcgs is an object in the filter IsPcgs that is in fact not a pcgs then there are situations where GAP seems to hang forever:

gap> G:= SymmetricGroup( 4 );
Sym( [ 1 .. 4 ] )
gap> gens:= GeneratorsOfGroup( G );
[ (1,2,3,4), (1,2) ]
gap> pcgs:= PcgsByPcSequence( PermutationsFamily, gens );
Pcgs([ (1,2,3,4), (1,2) ])
gap> IsPcgs( pcgs );
true
gap> PcGroupWithPcgs( pcgs );

What is the recommended way to check the input?