Skip to content

Error, hash function not applicable to key of type data object in RecognizeGroup(SylowSubgroup(GL(6,2),3)); #393

@fingolfin

Description

@fingolfin

Test case extracted from issue #13:

gap> RecognizeGroup(SylowSubgroup(GL(6,2),3));
Error, hash function not applicable to key of type data object in
  HTValue( orb!.ht, ob ) at GAPROOT/pkgorb/gap/orbits.gi:443 called from
Position( o, p ) at GAPROOT/pkggenss/gap/genss.gi:1308 called from
SiftGroupElementSLP( ri!.stabilizerchain, x ) at GAPROOT/pkg/recog/gap/projective.gi:109 called from
slpforelement( ri )( ri, x ) at GAPROOT/pkg/recog/gap/base/recognition.gi:764 called from
SLPforElement( rifac, gg ) at GAPROOT/pkg/recog/gap/base/recognition.gi:786 called from
slpforelement( ri )( ri, x ) at GAPROOT/pkg/recog/gap/base/recognition.gi:764 called from
...  at *stdin*:75
type 'quit;' to quit to outer loop
brk> Where(30);
Position( o, p ) at GAPROOT/pkggenss/gap/genss.gi:1308 called from
SiftGroupElementSLP( ri!.stabilizerchain, x ) at GAPROOT/pkg/recog/gap/projective.gi:109 called from
slpforelement( ri )( ri, x ) at GAPROOT/pkg/recog/gap/base/recognition.gi:764 called from
SLPforElement( rifac, gg ) at GAPROOT/pkg/recog/gap/base/recognition.gi:786 called from
slpforelement( ri )( ri, x ) at GAPROOT/pkg/recog/gap/base/recognition.gi:764 called from
SLPforElement( riker, n ) at GAPROOT/pkg/recog/gap/base/recognition.gi:806 called from
slpforelement( ri )( ri, x ) at GAPROOT/pkg/recog/gap/base/recognition.gi:764 called from
SLPforElement( rifac, gg ) at GAPROOT/pkg/recog/gap/base/recognition.gi:786 called from
slpforelement( ri )( ri, x ) at GAPROOT/pkg/recog/gap/base/recognition.gi:764 called from
SLPforElement( rifac, gg ) at GAPROOT/pkg/recog/gap/base/recognition.gi:786 called from
slpforelement( ri )( ri, x ) at GAPROOT/pkg/recog/gap/base/recognition.gi:764 called from
SLPforElement( rifac, gg ) at GAPROOT/pkg/recog/gap/base/recognition.gi:786 called from
slpforelement( ri )( ri, x ) at GAPROOT/pkg/recog/gap/base/recognition.gi:764 called from
SLPforElement( rifac, gg ) at GAPROOT/pkg/recog/gap/base/recognition.gi:786 called from
slpforelement( ri )( ri, x ) at GAPROOT/pkg/recog/gap/base/recognition.gi:764 called from
SLPforElement( riker, n ) at GAPROOT/pkg/recog/gap/base/recognition.gi:806 called from
slpforelement( ri )( ri, x ) at GAPROOT/pkg/recog/gap/base/recognition.gi:764 called from
SLPforElement( riker, n ) at GAPROOT/pkg/recog/gap/base/recognition.gi:806 called from
slpforelement( ri )( ri, x ) at GAPROOT/pkg/recog/gap/base/recognition.gi:764 called from
SLPforElement( ImageRecogNode( ri ), ImageElm( Homom( ri ), x!.el ) ) at GAPROOT/pkg/recog/gap/base/kernel.gi:46 called from
GenerateRandomKernelElementsAndOptionallyVerifyThem( ri, n, false ) at GAPROOT/pkg/recog/gap/base/kernel.gi:91 called from
CallFuncList( findgensNmeth( ri ).method, Concatenation( [ ri ], findgensNmeth( ri ).args ) ) at GAPROOT/pkg/recog/gap/base/recognition.gi:635 called from
RecogniseGeneric( Group( List( GeneratorsOfGroup( H ), function ( x )
          return ImageElm( Homom( ri ), x );
      end ) ), methodsforimage( ri ), depthString, InitialDataForImageRecogNode( ri ) ) at GAPROOT/pkg/recog/gap/base/recognition.gi:608 called from
RecogniseGeneric( G, FindHomDbMatrix, "", rec(
     ) ) at GAPROOT/pkg/recog/gap/base/recognition.gi:112 called from
<function "RecogniseGroup">( <arguments> )
 called from read-eval loop at *errin*:2
brk> Grp(ri);
Group([ <an immutable 2x2 matrix over GF2>, <an immutable 2x2 matrix over GF2> ])
brk>

So we'd expects stuff over GF(2), but we see:

brk> ob;
[ 0*Z(2), Z(2^2) ]

The code in genss/gap/genss.gi:1308 is this:

InstallMethod( SiftGroupElementSLP, 
  "for a stabilizer chain and a group element",
  [ IsStabilizerChain and IsStabilizerChainByOrb, IsObject ],
  function( S, x )
    local preS, nrstrong, slp, o, p, po, r, isone;
    preS := false;
    isone := S!.IsOne;
    nrstrong := Length(S!.stronggens);
    slp := [];     # will be reversed in the end
    while S <> false do
        o := S!.orb;
        p := o!.op(o[1],x);
        po := Position(o,p);   # <- line 1308

Now, p is value ob we saw earlier. In fact, let's inspect some state:

brk> DownEnv();
brk> p;
[ 0*Z(2), Z(2^2)^2 ]
brk> o;
<closed orbit, 3 points with Schreier tree with log>
brk> o[1];
<a GF2 vector of length 2>
brk> Display(o[1]);
[ Z(2)^0, 0*Z(2) ]
brk> x;
[ [ 0*Z(2), Z(2^2)^2 ], [ Z(2^2)^2, Z(2^2)^2 ] ]
brk> Display(x);
z = Z(4)
   . z^2
 z^2 z^2

So what is the action?

brk> Display(o!.op);
# src/listfunc.c:OnPoints
function ( pnt, elm )
    <<kernel code>> from src/listfunc.c:OnPoints
end

Hmmm... however...:

brk> GENSS_IsOneProjective = S!.IsOne;   # ah so we are acting projectively
true

So the action is linear, but the group is projective... and the matrix x is over GF(4) but it is a scalar multiple of a matrix in GF(2). So perhaps the action is supposed to be action?

Further evidence: the next caller up the chain is in gap/projective.gi:109 which is

SLPforElementFuncsProjective.StabilizerChainProj := function(ri,x)
  local r;
  r := SiftGroupElementSLP(ri!.stabilizerchain,x);  # <- line 109
  return r.slp;
end;

So where is the OnPoints coming from?? Hmm... from FindBasePointCandidates in genss :

    if q = 2 then
        op := OnPoints;
    else
        op := OnLines;
    fi;

ARGH. So yeah, sure over GF(2) there are no scalars other than 1, so we can use OnPoints as an optimization. But this is not a valid optimization if one allow scalar multiples of the matrices.

So I guess disabling this optimization might fix the issue. But I am not yet 100% sure if this is a proper fix, or more a cure of the symptom... Hm

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAny bug should have this label, even if it also has a more generic labelbug: unexpected errorA computation runs into an error loop when it should not have

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions