gap-packages / fr

GAP package for functionally recursive (automata) groups in GAP
https://gap-packages.github.io/fr/
Other
5 stars 14 forks source link

IsTorsionFreeGroup and IsTorsionGroup don't work with space groups. #60

Closed hongyi-zhao closed 9 months ago

hongyi-zhao commented 1 year ago

I noticed there are two functions implemented in this package, i.e., IsTorsionFreeGroup or IsTorsionGroup. But when I try these two functions as follows, none of them work:

gap> LoadPackage("fr");
true
gap> IsTorsionFreeGroup(SpaceGroupOnLeftIT(3,227));
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `IsTorsionFree' on 1 arguments at /home/werner/Public/repo/github.com/gap-system/gap.git/lib/methsel2.g:249 called from
<function "HANDLE_METHOD_NOT_FOUND">( <arguments> )
 called from read-eval loop at *stdin*:190
type 'quit;' to quit to outer loop
brk> IsTorsionGroup(SpaceGroupOnLeftIT(3,227));
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `IsTorsionGroup' on 1 arguments at /home/werner/Public/repo/github.com/gap-system/gap.git/lib/methsel2.g:249 called from
ErrorNoReturn( no_method_found ); at /home/werner/Public/repo/github.com/gap-system/gap.git/lib/methsel2.g:249 called from
<function "HANDLE_METHOD_NOT_FOUND">( <arguments> )
 called from read-eval loop at *errin*:1
type 'quit;' to quit to outer loop

Any tips for this problem?

Regards, Zhao

laurentbartholdi commented 9 months ago

Yes, IsTorsionFreeGroup is declared in this package, and there is an implementation for automata groups; but not for space groups, which belong to another package. Many packages can declare the same method, as long as their arguments are compatible; typically the implementations are restricted to the respective packages' objects.

fingolfin commented 9 months ago

IsTorsionFree is not declared by fr, but rather by polycyclic. Regardless of that, each of these two packages primarily does this for the sake of the group type each defines. In polycyclic, a few other general rules are implemented (e.g. free groups are torsion free; finite groups are torsion free if and only if they are trivial). Any other packages that implements a kind of (infinite) group will have to implement methods for IsTorsionFree by itself. In your case, that would be the cryst package.

In the specific example you use, one can achieve this by using an isomorphism to a pcp group:

gap> G:=SpaceGroupOnLeftIT(3,227);
SpaceGroupOnLeftIT(3,227,'2')
gap> IsTorsionFree(Image(IsomorphismPcpGroup(G)));
false

But of course that only works in cases where IsomorphismPcpGroup works (in particular if G is solvable)

In any case this is not an issue of the fr package