Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 39 additions & 32 deletions gap/projective/c6.gi
Original file line number Diff line number Diff line change
Expand Up @@ -233,20 +233,14 @@ RECOG.basis2:=function(r,n,q,g)
k:=1;

repeat
if IsBound(gens[k]) then
if not RECOG.IsScalarMat(gens[k]) then
a:=gens[k];
posa:=k;
else
k:=k+1;
fi;
Unbind(gens[k]);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so here we advanced k before the unbind...

else
k:=k+1;
if IsBound(gens[k]) and not RECOG.IsScalarMat(gens[k]) then
a:=gens[k];
posa:=k;
fi;
Unbind(gens[k]);
k:=k+1;
until posa > 0 or k > len;
if posa > 0 then
k:=k+1;
repeat
if IsBound(gens[k]) then
if RECOG.IsScalarMat(gens[k]) then
Expand Down Expand Up @@ -474,6 +468,10 @@ RECOG.BlindDescent := function(r,n,grp,limit)
end;


# Bound on the rounds that enlarge the span of the <r>-core conjugates in
# New2RecogniseC6, per dimension of R/Z(R).
RECOG.C6ClosureRoundsPerDim := 4;

#############################################################################
##
#F RecogniseC6() . . . . . . . . . . . . . . . .
Expand All @@ -491,7 +489,7 @@ end;
RECOG.New2RecogniseC6 := function(grp)

local type, blocks, spaces, xxx, d, b, ppi,
r, n, q, u, rgrp, grpbasis, igens, list, i, grp1;
r, n, q, u, rlist, round, grpbasis, igens, list, i, grp1;

d := DimensionOfMatrixGroup(grp);
q := Size(FieldOfMatrixGroup(grp));
Expand All @@ -515,27 +513,36 @@ RECOG.New2RecogniseC6 := function(grp)
u := b[1];

## take enough conjugates to generate the <r>-core
rgrp := Group(b[2]);
## try to find a set of standard gens for <rgrp>
grpbasis := RECOG.basis2(r,n,q,rgrp);
# BlindDescent is randomized and only tests for an abelian witness. If the
# stronger basis construction fails, reject this C6 attempt and let method
# selection retry later instead of aborting recognition.
if grpbasis = fail then
return TemporaryFailure;
fi;
rlist := b[2];
for round in [0 .. RECOG.C6ClosureRoundsPerDim * 2 * n] do
## try to find a set of standard gens for <rlist>
grpbasis := RECOG.basis2(r,n,q,Group(rlist));
# BlindDescent is randomized and only tests for an abelian witness. If
# the stronger basis construction fails, reject this C6 attempt and let
# method selection retry later instead of aborting recognition.
if grpbasis = fail then
return TemporaryFailure;
fi;

## construct image of <grp> in classical group
Info(InfoRecog,3,"enter image computation");
igens := List(GeneratorsOfGroup(grp),
x->RECOG.rewriteones(r,n,q,grpbasis.basis,grpbasis.blocks,x));
Info(InfoRecog,3,"exit image computation");
if Position(igens,fail) = fail then
return rec( igens := igens, basis := grpbasis,
r := r, n := n, q := q );
else
return TemporaryFailure;
fi;
## construct image of <grp> in classical group
Info(InfoRecog,3,"enter image computation");
igens := List(GeneratorsOfGroup(grp),
x->RECOG.rewriteones(r,n,q,grpbasis.basis,grpbasis.blocks,x));
Info(InfoRecog,3,"exit image computation");
if not fail in igens then
return rec( igens := igens, basis := grpbasis,
r := r, n := n, q := q );
fi;

# <rlist> spans a subspace of R/Z(R) that the generators which failed
# to rewrite do not normalise, for example because the pseudo-random
# conjugators in TestAbelian were badly mixed. Add conjugates under
# those generators; each enlarges the span with probability >= 1/2.
for i in Positions(igens, fail) do
Add(rlist, RandomSubproduct(rlist)^GeneratorsOfGroup(grp)[i]);
od;
od;
return TemporaryFailure;

end;

Expand Down
31 changes: 31 additions & 0 deletions tst/working/quick/ProjC6Core.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
gap> START_TEST("ProjC6Core.tst");

# A scalar in the generator list must not hide the generator after it.
# Here T and D form a hyperbolic pair of 3^(1+2).
gap> T := PermutationMat((1,2,3), 3, GF(7));;
gap> D := DiagonalMat([1, Z(7)^2, Z(7)^4] * Z(7)^0);;
gap> res := RECOG.basis2(3, 1, 7, GroupWithGenerators([One(T), T, D]));;
gap> res.blocks;
[ ]
gap> Length(res.basis.sympl);
2

# If the conjugates found by BlindDescent span a subspace of R/Z(R) that the
# group does not normalise, C6 must enlarge it rather than give up. A single
# element of R spans such a subspace.
gap> h := RECOG.MakeC6Group(Sp(4,3), Sp(4,3), 7);;
gap> G := h[1];;
gap> a := GeneratorsOfGroup(G)[1];;
gap> BlindDescent := RECOG.BlindDescent;;
gap> RECOG.BlindDescent := function(r, n, grp, limit)
> return [a, [a]];
> end;;
gap> re := RECOG.New2RecogniseC6(G);;
gap> RECOG.BlindDescent := BlindDescent;;
gap> re.basis.blocks;
[ ]
gap> Size(Group(re.igens)) = Size(Sp(4,3));
true

#
gap> STOP_TEST("ProjC6Core.tst");
Loading