diff --git a/lib/claspcgs.gi b/lib/claspcgs.gi index 88f691b09e..a9916bc9f6 100644 --- a/lib/claspcgs.gi +++ b/lib/claspcgs.gi @@ -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); @@ -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); diff --git a/lib/ctbl.gi b/lib/ctbl.gi index a7532a32bd..4efb2d3f03 100644 --- a/lib/ctbl.gi +++ b/lib/ctbl.gi @@ -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 @@ -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 ); @@ -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; @@ -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 ); diff --git a/lib/ctblfuns.gi b/lib/ctblfuns.gi index 341455c244..52f3ab9757 100644 --- a/lib/ctblfuns.gi +++ b/lib/ctblfuns.gi @@ -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 @@ -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 diff --git a/lib/ctblmaps.gi b/lib/ctblmaps.gi index bcbf328926..0d7c8b4296 100644 --- a/lib/ctblmaps.gi +++ b/lib/ctblmaps.gi @@ -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 @@ -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 diff --git a/lib/ctblmono.gi b/lib/ctblmono.gi index 09844eeab5..6b5549d211 100644 --- a/lib/ctblmono.gi +++ b/lib/ctblmono.gi @@ -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)$. @@ -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 @@ -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; diff --git a/lib/ctblpope.gi b/lib/ctblpope.gi index 1a1fb327b3..b8ecac6b3d 100644 --- a/lib/ctblpope.gi +++ b/lib/ctblpope.gi @@ -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 diff --git a/lib/cyclotom.gi b/lib/cyclotom.gi index 77c2cc128c..4ac1fa3958 100644 --- a/lib/cyclotom.gi +++ b/lib/cyclotom.gi @@ -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 @@ -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 ); diff --git a/lib/ffe.gi b/lib/ffe.gi index c7da2966b7..75382896df 100644 --- a/lib/ffe.gi +++ b/lib/ffe.gi @@ -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]; diff --git a/lib/ffeconway.gi b/lib/ffeconway.gi index 24ab129d0f..f4ae0d4800 100644 --- a/lib/ffeconway.gi +++ b/lib/ffeconway.gi @@ -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; @@ -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; @@ -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]; diff --git a/lib/fldabnum.gi b/lib/fldabnum.gi index d8a8c33d02..ba4609f869 100644 --- a/lib/fldabnum.gi +++ b/lib/fldabnum.gi @@ -823,7 +823,7 @@ InstallGlobalFunction( ZumbroichBase, function( n, m ) Error( " must be a divisor of " ); 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 @@ -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 @@ -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 ) ); diff --git a/lib/grp.gi b/lib/grp.gi index f4cb52b4dd..b7fa87b2b0 100644 --- a/lib/grp.gi +++ b/lib/grp.gi @@ -659,7 +659,7 @@ InstallMethod( AbelianInvariants, G := H; gns := GeneratorsOfGroup( G ); if r <> 1 then - Add( ranks, Length(FactorsInt(r)) ); + Add( ranks, Length(Factors(Integers,r)) ); fi; until r = 1; Info( InfoGroup, 2, @@ -1625,7 +1625,7 @@ InstallGlobalFunction( SupersolvableResiduumDefault, function( G ) # `df' is the commutator factor group `oldssr / ssr'. df:= Range( dh ); SetIsAbelian( df, true ); - fs:= FactorsInt( Size( df ) ); + fs:= Factors(Integers, Size( df ) ); # `gen' collects the generators for the next candidate gen := ShallowCopy( GeneratorsOfGroup( df ) ); @@ -3653,8 +3653,8 @@ IsomorphismTypeInfoFiniteSimpleGroup_fun:= function( G ) # from now on we deal with groups of Lie-type # calculate the dominant prime of size - q := Maximum( List( Collected( FactorsInt( size ) ), s -> s[1]^s[2] ) ); - p := FactorsInt( q )[1]; + q := Maximum( List( Collected( Factors(Integers, size ) ), s -> s[1]^s[2] ) ); + p := Factors(Integers, q )[1]; # test if is the Chevalley group A(1,7) ~ A(2,2) if size = 168 then @@ -4580,7 +4580,7 @@ function( g ) if o = 1 then return []; fi; # start to split - f := FactorsInt( o ); + f := Factors(Integers, o ); if Length( Set( f ) ) = 1 then return [ g ]; else @@ -4609,7 +4609,7 @@ function( g, p ) o := Order( g ); if o = 1 then return g; fi; - f := FactorsInt( o ); + f := Factors(Integers, o ); x := Number( f, x -> x = p ); if x = 0 then return g^o; fi; diff --git a/lib/grpffmat.gi b/lib/grpffmat.gi index ef66e4c248..0a97f882f6 100644 --- a/lib/grpffmat.gi +++ b/lib/grpffmat.gi @@ -515,7 +515,7 @@ end); ## PSL(n,q), SU(n,q) and PSU(n,q) ## InstallGlobalFunction(Phi2, -n -> n^2 * Product(Set(Filtered(FactorsInt(n), m -> m <> 1)), +n -> n^2 * Product(Set(Filtered(Factors(Integers,n), m -> m <> 1)), p -> (1 - 1/p^2))); ############################################################################# diff --git a/lib/grppcfp.gi b/lib/grppcfp.gi index 4d4dbe806a..423f293c5d 100644 --- a/lib/grppcfp.gi +++ b/lib/grppcfp.gi @@ -159,7 +159,7 @@ gensA, relsA, gensG, imgs, prei, i, j, k, l, norm, index, diag, n,genu; # compute pc presentation for the finite quotient n := Filtered( diag, x -> x <> 1 ); - n := Length( Flat( List( n, x -> FactorsInt( x ) ) ) ); + n := Length( Flat( List( n, x -> Factors(Integers, x ) ) ) ); A := FreeGroup(IsSyllableWordsFamily, n ); gensA := GeneratorsOfGroup( A ); @@ -170,7 +170,7 @@ gensA, relsA, gensG, imgs, prei, i, j, k, l, norm, index, diag, n,genu; for i in [ 1..ng ] do if D[i][i] <> 1 then index[i] := g; - pf[i] := TransposedMat( Collected( FactorsInt( D[i][i] ) ) ); + pf[i] := TransposedMat( Collected( Factors(Integers, D[i][i] ) ) ); pf[i] := rec( factors := pf[i][1], powers := pf[i][2] ); for j in [ 1..Length( pf[i].factors ) ] do @@ -844,7 +844,7 @@ local G, epi, tup, lift, i, found, fac, j, p, iso; i := primes / Size( G ); found := true; while i > 1 and found do - fac := Collected( FactorsInt( i ) ); + fac := Collected( Factors(Integers, i ) ); found := false; j := 1; while not found and j <= Length( fac ) do diff --git a/lib/grpperm.gi b/lib/grpperm.gi index d25dfa9394..08af86ef2c 100644 --- a/lib/grpperm.gi +++ b/lib/grpperm.gi @@ -1542,7 +1542,7 @@ InstallMethod( Socle,"for permgrp", true, [ IsPermGroup ], 0, elif deg < 12960000 then shortcut := true; if deg >= 3125 then - coll := Collected( FactorsInt( deg ) ); + coll := Collected( Factors(Integers, deg ) ); d := Gcd( List( coll, c -> c[ 2 ] ) ); if d mod 5 = 0 then m := 1; @@ -1560,7 +1560,7 @@ InstallMethod( Socle,"for permgrp", true, [ IsPermGroup ], 0, fi; fi; - coll := Collected( FactorsInt( Size( G ) ) ); + coll := Collected( Factors(Integers, Size( G ) ) ); if deg < 78125 then p := coll[ Length( coll ) ][ 1 ]; else diff --git a/lib/grpprmcs.gi b/lib/grpprmcs.gi index 61a93eaf70..7b93290fad 100644 --- a/lib/grpprmcs.gi +++ b/lib/grpprmcs.gi @@ -279,7 +279,7 @@ InstallGlobalFunction( NonPerfectCSPG, i; # loop variables # number of primes in factor / - listlength := Length(FactorsInt(top)); + listlength := Length(Factors(Integers,top)); indexup := index+listlength; oldworkup := D; @@ -294,7 +294,7 @@ InstallGlobalFunction( NonPerfectCSPG, x->(x^g in oldworkup) )); workup := ClosureGroup(oldworkup, g); order := Size(workup)/Size(oldworkup); - orderlist := FactorsInt(order); + orderlist := Factors(Integers,order); for i in [1..Length(orderlist)] do # h is the power of g which adds prime length factors @@ -405,7 +405,7 @@ InstallGlobalFunction( PerfectCSPG, OnTuples); if IsTrivial(stab2) then - prime := FactorsInt(whichcase[2])[1]; + prime := Factors(Integers,whichcase[2])[1]; N:=Group(One(K)); repeat kerelement:=Random(K); @@ -431,7 +431,7 @@ InstallGlobalFunction( PerfectCSPG, L := Orbit( H, StabChainMutable( H ).orbit[1] ); tchom := ActionHomomorphism(H,L,"surjective"); op := Image( tchom ); - H := PreImage(tchom,PCore(op,FactorsInt(whichcase[2])[1])); + H := PreImage(tchom,PCore(op,Factors(Integers,whichcase[2])[1])); H := Centre(H); SetIsAbelian( H, true ); fi; @@ -519,7 +519,7 @@ InstallGlobalFunction( CasesCSPG, function(G) fi; # degree is not prime power - primes := FactorsInt(degree); + primes := Factors(Integers,degree); if primes[1] < primes[Length(primes)] then output[1] := 1; # only case when index of primitive group in socle is not 2*prime @@ -659,7 +659,7 @@ InstallGlobalFunction( FindRegularNormalCSPG, function ( G, H, whichcase ) # case of abelian normal subgroup if whichcase[1] <> 2 then - core := PCore( H, FactorsInt(whichcase[2])[1] ); + core := PCore( H, Factors(Integers, whichcase[2])[1] ); chain:=StabChainOp(core,rec(base:=BaseOfGroup(G),reduced:=false)); cosetrep := chain.transversal[chain.orbit[2]]; candidates := AsList(Stabilizer(core,BaseOfGroup(G)[1]))*cosetrep; @@ -1670,7 +1670,7 @@ InstallMethod( RadicalGroup, # subgroup; kernel is abelian normal. # Take image at this action, and repeat while index > 0 do - primes := FactorsInt(factorsize[index]); + primes := Factors(Integers,factorsize[index]); # if the factor group is not cyclic, no chance for nontrivial radical if Length(primes) > 1 then diff --git a/lib/integer.gi b/lib/integer.gi index 9aaac91f7b..97cc30d827 100644 --- a/lib/integer.gi +++ b/lib/integer.gi @@ -474,7 +474,7 @@ InstallGlobalFunction(DivisorsInt,function ( n ) if n <= Length(DivisorsIntCache) then return DivisorsIntCache[n]; fi; - factors := FactorsInt( n ); + factors := Factors(Integers, n ); # recursive function to compute the divisors divs := function ( i, m ) diff --git a/lib/matrix.gi b/lib/matrix.gi index 42695ca8c9..0c9595339c 100644 --- a/lib/matrix.gi +++ b/lib/matrix.gi @@ -3268,7 +3268,7 @@ InstallGlobalFunction( NullspaceModQ, function( E, q ) j, i,k; # factorize q - facs := FactorsInt( q ); + facs := Factors(Integers, q ); p := facs[1]; n := Length( facs ); field := GF(p); diff --git a/lib/numtheor.gi b/lib/numtheor.gi index 8ab48f7219..ac8d7bfb67 100644 --- a/lib/numtheor.gi +++ b/lib/numtheor.gi @@ -288,7 +288,7 @@ InstallGlobalFunction( GeneratorsPrimeResidues, function( n ) ); fi; - factors:= Collected( FactorsInt( n ) ); + factors:= Collected( Factors(Integers, n ) ); primes := []; exponents := []; @@ -1200,7 +1200,7 @@ local c, p,f,l; a:=a mod n; if IsPrime(n) and Gcd(a,n)=1 then # use rho method - f:=FactorsInt(n-1:quiet); # Quick factorization, don't stop if its too hard + f:=Factors(Integers,n-1:quiet); # Quick factorization, don't stop if its too hard l:=DoLogModRho(b,a,n-1,f,n); if l<>fail then return l; @@ -1305,7 +1305,7 @@ InstallGlobalFunction( MoebiusMu, function ( n ) if n = 0 then Error("MoebiusMu: must be nonzero"); fi; if n = 1 then return 1; fi; - factors := FactorsInt( n ); + factors := Factors(Integers, n ); if factors <> Set( factors ) then return 0; fi; return (-1) ^ Length(factors); end ); diff --git a/lib/oprtperm.gi b/lib/oprtperm.gi index 9a21698192..8379678afe 100644 --- a/lib/oprtperm.gi +++ b/lib/oprtperm.gi @@ -935,7 +935,7 @@ InstallMethod( Earns, "G, ints, gens, perms, act", true, # fi; # fi; - fac := FactorsInt( n ); p := fac[ 1 ]; d := Length( fac ); + fac := Factors(Integers, n ); p := fac[ 1 ]; d := Length( fac ); alpha := BasePoint( StabChainMutable( G ) ); G1 := Stabilizer( G, alpha ); diff --git a/lib/partitio.gi b/lib/partitio.gi index 7573329f32..972fc2d1f1 100644 --- a/lib/partitio.gi +++ b/lib/partitio.gi @@ -420,7 +420,7 @@ InstallGlobalFunction( SmallestPrimeDivisor, function( size ) repeat i := i + 1; until i > Length( Primes ) or size mod Primes[ i ] = 0; - if i > Length( Primes ) then return FactorsInt( size )[ 1 ]; + if i > Length( Primes ) then return Factors(Integers, size )[ 1 ]; else return Primes[ i ]; fi; fi; end ); diff --git a/lib/pcgs.gi b/lib/pcgs.gi index 06d97e5dca..6aeba23bf7 100644 --- a/lib/pcgs.gi +++ b/lib/pcgs.gi @@ -20,7 +20,7 @@ InstallGlobalFunction( PcgsByIndependentGeneratorsOfAbelianGroup, function( A ) pcs := [ ]; rel := [ ]; for gen in IndependentGeneratorsOfAbelianGroup( A ) do - for f in FactorsInt( Order( gen ) ) do + for f in Factors(Integers, Order( gen ) ) do Add( pcs, gen ); Add( rel, f ); gen := gen ^ f; @@ -283,7 +283,7 @@ function( G ) ord := []; map := []; for i in [1..Length(pcgs)] do - facs := FactorsInt( rels[i] ); + facs := Factors(Integers, rels[i] ); g := pcgs[i]; for f in facs do Add( new, g ); diff --git a/lib/pcgspcg.gi b/lib/pcgspcg.gi index fc701c81a4..29756b8741 100644 --- a/lib/pcgspcg.gi +++ b/lib/pcgspcg.gi @@ -1376,7 +1376,7 @@ local pcgs, g,ord,cord,ppc,q,r,gcd,p1,p2,i,j,e1,pows,exps,rord; g:=el; ppc:=[]; - cord:=Collected(FactorsInt(ord)); + cord:=Collected(Factors(Integers,ord)); for i in [1..Length(cord)-1] do q:=cord[i][1]^cord[i][2]; r:=ord/q; diff --git a/lib/pcgsperm.gi b/lib/pcgsperm.gi index 19d9f9d46a..3d0a518302 100644 --- a/lib/pcgsperm.gi +++ b/lib/pcgsperm.gi @@ -79,7 +79,7 @@ InstallGlobalFunction( AddNormalizingElementPcgs, function( G, z ) A := A.stabilizer; f := 1; - for p in FactorsInt( m ) do + for p in Factors(Integers, m ) do if relord <> false then Add( relord, p, pos ); fi; @@ -203,7 +203,7 @@ InstallGlobalFunction( ExtendSeriesPermGroup, function( ord := gcd; fi; fi; - p := FactorsInt( ord )[ 1 ]; + p := Factors(Integers, ord )[ 1 ]; fi; # Loop over all conjugates of . @@ -368,14 +368,14 @@ InstallGlobalFunction(TryPcgsPermGroup,function(arg) # class of is at most Max( log_p(d)-1 ). deg := NrMovedPoints( grp ); if cent then - bound := Maximum( List( Collected( FactorsInt( deg ) ), p -> + bound := Maximum( List( Collected( Factors(Integers, deg ) ), p -> p[ 1 ] ^ ( LogInt( deg, p[ 1 ] ) ) ) ); else bound := Int( LogInt( deg ^ 5, 3 ) / 2 ); fi; if HasSize( grp ) - and Length( FactorsInt( Size( grp ) ) ) < bound then - bound := Length( FactorsInt( Size( grp ) ) ); + and Length( Factors(Integers, Size( grp ) ) ) < bound then + bound := Length( Factors(Integers, Size( grp ) ) ); fi; for step in Reversed( [ 1 .. Length( G ) - 1 ] ) do @@ -545,8 +545,8 @@ local grp, pcgs, U, oldlen, series, y, w, # class of is at most Max( log_p(d)-1 ). deg := NrMovedPoints( grp ); bound := Int( LogInt( deg ^ 5, 3 ) / 2 ); - if HasSize( grp ) and Length( FactorsInt( Size( grp ) ) ) < bound then - bound:=Length( FactorsInt( Size( grp ) ) ); + if HasSize( grp ) and Length( Factors(Integers, Size( grp ) ) ) < bound then + bound:=Length( Factors(Integers, Size( grp ) ) ); fi; pcseq:=Reversed(pcseq); # build up @@ -938,8 +938,8 @@ InstallGlobalFunction( SolvableNormalClosurePermGroup, function( G, H ) # The derived length of is at most (5 log_3(deg()))/2 (Dixon). bound := Int( LogInt( Maximum(1,NrMovedPoints( G ) ^ 5), 3 ) / 2 ); if HasSize( G ) - and Length( FactorsInt( Size( G ) ) ) < bound then - bound := Length( FactorsInt( Size( G ) ) ); + and Length( Factors(Integers, Size( G ) ) ) < bound then + bound := Length( Factors(Integers, Size( G ) ) ); fi; if IsGroup( H ) then diff --git a/lib/randiso.gi b/lib/randiso.gi index 05edb37ca0..bef48a2387 100644 --- a/lib/randiso.gi +++ b/lib/randiso.gi @@ -145,7 +145,7 @@ RelatorsCode := function( code, size, gens ) t, j, z, z2; # get indices - f := FactorsInt( size ); + f := Factors(Integers, size ); l := Length( f ); mi := Maximum( f ) - 1; n := ShallowCopy( code ); @@ -224,7 +224,7 @@ InstallGlobalFunction( PcGroupCode, function( code, size ) fi; # create free group - F := FreeGroup(IsSyllableWordsFamily, Length( FactorsInt( size ) ) ); + F := FreeGroup(IsSyllableWordsFamily, Length( Factors(Integers, size ) ) ); gens := GeneratorsOfGroup( F ); # usual case diff --git a/lib/randiso2.gi b/lib/randiso2.gi index 68de79d2e7..207d924499 100644 --- a/lib/randiso2.gi +++ b/lib/randiso2.gi @@ -286,7 +286,7 @@ IsomorphismSolvableSmallGroups := function( g, h ) lmin := Length( MinimalGeneratingSet( G ) ); qual := size ^ lmin; poses := fail; - i := - Length( FactorsInt( size ) ) * 5 - lcoc * 8 - lmin * 12; + i := - Length( Factors(Integers, size ) ) * 5 - lcoc * 8 - lmin * 12; Info( InfoRandIso, 3, "testing ", -i, " generating strategies" ); while poses = fail or i < 0 do i := i + 1; diff --git a/lib/string.gi b/lib/string.gi index ed570e0e22..116635c678 100644 --- a/lib/string.gi +++ b/lib/string.gi @@ -248,7 +248,7 @@ InstallGlobalFunction(StringPP, function( n ) str := ""; fi; - facs := Collected( FactorsInt( n ) ); + facs := Collected( Factors(Integers, n ) ); for i in [ 1 .. Length( facs ) ] do if i > 1 then Append( str, "*" ); fi; Append( str, String( facs[ i ][ 1 ] ) );