InstallMethod( ClassPositionsOfCentre, "for a homogeneous list", [ IsHomogeneousList ], function( chi ) local deg, mdeg, degsquare; deg:= chi[1]; mdeg:= - deg; degsquare:= deg^2; return Filtered( [ 1 .. Length( chi ) ], i -> chi[i] = deg or chi[i] = mdeg or ( IsCyc( chi[i] ) and IsCycInt( chi[i] ) and chi[i] * GaloisCyc( chi[i], -1 ) = degsquare ) ); end ); ElementOfList:=function(L,K) local j; for j in [1..Length(L)] do if K=L[j] then return j; fi; od; return 0; end; prime_list:=function(i) local j, L; L:=[]; for j in DivisorsInt(i) do if IsPrime(j) then Add(L, j); fi; od; return L; end; list_max:=function(L) local i, K, S; K:=0; for i in [1..Length(L)] do if KK then Add(H, L[i]); fi; fi; od; return H; end; list_ordering:=function(L) local K, N,i; K:=[]; N:=L; for i in [1..Length(L)] do Add(K, list_max(N)[1]); N:=list_remoting(N,list_max(N)[2]); od; return K; end; Element_howmany_noncent_ConjugacyClasses:=function(G,K) local L, i, j; L:=list_ordering(SizesConjugacyClasses(CharacterTable(G))); j:=0; if K>0 then for i in [1..Length(L)] do j:=j+L[i]; if j>=K then return i; fi; od; else return 0; fi; end; gallagher_g:=function(G) return List(Irr(G), f->(DegreeOfCharacter(f)^2-1)*Size(CentreOfCharacter(f))); end; list_appering:=function(L, K) local i; for i in L do if ElementOfList(K, i)>0 then else return 1; fi; od; return 0; end; gallagher_c:=function(G) local f, L,s; L:=[]; for f in Irr(G) do s:=Element_howmany_noncent_ConjugacyClasses(G,(DegreeOfCharacter(f)^2-1)*Size(CentreOfCharacter(f))); Add(L,s); od; return L; end; ConjugacyClasses_howmany_Element:=function(G, K) local L, i, j, C; C:=Size(Centre(G)); L:=list_ordering(SizesConjugacyClasses(CharacterTable(G))); j:=0; for i in [C..C+K-1] do j:=j+L[Length(L)-i]; od; return j; end; chillag_c:=function(G) local f, i, C, c, K, H; C:=[]; if DerivedSubgroup(G)=G then else K:=CharacterTable(G); for f in Irr(G) do c:=1; if DegreeOfCharacter(f)>1 then H:=DerivedSubgroup(G); if IsIrreducibleCharacter(CharacterTable(H),RestrictedClassFunction(K,f,H)) then c:=2; else c:=Size(G); for i in [1..NrConjugacyClasses(G)] do if f[i]=0 then c:=Minimum(c,SizesCentralizers(K)[i]); fi; od; fi; else c:=0; fi; if IsInt(c/2) then Add(C,c/2); else Add(C,(c+1)/2); fi; od; fi; return C; end; chillag_g:=function(G) local L,C,i,g, H,KH,KG ; L:=[]; if IsInt(Size(G)/2) then g:=Size(G)/2; else g:=(Size(G)+1)/2; fi; C:=chillag_c(G); H:=DerivedSubgroup(G); KH:=CharacterTable(H); KG:=CharacterTable(G); for i in [1..Length(C)] do if C[i]=1 then if IsIrreducibleCharacter(KH,RestrictedClassFunction(KG,Irr(G)[i],H)) then Add(L, ConjugacyClasses_howmany_Element(G,1)); else Add(L,g); fi; else Add(L, ConjugacyClasses_howmany_Element(G,C[i])); fi; od; return L; end; IsElementNeg:=function(L) local i; for i in L do if i<0 then return true; fi; od; return false; end; sqfr:=function(n) local L, i, V; L:=DivisorsInt(n); V:=1; for i in L do if IsPrime(i) then V:=V*i; fi; od; return V; end; wilde_c:=function(G) local f, g, k, n, s, L; L:=[]; g:=Size(G); for f in Irr(G) do s:=0; if f[1]=1 then else for k in ConjugacyClasses(G) do n:=Order(Representative(k)); if IsInt(g*g/f[1]/f[1]/n/sqfr(n)) and IsInt(g*g*g/f[1]/f[1]/n/n/n) then else s:=s+1; fi; od; if s=0 then s:=1; fi; fi; Add(L,s); od; return(L); end; wilde_g:=function(G) local f, g, k, n, s, L; L:=[]; g:=Size(G); for f in Irr(G) do s:=0; if f[1]=1 then else for k in ConjugacyClasses(G) do n:=Order(Representative(k)); if IsInt(g*g/f[1]/f[1]/n/sqfr(n)) and IsInt(g*g*g/f[1]/f[1]/n/n/n) then else s:=s+Size(k); fi; od; if s=0 then s:=Minimum(list_remoting(Set(SizesConjugacyClasses(CharacterTable(G))),1)); fi; fi; Add(L,s); od; return(L); end; compare_Ga_Ch_c:=function(R) local i, j, G; for i in [1..R] do for j in [1..NrSmallGroups(i)] do G:=SmallGroup(i,j); if G=DerivedSubgroup(G) then else if IsElementNeg(gallagher_c(G)-chillag_c(G)) then Print([i,j]); return false; fi; fi; od; od; return true; end; compare_Ch_Ga_c:=function(R) local i, j, G; for i in [1..R] do for j in [1..NrSmallGroups(i)] do G:=SmallGroup(i,j); if G=DerivedSubgroup(G) then else if IsElementNeg(-gallagher_c(G)+chillag_c(G)) then Print([i,j]); return false; fi; fi; od; od; return true; end; compare_W_Ch_c:=function(R) local i, j, G; for i in [1..R] do for j in [1..NrSmallGroups(i)] do G:=SmallGroup(i,j); if G=DerivedSubgroup(G) then else if IsElementNeg(wilde_c(G)-chillag_c(G)) then Print([i,j]); return false; fi; fi; od; od; return true; end; compare_Ch_W_c:=function(R) local i, j, G; for i in [1..R] do for j in [1..NrSmallGroups(i)] do G:=SmallGroup(i,j); if G=DerivedSubgroup(G) then else if IsElementNeg(-wilde_c(G)+chillag_c(G)) then Print([i,j]); return false; fi; fi; od; od; return true; end; compare_W_Ga_c:=function(R) local i, j, G; for i in [1..R] do for j in [1..NrSmallGroups(i)] do G:=SmallGroup(i,j); if IsElementNeg(wilde_c(G)-gallagher_c(G)) then Print([i,j]); return false; fi; od; od; return true; end; compare_Ga_W_c:=function(R) local i, j, G; for i in [1..R] do for j in [1..NrSmallGroups(i)] do G:=SmallGroup(i,j); if IsElementNeg(-wilde_c(G)+gallagher_c(G)) then Print([i,j]); return false; fi; od; od; return true; end; compare_Ga_Ch_g:=function(R) local i, j, G; for i in [1..R] do for j in [1..NrSmallGroups(i)] do G:=SmallGroup(i,j); if G=DerivedSubgroup(G) then else if IsElementNeg(gallagher_g(G)-chillag_g(G)) then Print([i,j]); return false; fi; fi; od; od; return true; end; compare_Ch_Ga_g:=function(R) local i, j, G; for i in [1..R] do for j in [1..NrSmallGroups(i)] do G:=SmallGroup(i,j); if G=DerivedSubgroup(G) then else if IsElementNeg(-gallagher_g(G)+chillag_g(G)) then Print([i,j]); return false; fi; fi; od; od; return true; end; compare_W_Ch_g:=function(R) local i, j, G; for i in [1..R] do for j in [1..NrSmallGroups(i)] do G:=SmallGroup(i,j); if G=DerivedSubgroup(G) then else if IsElementNeg(wilde_g(G)-chillag_g(G)) then Print([i,j]); return false; fi; fi; od; od; return true; end; compare_Ch_W_g:=function(R) local i, j, G; for i in [1..R] do for j in [1..NrSmallGroups(i)] do G:=SmallGroup(i,j); if G=DerivedSubgroup(G) then else if IsElementNeg(-wilde_g(G)+chillag_g(G)) then Print([i,j]); return false; fi; fi; od; od; return true; end; compare_W_Ga_g:=function(R) local i, j, G; for i in [1..R] do for j in [1..NrSmallGroups(i)] do G:=SmallGroup(i,j); if IsElementNeg(wilde_g(G)-gallagher_g(G)) then Print([i,j]); return false; fi; od; od; return true; end; compare_Ga_W_g:=function(R) local i, j, G; for i in [1..R] do for j in [1..NrSmallGroups(i)] do G:=SmallGroup(i,j); if IsElementNeg(-wilde_g(G)+gallagher_g(G)) then Print([i,j]); return false; fi; od; od; return true; end; Print("compare_x_y returns the ID of the smallest group on which the estimate 'y' is greater than 'x'." ); Print("\n");