problem with `\<` for `IsAffineCrystGroupOnLeft`
The following problem has been observed by Hongyi Zhao. It happens both in GAP 4.12.2 and in the master branch.
gap> G1:= AffineCrystGroupOnLeft(
> [ [ [ -1, 0, 0, 0 ], [ 0, 1, 0, 1/4 ], [ 0, 0, 1, 1/4 ], [ 0, 0, 0, 1 ] ],
> [ [ 0, 0, 1, 0 ], [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 0, 1 ] ] ] );;
gap>
gap> G2:= AffineCrystGroupOnLeft(
> [ [ [ 0, 0, 1, 1/4 ], [ 1, 0, 0, 5/4 ], [ 0, -1, 0, 1 ], [ 0, 0, 0, 1 ] ],
> [ [ 0, 0, 1, 5/4 ], [ -1, 0, 0, 1 ], [ 0, 1, 0, 5/4 ], [ 0, 0, 0, 1 ] ] ] );;
gap> G1 = G2;
true
gap> G1 < G2;
true
The problem seems to be that the \< method used compares the TransParts values of the two groups,
and that TransParts( S ) computes GeneratorsSmallest( NiceObject( P ) ), where P = PointGroup( S ).
Since the NiceObject computations for the two point groups are independent, I do not see why these GeneratorsSmallest calls yield canonical generators for the matrix group that are suitable for the question about \<.
The initial discussion of this problem is here. Thank you for your in-depth analysis and explanation.
In general implementing < for groups seems quite problematic to me. I realize we do it to allow putting them into a Set, but since it is virtually impossible to implement it efficiently, I wonder if it can ever be useful beyond trivial examples?
Thanks for the analysis, @ThomasBreuer. This bug must have been there since the beginning. I was somehow assuming equal matrix groups have equal NiceObjects, and the latter have equal GeneratorsSmallest, but that seems to be wrong. If I work directly with GeneratorsSmallest(P),
it seems to work, but this doesn't look very efficient.
It is certainly desirable to be able to remove duplicates. Whether one should use for that an inefficient implementation of \< or the per se less efficient DuplicateFreeList (which relies only on \=) is the question.
A fix has been committed to package Cryst.