gap-packages / recog

The GAP package recog to collect methods for constructive recognition
https://gap-packages.github.io/recog/
GNU General Public License v3.0
6 stars 14 forks source link

Recog on lots of small examples #32

Open hulpke opened 6 years ago

hulpke commented 6 years ago

The following test is rather pathetic

RecogTest:=function()
local prime,dim,m,i;
  for prime in Intersection([1..30],Primes) do
    for dim in [3..12] do
      Print("Trying dim=",dim,", prime=",prime,"\n");
      m:=ClassicalMaximals("L",dim,prime);
      for i in m do
        RecognizeGroup(i);
      od;
    od;
  od;
end;

It takes a (temporarily hardcoded for small fields) version of the maximal subgroups library for PSL and tries to recognize all groups. It runs quickly in an error (indeed trying random examples triggers errors in 5% of all groups). The errors often seem to be deliberate catches of strange situations. I think it would be a plausible desideratum to have this test run through successfully.

(In any case it is an easy source of bugs if someone wants to debug...)

fingolfin commented 6 years ago

With which version of recog did you perform these tests? With master (where I fixed several such bugs since the last release), I do run into some errors, but very far from 5%, esp. if I exclude the prime 2. In fact, so far I only saw errors for prime=3, dim=4. However, those disappear upon re-runs, so I have augmented your code now to record the initial random state, to make it easier to debug. This is the result:

RecogTest:=function(primes,dims)
local prime,dim,m,i,seedMT,seedRS;
  for prime in primes do
    for dim in dims do
      m:=ClassicalMaximals("L",dim,prime);
      for i in [1..Length(m)] do
        Print("Trying dim=",dim,", prime=",prime,", idx=",i,"\n");
        seedMT := State(GlobalMersenneTwister);
        seedRS := State(GlobalRandomSource);
        RecognizeGroup(m[i]);
      od;
    od;
  od;
end;

RecogTest(Primes{[1..10]}, [3..12]);

For p=2, I get this, which is essentially issue #12:

Trying dim=6, prime=2, idx=8
Error, !!! at /Users/mhorn/Projekte/GAP/repos/pkg/pkg/pkg/recog/gap/classicalnatural.gi:1331 called from
RECOG.RecogniseSL2NaturalEvenChar( gm, f, false ) at /Users/mhorn/Projekte/GAP/repos/pkg/pkg/pkg/recog/gap/classicalnatural.gi:3216 called from

I found two others, see #33 and #34. If anybody finds more, please report them, together with the seeds that trigger them.