Skip to content

Commit

Permalink
ENHANCE: Multiclass identification
Browse files Browse the repository at this point in the history
for TF case. And enable use in Dixon, e.g. for permgroups.
  • Loading branch information
hulpke authored and fingolfin committed Apr 5, 2023
1 parent 781c5b0 commit 548e8a5
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 11 deletions.
115 changes: 114 additions & 1 deletion lib/clashom.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2938,7 +2938,10 @@ local r, #radical
select:=[1..Length(reps)];
while Length(select)>0 do
pos:=select[1];
sel:=Filtered(select,x->reps[x][3]=reps[pos][3]);
# same reps, same gens
sel:=Filtered(select,x->reps[x][3]=reps[pos][3] and
reps[x][5]=reps[pos][5] and reps[x][6]=reps[pos][6]);

if ValueOption("conjugacytest")=true and Length(sel)<>2 then
return fail;
fi;
Expand Down Expand Up @@ -3085,3 +3088,113 @@ function(G)
if IsPermGroup(G) or IsPcGroup(G) then TryNextMethod();fi;
return ConjugacyClassesViaRadical(G);
end);


#############################################################################
##
#F TFClassMatrixColumn(<D>,<mat>,<r>,<t>) . calculate the t-th column
#F of the r-th class matrix and store it in the appropriate column of M
##
BindGlobal("TFClassMatrixColumn",function(D,M,r,t)
local c,gt,s,z,i,T,w,e,j,p,orb,collect,found,id;
if t=1 then
M[D.inversemap[r],t]:=D.classiz[r];
else
orb:=DxGaloisOrbits(D,r);
z:=D.classreps[t];
c:=orb.orbits[t][1];
if c<>t then
p:=RepresentativeAction(Stabilizer(orb.group,r),c,t);
if p<>fail then
# was the first column of the galois class active?
if ForAny([1..NrRows(M)],i->M[i,c]>0) then
for i in D.classrange do
M[i^p,t]:=M[i,c];
od;
Info(InfoCharacterTable,2,"Computing column ",t,
" : by GaloisImage");
return;
fi;
fi;
fi;

T:=DoubleCentralizerOrbit(D,r,t);
Info(InfoCharacterTable,2,"Computing column ",t," :",
Length(T[1])," instead of ",D.classiz[r]);

if IsDxLargeGroup(D.group) then
# if r and t are unique,the conjugation test can be weak (i.e. up to
# galois automorphisms)
w:=Length(orb.orbits[t])=1 and Length(orb.orbits[r])=1;
collect:=[];
for i in [1..Length(T[1])] do
e:=T[1][i]*z;
Unbind(T[1][i]);
found:=false;
if w then
c:=D.rationalidentification(D,e);
if c in orb.uniqueIdentifications then
s:=orb.orbits[
First([1..D.klanz],j->D.rids[j]=c)][1];
M[s,t]:=M[s,t]+T[2][i];
found:=true;
fi;
fi;
if not found then
id:=D.cheapIdentification(D,e);
s:=Filtered([1..D.klanz],i->D.chids[i]=id);
if Length(s)=1 then
s:=s[1];
M[s,t]:=M[s,t]+T[2][i];
else
# only strong test possible
Add(collect,[e,First(D.faclaimg,y->y[1]=id)[2],T[2][i]]);
#s:=D.ClassElement(D,e);
#M[s,t]:=M[s,t]+T[2][i];
fi;
fi;
od;
#Print(Length(collect)," collected\n");
if Length(collect)=1 then
s:=D.ClassElement(D,collect[1][1]);
M[s,t]:=M[s,t]+collect[1][3];
else
for id in Set(List(collect,x->x[2])) do
found:=Filtered(collect,x->x[2]=id);
s:=TFCanonicalClassRepresentative(D.group,
List(found,x->x[1]):candidatenums:=id);
s:=List(s,x->x[2]);
s:=List(s,x->First(id,y->D.canreps[y]=x));
for i in [1..Length(s)] do
M[s[i],t]:=M[s[i],t]+found[i][3];
od;

od;
fi;

if w then # weak discrimination possible ?
gt:=Set(Filtered(orb.orbits,i->Length(i)>1));
for i in gt do
if i[1] in orb.identifees then
# were these classes detected weakly ?
e:=M[i[1],t];
if e>0 then
Info(InfoCharacterTable,3,"GaloisIdentification ",i,": ",e);
fi;
for j in i do
M[j,t]:=e/Length(i);
od;
fi;
od;
fi;
else # Small Group
for i in [1..Length(T[1])] do
s:=D.ClassElement(D,T[1][i] * z);
Unbind(T[1][i]);
M[s,t]:=M[s,t]+T[2][i];
od;
fi;
fi;
end);


