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
812 stars 161 forks source link

`SmallGeneratingSet` for infinite groups #5790

Closed ThomasBreuer closed 3 weeks ago

ThomasBreuer commented 2 months ago

The following happens in GAP 4.13 and in the current master branch.

gap> G:= Group( [ [ [ 0, -1 ], [ 1, 0 ] ], [ [ 0, 1 ], [ -1, -1 ] ], [ [ 1, 1 ], [ 0, 1 ] ] ] );;
gap> IsFinite( G );
false
gap> SmallGeneratingSet( G );
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 3rd choice method found for `Enumerator' on 1 arguments at /.../gap/lib/methsel2.g:250 called from
[...]

The method used for this infinite group is SMALLGENERATINGSETGENERIC, which tries to omit generators from the stored list. For that, IsSubset gets called, which does membership tests. And there is no suitable method for that.

What would be a good strategy to decide whether calling SmallGeneratingSet with an infinite group will run into an error? For which (nontrivial) situations with infinite groups does SMALLGENERATINGSETGENERIC something useful?

Stefan-Kohl commented 2 months ago

@ThomasBreuer Here is a nontrivial example of where SMALLGENERATINGSETGENERIC does something useful for an infinite group (the example uses the RCWA package):

gap> a := ClassTransposition(0,2,1,2);;
gap> b := ClassTransposition(1,2,2,4);;
gap> c := ClassTransposition(1,4,2,6);;
gap> d := ClassTransposition(0,4,3,6);;
gap> e := ClassTransposition(1,4,7,12);;
gap> G := Group(a,b,c,d,e);
<(0(2),1(2)),(1(2),2(4)),(1(4),2(6)),(0(4),3(6)),(1(4),7(12))>
gap> SMALLGENERATINGSETGENERIC(G);
[ ( 0(2), 1(2) ), ( 1(2), 2(4) ), ( 0(4), 3(6) ) ]
gap> time;
316
gap> G = Group(SMALLGENERATINGSETGENERIC(G)); 
true

(The example is nontrivial insofar as the group G acts transitively on the set of nonnegative integers if and only if the Collatz conjecture holds.)

ThomasBreuer commented 2 months ago

Thanks for the example.

Meanwhile I noticed that this issue is a duplicate of #5542.

fingolfin commented 3 weeks ago

Was resolved by PR #5795