peal / vole

A GAP package for backtrack search in permutation groups with graphs
https://peal.github.io/vole
Mozilla Public License 2.0
8 stars 2 forks source link

Add a special case for `VoleFind.Group(<1-group-by-generators-constraint>)` #17

Closed wilfwilson closed 2 years ago

wilfwilson commented 3 years ago

At some point, I think it would be a good idea to add some special cases to avoid annoying/embarrassing behaviour.

This is already quite slow:

gap> VoleFind.Group(AlternatingGroup(40));
<permutation group with 39 generators>

But surely we as the package authors should be able to immediately return the group in such cases. Somehow. Similarly:

gap> VoleFind.Coset(AlternatingGroup(40) * (1,2));
RightCoset(<permutation group with 38 generators>,(1,39,2,40)(3,38)(4,37)
(5,36)(6,35)(7,34)(8,33)(9,32)(10,31)(11,30)(12,29)(13,28)(14,27)(15,26)
(16,25)(17,24)(18,23)(19,22)(20,21))

takes over a second.

wilfwilson commented 3 years ago

(Obviously there are an infinite number of special cases that we could add, and none of them should be a priority yet at this stage of Vole's development 🙂).

wilfwilson commented 3 years ago

This would be a lot easier if refiners were set up like suggested in #25, where we could do something like:

if Length(constraints) = 1 then
    if IsRefinerForGroup(constraints[1]) and HasUnderlyingGroup(constraints[1]) then
        return UnderlyingGroup(constraints[1]);
    elif IsRefinerForGroupByGens(constraints[1]) then
        return Group(UnderlyingGenerators(constraints[1]));
    fi;
fi;
wilfwilson commented 2 years ago

If this is going to be implemented, it will be done as part of #58.