2 changes: 2 additions & 0 deletions lib/ctblgrp.gd
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ DeclareGlobalFunction( "IsDxLargeGroup" );
DeclareGlobalFunction("DxModularValuePol");
DeclareGlobalFunction("DxDegreeCandidates");

DeclareGlobalFunction("DxGaloisOrbits");
DeclareGlobalFunction("DoubleCentralizerOrbit");

#############################################################################
##
Expand Down
7 changes: 3 additions & 4 deletions lib/ctblgrp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,7 @@ end );
##
#F DxGaloisOrbits(<D>,<f>) . orbits of Stab_Gal(f) when acting on the classes
##
BindGlobal( "DxGaloisOrbits", function(D,f)
InstallGlobalFunction(DxGaloisOrbits,function(D,f)
local i,k,l,u,ga,galOp,p;
k:=D.klanz;
if not IsBound(D.galOp[f]) then
Expand Down Expand Up @@ -1298,8 +1298,7 @@ local i,k,l,u,ga,galOp,p;
fi;
fi;
return D.galOp[f];
end );

end);

#############################################################################
##
Expand Down Expand Up @@ -1692,7 +1691,7 @@ end );
## whenever they might become bigger using double cosets of the
## centralizers.
##
BindGlobal("DoubleCentralizerOrbit",function(D,c1,c2)
InstallGlobalFunction(DoubleCentralizerOrbit,function(D,c1,c2)
local often,trans,e,neu,i,inv,cent,l,s,s1,x,dom;
inv:=D.inversemap[c1];
s1:=D.classiz[c1];
Expand Down
22 changes: 17 additions & 5 deletions lib/ctblperm.gi
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ end );
## The class invariant consists of the cycle structure and - if computation
## might improve results - of the Fingerprint of the permutation
##
BindGlobal( "IdentificationPermGroup", function(D,el)
BindGlobal("CheapIdentificationPermGroup",function(D,el)
local s,t,i,l; # guter Programmier s t i l !
s:=CycleStructurePerm(el);
s:=ShallowCopy(s);
Expand All @@ -58,13 +58,19 @@ BindGlobal( "IdentificationPermGroup", function(D,el)
Add(s,-FingerprintPerm(D,el,D.p1,D.p2,D.fingerprintOrbitStabilizer,
D.fingerprintRepresentatives));
fi;
return s;
end);

BindGlobal("IdentificationPermGroup",function(D,el)
local s,l;
s:=CheapIdentificationPermGroup(D,el);
if IsBound(D.usefitfree) and not s in D.nocanonize then
l:=First(D.faclaimg,x->x[1]=s);
l:=TFCanonicalClassRepresentative(D.group,[el]:candidatenums:=l[2]);
Add(s,l[1][2]);
fi;
return s;
end );
end);


#############################################################################
Expand Down Expand Up @@ -93,6 +99,7 @@ local k,structures,ambiguousStructures,i,j,p,cem,ces,z,t,cen,a,
c,s,f,fc,fs,fos,fr,enum;

D.identification:=IdentificationPermGroup;
D.cheapIdentification:=CheapIdentificationPermGroup;
D.rationalidentification:=RationalIdentificationPermGroup;
D.ClassMatrixColumn:=StandardClassMatrixColumn;

Expand Down Expand Up @@ -213,16 +220,22 @@ local k,structures,ambiguousStructures,i,j,p,cem,ces,z,t,cen,a,
fi;

D.ids:=[];
D.chids:=[];
D.rids:=[];
D.canreps:=[];
for i in [1..D.klanz] do
D.ids[i]:=D.identification(D,D.classreps[i]);
D.chids[i]:=D.cheapIdentification(D,D.classreps[i]);
D.rids[i]:=
D.rationalidentification(D,D.classreps[i]);
D.rationalidentification(D,D.classreps[i]);
D.canreps[i]:=
TFCanonicalClassRepresentative(D.group,[D.classreps[i]])[1][2];
od;

# use canonical reps?
if Size(SolvableRadical(D.group))>1 then
D.usefitfree:=true;
D.ClassMatrixColumn:=TFClassMatrixColumn;
D.nocanonize:=[];
D.faclaimg:=[];
fs:=List(D.ids,ShallowCopy);
Expand All @@ -232,8 +245,7 @@ local k,structures,ambiguousStructures,i,j,p,cem,ces,z,t,cen,a,
Add(D.nocanonize,fs[i]);
else
Add(D.faclaimg,[fs[i],f]); # store which classes images could be
f:=TFCanonicalClassRepresentative(D.group,[D.classreps[i]]);
Add(D.ids[i],f[1][2]);
Add(D.ids[i],D.canreps[i]);
fi;
od;
fi;
Expand Down
1 change: 0 additions & 1 deletion lib/fitfree.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1558,4 +1558,3 @@ local ff,i,j,c,q,a,b,prev,sub,m,k;
return c;
end);


0 comments on commit 548e8a5

Please sign in to comment.