Skip to content
Merged
1 change: 1 addition & 0 deletions doc/ref/groups.xml
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ the series without destroying the properties of the series.
<#Include Label="LowLayerSubgroups">
<#Include Label="ContainedConjugates">
<#Include Label="ContainingConjugates">
<#Include Label="MinimalFaithfulPermutationDegree">
<#Include Label="RepresentativesPerfectSubgroups">
<#Include Label="ConjugacyClassesPerfectSubgroups">
<#Include Label="Zuppos">
Expand Down
2 changes: 1 addition & 1 deletion doc/ref/grpfp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ gap> f := FreeGroup( "a", "b" );
gap> g := f / [ f.1^2, f.2^3, (f.1*f.2)^5 ];
<fp group on the generators [ a, b ]>
gap> h := IsomorphismPermGroup( g );
[ a, b ] -> [ (1,2)(3,5), (2,3,4) ]
[ a, b ] -> [ (1,2)(4,5), (2,3,4) ]
gap> u:=Subgroup(g,[g.1*g.2]);;rt:=RightTransversal(g,u);
RightTransversal(<fp group of size 60 on the generators
[ a, b ]>,Group([ a*b ]))
Expand Down
4 changes: 2 additions & 2 deletions lib/claspcgs.gi
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ local G, home, # the group and the home pcgs
cent:=false;

elif IsPrimePowerInt(Size(G)) then
p:=FactorsInt(Size(G))[1];
p:=PrimePGroup(G);
home:=PcgsPCentralSeriesPGroup(G);
eas:=PCentralNormalSeriesByPcgsPGroup(home);

Expand Down Expand Up @@ -1107,7 +1107,7 @@ local G, home, # the group and the home pcgs
(InducedPcgs(home,cl.centralizer), c -> Comm(k, c) in L));
end;
elif IsPrimePowerInt(Size(G)) then
p:=FactorsInt(Size(G))[1];
p:=PrimePGroup(G);
home:=PcgsPCentralSeriesPGroup(G);
eas:=PCentralNormalSeriesByPcgsPGroup(home);

Expand Down
10 changes: 5 additions & 5 deletions lib/ctbl.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,7 @@ InstallGlobalFunction( CharacterTable_IsNilpotentNormalSubgroup,
orders:= OrdersClassRepresentatives( tbl );
ppow:= Filtered( N, i -> IsPrimePowerInt( orders[i] ) );

for part in Collected( FactorsInt( Sum( classlengths{ N }, 0 ) ) ) do
for part in Collected( Factors(Integers, Sum( classlengths{ N }, 0 ) ) ) do

# Check whether the Sylow p subgroup of `N' is normal in `N',
# i.e., whether the number of elements of p-power is equal to
Expand Down Expand Up @@ -2903,7 +2903,7 @@ InstallMethod( PrimeBlocksOp,
if d = ppart then
d:= 0;
else
d:= Length( FactorsInt( ppart / d ) ); # the defect
d:= Length( Factors(Integers, ppart / d ) ); # the defect
fi;
Add( primeblocks.defect, d );

Expand Down Expand Up @@ -4923,7 +4923,7 @@ BindGlobal( "CharacterTableDisplayDefault", function( tbl, options )
elif centralizers = true then
Print( "\n" );
for i in [col..col+acol-1] do
fak:= FactorsInt( tbl_centralizers[classes[i]] );
fak:= Factors(Integers, tbl_centralizers[classes[i]] );
for prime in Set( fak ) do
cen[prime][i]:= Number( fak, x -> x = prime );
od;
Expand Down Expand Up @@ -5279,8 +5279,8 @@ InstallMethod( CharacterTableDirectProduct,

# Compute power maps for all prime divisors of the result order.
vals_direct:= ComputedPowerMaps( direct );
for k in Union( FactorsInt( Size( tbl1 ) ),
FactorsInt( Size( tbl2 ) ) ) do
for k in Union( Factors(Integers, Size( tbl1 ) ),
Factors(Integers, Size( tbl2 ) ) ) do
powermap_k:= [];
vals1:= PowerMap( tbl1, k );
vals2:= PowerMap( tbl2, k );
Expand Down
4 changes: 2 additions & 2 deletions lib/ctblfuns.gi
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ InstallMethod( CorrespondingPermutations,
# Note that if we have taken away a union of orbits such that the
# number of remaining points is smaller than the smallest prime
# divisor of the order of `g' then all these points must be fixed.
min:= FactorsInt( Order( g ) )[1];
min:= Factors(Integers, Order( g ) )[1];
images:= [];

for list in part do
Expand Down Expand Up @@ -942,7 +942,7 @@ InstallOtherMethod( CorrespondingPermutations,
# Note that if we have taken away a union of orbits such that the
# number of remaining points is smaller than the smallest prime
# divisor of the order of `g' then all these points must be fixed.
min:= FactorsInt( Order( g ) )[1];
min:= Factors(Integers, Order( g ) )[1];
images:= [];

for list in part do
Expand Down
4 changes: 2 additions & 2 deletions lib/ctblmaps.gi
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ InstallOtherMethod( PowerMapOp,
fi;

image:= class;
for i in FactorsInt( n ) do
for i in Factors(Integers, n ) do
# Here we use that `n' is a small integer.
if not IsBound( powermap[i] ) then

Expand Down Expand Up @@ -3368,7 +3368,7 @@ InstallGlobalFunction( ConsiderSmallerPowerMaps, function( arg )

for i in omega do

factors:= FactorsInt( prime mod tbl_orders[i] );
factors:= Factors(Integers, prime mod tbl_orders[i] );
if factors = [ 1 ] or factors = [ 0 ] then factors:= []; fi;

if ForAll( Set( factors ), x -> IsBound( tbl_powermap[x] ) ) then
Expand Down
6 changes: 3 additions & 3 deletions lib/ctblmono.gi
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ InstallMethod( IsMonomialNumber,
pair2, # loop over `collect'
ord; # multiplicative order

factors := FactorsInt( n );
factors := Factors(Integers, n );
collect := Collected( factors );

# Get $\nu_2(n)$.
Expand Down Expand Up @@ -1120,7 +1120,7 @@ InstallMethod( TestMonomialQuick,
if IsSolvableGroup( G ) then

pi := PrimeDivisors( codegree );
hall := Product( Filtered( FactorsInt( factsize ), x -> x in pi ), 1 );
hall := Product( Filtered( Factors(Integers, factsize ), x -> x in pi ), 1 );

if factsize / hall = chi[1] then

Expand Down Expand Up @@ -1967,7 +1967,7 @@ InstallMethod( IsMinimalNonmonomial,
factsize:= Index( K, F );

# The Fitting subgroup of a minimal nomonomial group is a $p$-group.
facts:= FactorsInt( Size( F ) );
facts:= Factors(Integers, Size( F ) );
p:= Set( facts );
if 1 < Length( p ) then
return false;
Expand Down
2 changes: 1 addition & 1 deletion lib/ctblpope.gi
Original file line number Diff line number Diff line change
Expand Up @@ -1888,7 +1888,7 @@ InstallGlobalFunction( PermCandidatesFaithful,
od;
# `primes': prime divisors of $|U|$ for which there is only one $G$-family
# of that element order in $UN$:
factors:= FactorsInt( tbl_size / torso[1] );
factors:= Factors(Integers, tbl_size / torso[1] );
primes:= Set( factors );
orbits:= List( primes, p -> [] );
for i in [ 1 .. nccl ] do
Expand Down
4 changes: 2 additions & 2 deletions lib/cyclotom.gi
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ InstallGlobalFunction( CoeffsCyc, function( z, N )
# must be equal, and the negative of this value is put at the
# position of the $p$-th element of this congruence class.
if second > 1 then
for p in FactorsInt( second ) do
for p in Factors(Integers, second ) do
nn:= n / p;
newcoeffs:= ListWithIdenticalEntries( nn, 0 );
for k in [ 1 .. n ] do
Expand Down Expand Up @@ -1245,7 +1245,7 @@ InstallGlobalFunction( Quadratic, function( arg )
fi;

coeffs:= ExtRepOfObj( cyc );
facts:= FactorsInt( Length( coeffs ) );
facts:= Factors(Integers, Length( coeffs ) );
factsset:= Set( facts );
two_part:= Number( facts, x -> x = 2 );

Expand Down
2 changes: 1 addition & 1 deletion lib/ffe.gi
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ InstallMethod( Order,
p := Characteristic(z);
d := DegreeFFE(z);
ord := p^d-1;
facs := Collected(FactorsInt(ord));
facs := Collected(Factors(Integers,ord));
for f in facs do
for i in [1..f[2]] do
o := ord/f[1];
Expand Down
6 changes: 3 additions & 3 deletions lib/ffeconway.gi
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ FFECONWAY.WriteOverSmallestField := function(x)
return x![3];
fi;
d := x![2];
f := Collected(FactorsInt(d));
f := Collected(Factors(Integers,d));
for fac in f do
l := fac[1];
d1 := d/l;
Expand Down Expand Up @@ -1355,7 +1355,7 @@ FFECONWAY.DoLogFFE :=
fi;

# use rho method
f:=FactorsInt(q-1:quiet); # Quick factorization, don't stop if its too hard
f:=Factors(Integers,q-1:quiet); # Quick factorization, don't stop if its too hard
return FFECONWAY.DoLogFFERho(y,z,q-1,f,q);
end;

Expand Down Expand Up @@ -1392,7 +1392,7 @@ InstallMethod( Order,
p := Characteristic(z);
d := DegreeFFE(z);
ord := p^d-1;
facs := Collected(FactorsInt(ord));
facs := Collected(Factors(Integers,ord));
for f in facs do
for i in [1..f[2]] do
o := ord/f[1];
Expand Down
6 changes: 3 additions & 3 deletions lib/fldabnum.gi
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ InstallGlobalFunction( ZumbroichBase, function( n, m )
Error( "<m> must be a divisor of <n>" );
fi;

factsn:= FactorsInt( n );
factsn:= Factors(Integers, n );
primes:= Set( factsn );
exponsn:= List( primes, x -> 0 ); # Product(List( [1..Length(primes)],
# x->primes[i]^exponsn[i]))=n
Expand All @@ -837,7 +837,7 @@ InstallGlobalFunction( ZumbroichBase, function( n, m )
exponsn[ pos ]:= exponsn[ pos ] + 1;
od;

factsm:= FactorsInt( m );
factsm:= Factors(Integers, m );
exponsm:= List( primes, x -> 0 ); # Product(List( [1..Length(primes)],
# x->primes[i]^exponsm[i]))=m
if m <> 1 then
Expand Down Expand Up @@ -960,7 +960,7 @@ InstallGlobalFunction( LenstraBase, function( n, stabilizer, supergroup, m )
m:= m / 2;
fi;

factors := FactorsInt( n );
factors := Factors(Integers, n );
primes := Set( factors );
coprimes := Filtered( primes, x -> m mod x <> 0 );
nprime := Product( Filtered( factors, x -> m mod x <> 0 ) );
Expand Down
28 changes: 28 additions & 0 deletions lib/ghomfp.gd
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,34 @@ DeclareAttribute("EpimorphismFromFreeGroup",IsGroup);
##
DeclareGlobalFunction("LargerQuotientBySubgroupAbelianization");

#############################################################################
##
#F ProcessEpimorphismToNewFpGroup( <hom> )
##
## <#GAPDoc Label="ProcessHomomorphismToNewFpGroup">
## <ManSection>
## <Func Name="LargerQuotientBySubgroupAbelianization" Arg='hom'/>
##
## <Description>
## Let <A>hom</A> a homomorphism from a group <A>G</A> to a newly created
## finitely presented group <A>F</A> (in which no calculation yet has taken
## place) such that the inverse of <A>hom</A> can be appied to elements of
## $F$. This function endows <A>F</A> (or, more
## correctly, its elements family) with information (in the form of an
## <C>FPFaithHom</C>) about <A>G</A> that can be
## used to obtain a faithful representation for <A>F</A>. This can be in the
## form of <A>G</A> itself being a permutation/matrix or fp group. It also can
## be if <A>G</A> is finitely presented but (its family) has an
## <C>FPFaithHom</A>. (However it will not apply if <A>G</A> is a subgroup
## of an fp group.) The result of this is make higher level calculations in
## <A>F</A> more efficient.
## This is an internal function that does not test its arguments and the
## result is undefined if calling the function on any other object.
## </Description>
## </ManSection>
## <#/GAPDoc>
##
DeclareGlobalFunction("ProcessEpimorphismToNewFpGroup");

#############################################################################
##
Expand Down
41 changes: 41 additions & 0 deletions lib/ghomfp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,7 @@ local H, pres,map,mapi,opt;
SetIsBijective(map,true);
SetInverseGeneralMapping(map,mapi);
SetInverseGeneralMapping(mapi,map);
ProcessEpimorphismToNewFpGroup(map);

return map;
end );
Expand Down Expand Up @@ -1228,6 +1229,46 @@ local F,str;
GroupHomomorphismByImagesNC(F,G,GeneratorsOfGroup(F),GeneratorsOfGroup(G));
end);

InstallGlobalFunction(ProcessEpimorphismToNewFpGroup,
function(hom)
local s,r,fam,fas,fpf,mapi;
if not (HasIsSurjective(hom) and IsSurjective(hom)) then
Info(InfoWarning,1,"fp eipimorphism is created in strange way, bail out");
return; # hom might be ill defined.
fi;
s:=Source(hom);
r:=Range(hom);
mapi:=MappingGeneratorsImages(hom);
if mapi[2]<>GeneratorsOfGroup(r) then
return; # the method does not apply here. One could try to deal with the
#extra generators separately, but that is too much work for what is
#intended as a minor hint.
fi;
s:=SubgroupNC(s,mapi[1]);
fam:=FamilyObj(One(r));
fas:=FamilyObj(One(s));
if IsPermCollection(s) or IsMatrixCollection(s)
Copy link
Member

Choose a reason for hiding this comment

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

Any particular reason you are not using IsPermGroup(s) or IsMatrixGroup(s) here? There should be no functional difference, but IMHO it conveys the intention of the code more naturally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason for the category test was that I was thinking in the context of CanEasily.... It could as well be the Group test.

or IsPcGroup(s) or CanEasilyCompareElements(s) then
# in the long run this should be the inverse of the source restricted
# mapping (or the corestricted inverse) but that does not work well with
# current homomorphism code, thus build new map.
#fpf:=InverseGeneralMapping(hom);
fpf:=GroupHomomorphismByImagesNC(r,s,mapi[2],mapi[1]);
elif IsFpGroup(s) and HasFPFaithHom(fas) then
#fpf:=InverseGeneralMapping(hom)*FPFaithHom(fas);
fpf:=GroupHomomorphismByImagesNC(r,s,mapi[2],List(mapi[1],x->Image(FPFaithHom(fas),x)));
else
fpf:=fail;
fi;
if fpf<>fail then
SetEpimorphismFromFreeGroup(ImagesSource(fpf),fpf);
SetFPFaithHom(fam,fpf);
SetFPFaithHom(r,fpf);
if IsPermGroup(s) then SetIsomorphismPermGroup(r,fpf);fi;
if IsPcGroup(s) then SetIsomorphismPcGroup(r,fpf);fi;
fi;
end);

#############################################################################
##
#E
Expand Down
9 changes: 8 additions & 1 deletion lib/gpfpiso.gi
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ local l,iso,fp,stbc,gens;

stbc:=StabChainMutable(G);
gens:=StrongGeneratorsStabChain(stbc);
return IsomorphismFpGroupByGeneratorsNC( G, gens, str:chunk );
iso:=IsomorphismFpGroupByGeneratorsNC( G, gens, str:chunk );
ProcessEpimorphismToNewFpGroup(iso);
return iso;
end);

#############################################################################
Expand Down Expand Up @@ -224,6 +226,7 @@ function( G, str )
iso := GroupHomomorphismByImagesNC( G, F, imgsF, gensF );
SetIsBijective( iso, true );
SetKernelOfMultiplicativeGeneralMapping( iso, TrivialSubgroup( G ) );
ProcessEpimorphismToNewFpGroup(iso);
return iso;
end );

Expand Down Expand Up @@ -442,6 +445,7 @@ function(g,str,N)

hom!.decompinfo:=MakeImmutable(di);
SetIsWordDecompHomomorphism(hom,true);
ProcessEpimorphismToNewFpGroup(hom);
return hom;
end);

Expand Down Expand Up @@ -719,6 +723,7 @@ function( G, gens, str )
Length( relators ), " rels of total length ",
Sum( List( relators, rel -> Length( rel ) ) ) );
fi;
ProcessEpimorphismToNewFpGroup(iso);
return iso;
end );

Expand All @@ -742,6 +747,7 @@ function( G, gens, str )
fi;
SetIsBijective( iso, true );
SetKernelOfMultiplicativeGeneralMapping( iso, TrivialSubgroup(G) );
ProcessEpimorphismToNewFpGroup(iso);
return iso;
end );

Expand Down Expand Up @@ -849,6 +855,7 @@ function( G, series, str )
iso := GroupHomomorphismByImagesNC( G, F, imgsF, gensF );
SetIsBijective( iso, true );
SetKernelOfMultiplicativeGeneralMapping( iso, TrivialSubgroup( G ) );
ProcessEpimorphismToNewFpGroup(iso);
return iso;
end);

Expand Down
4 changes: 3 additions & 1 deletion lib/gpprmsya.gi
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ local F, # free group
# return the isomorphism to the finitely presented group
hom:= GroupHomomorphismByImagesNC(G,F,imgs,GeneratorsOfGroup(F));
SetIsBijective( hom, true );
ProcessEpimorphismToNewFpGroup(hom);
return hom;
end);

Expand Down Expand Up @@ -1364,7 +1365,7 @@ syll, act, typ, sel, bas, wdom, comp, lperm, other, away, i, j,b0,opg,bp;
if not issym then
pg:=AlternatingSubgroup(pg);
fi;
if IsSolvableGroup(pg) then
if (Size(pg)/Size(u))>10000 and IsSolvableGroup(pg) then
perm:=IsomorphismPcGroup(pg);
pg:=PreImage(perm,Normalizer(Image(perm,pg),Image(perm,u)));
fi;
Expand Down Expand Up @@ -1778,6 +1779,7 @@ local F, # free group
# return the isomorphism to the finitely presented group
hom:= GroupHomomorphismByImagesNC(G,F,imgs,GeneratorsOfGroup(F));
SetIsBijective( hom, true );
ProcessEpimorphismToNewFpGroup(hom);
return hom;
end);

Expand Down
Loading