diff --git a/gap/action/orbnorm.gi b/gap/action/orbnorm.gi index 419be6d6..e1d3a88c 100644 --- a/gap/action/orbnorm.gi +++ b/gap/action/orbnorm.gi @@ -529,7 +529,8 @@ BindGlobal( "NormalizerIntegralAction", function( G, linG, U ) # add remaining stabilizer Info( InfoIntNorm, 1, "constructing block orbit-stabilizer"); N := ExtendOrbitStabilizer( U, K, linK, S, linS, orbf, OnLatticeBases ); - N := AddIgsToIgs( N.stab, Igs(T) ); + # do not use AddIgsToIgs: N.stab may not be an igs + N := AddToIgs( Igs(T), N.stab ); N := SubgroupByIgs( G, N ); # do a temporary check @@ -619,7 +620,8 @@ BindGlobal( "ConjugacyIntegralAction", function( G, linG, U, W ) # get Stab_K(e) and thus Stab_G(e) Info( InfoIntNorm, 1, "adding stabilizer for congruence subgroup"); T := NormalizerCongruenceAction( K, linK, U, ser ); - t := AddIgsToIgs( os.stab, Igs(T) ); + # do not use AddIgsToIgs: os.stab may not be an igs + t := AddToIgs( Igs(T), os.stab ); T := SubgroupByIgs( T, t ); # do a temporary check diff --git a/gap/action/orbstab.gi b/gap/action/orbstab.gi index e09a0c93..dca60824 100644 --- a/gap/action/orbstab.gi +++ b/gap/action/orbstab.gi @@ -128,7 +128,8 @@ BindGlobal( "StabilizerIrreducibleAction", function( G, K, linG, derG ) gens[i] := gens[i] * k^-1; od; Info( InfoIntStab, 3, " determined complement "); - gens := AddIgsToIgs( gens, stabK.stabl ); + # do not use AddIgsToIgs: lifts may not be an igs + gens := AddToIgs( Igs(stabK.stabl), gens ); return SubgroupByIgs( G, gens ); end ); @@ -240,7 +241,8 @@ BindGlobal( "OrbitIrreducibleAction", function( G, K, linG, derG, v ) k := MappedVector( e, stabK.trans ); gens[i] := gens[i] * k^-1; od; - gens := AddToIgs( stabK.stabl, gens ); + # stabK.stabl may not be an igs + gens := AddToIgs( Igs(stabK.stabl), gens ); return rec( stab := SubgroupByIgs( G, gens ), prei := g); end ); @@ -563,7 +565,8 @@ BindGlobal( "StabilizerIntegralAction", function( G, mats, e ) Info( InfoIntStab, 1, "constructing block orbit-stabilizer"); stab := ExtendOrbitStabilizer( e, K, actK, S, actS, orbf, OnRight ); Info( InfoIntStab, 1, " obtained ",Length(stab.orbit)," blocks"); - stab := AddIgsToIgs( stab.stab, Igs(T) ); + # do not use AddIgsToIgs: stab.stab may not be an igs + stab := AddToIgs( Igs(T), stab.stab ); stab := SubgroupByIgs( G, stab ); # do a temporary check @@ -651,7 +654,8 @@ BindGlobal( "OrbitIntegralAction", function( G, mats, e, f ) # get Stab_K(e) and thus Stab_G(e) Info( InfoIntStab, 1, "adding stabilizer for congruence subgroup"); T := StabilizerCongruenceAction( K, actK, e, ser ); - t := AddIgsToIgs( os.stab, Igs(T) ); + # do not use AddIgsToIgs: os.stab may not be an igs + t := AddToIgs( Igs(T), os.stab ); T := SubgroupByIgs( T, t ); # do a temporary check diff --git a/gap/basic/pcpsers.gi b/gap/basic/pcpsers.gi index 2f659df3..b07d4291 100644 --- a/gap/basic/pcpsers.gi +++ b/gap/basic/pcpsers.gi @@ -454,10 +454,12 @@ InstallGlobalFunction( ModuloSeriesPcps, function( arg ) fi; G := GroupOfPcp( pcps[1] ); - A := SubgroupByIgs( G, AddIgsToIgs(gens, NumeratorOfPcp( pcps[1] ))); + # do not use AddIgsToIgs: gens may not be an igs + A := SubgroupByIgs( G, AddToIgs(NumeratorOfPcp( pcps[1] ), gens)); new := []; for pcp in pcps do - B := SubgroupByIgs( G, AddIgsToIgs(gens,DenominatorOfPcp(pcp))); + # do not use AddIgsToIgs: gens may not be an igs + B := SubgroupByIgs( G, AddToIgs(DenominatorOfPcp(pcp), gens)); if IndexNC( A, B ) <> 1 and Length( arg ) = 2 then Add( new, Pcp( A, B ) ); A := ShallowCopy( B ); @@ -527,7 +529,8 @@ BindGlobal( "PcpsOfPowerSeries", function( pcp, n ) for f in facs do p := p * f; A := ShallowCopy( B ); - B := AddIgsToIgs(List( gens, x -> x^p ), DenominatorOfPcp(pcp)); + # do not use AddIgsToIgs: powers may not be an igs + B := AddToIgs(DenominatorOfPcp(pcp), List( gens, x -> x^p )); B := SubgroupByIgs( A, B ); new := Pcp(A, B); new!.power := p; diff --git a/gap/cohom/grpcom.gi b/gap/cohom/grpcom.gi index c10190f7..40fb4dbb 100644 --- a/gap/cohom/grpcom.gi +++ b/gap/cohom/grpcom.gi @@ -211,7 +211,8 @@ InstallGlobalFunction( ComplementClassesCR, function( C ) K := ComplementCR( C, d ); # add centralizer to complement - gens := AddIgsToIgs( cent, Igs( K ) ); + # do not use AddIgsToIgs: cent may not be an igs + gens := AddToIgs( Igs( K ), cent ); # add normalizer to centralizer and complement for w in e.word do diff --git a/gap/pcpgrp/centcon.gi b/gap/pcpgrp/centcon.gi index cd1214eb..9c7edfae 100644 --- a/gap/pcpgrp/centcon.gi +++ b/gap/pcpgrp/centcon.gi @@ -101,8 +101,7 @@ BindGlobal( "CentralizerBySeries", function( G, elms, pcps ) N := SubgroupByIgs( G, DenominatorOfPcp(pcp) ); gen := Pcp(C, N); stb := CentralizerByCentralLayer( elms, AsList(gen), pcp ); - stb := AddIgsToIgs( Igs(stb), Igs(N) ); - C := SubgroupByIgs( G, stb ); + C := SubgroupByIgsAndIgs( G, Igs(stb), Igs(N) ); # if it is a non-central finite layer elif p > 0 then @@ -114,8 +113,7 @@ BindGlobal( "CentralizerBySeries", function( G, elms, pcps ) act := AffineActionByElement( fac, pcp, g ); act := InducedByField( act, F ); stb := PcpOrbitStabilizer( e*One(F), fac, act, OnRight ); - stb := AddIgsToIgs( stb.stab, Igs(M) ); - C := SubgroupByIgs( G, stb ); + C := SubgroupByIgsAndIgs( G, stb.stab, Igs(M) ); od; # if it is infinite and not-central @@ -283,7 +281,8 @@ BindGlobal( "ConjugacyElementsBySeries", function( G, g, h, pcps ) # extract results if IsBool(stb) then return false; fi; k := k * stb.prei; - stb := AddIgsToIgs( stb.stab, Igs(N) ); + # do not use AddIgsToIgs: stb.stab may not be an igs + stb := AddToIgs( Igs(N), stb.stab ); C := SubgroupByIgs( G, stb ); # if it is a non-central finite layer @@ -302,7 +301,8 @@ BindGlobal( "ConjugacyElementsBySeries", function( G, g, h, pcps ) if IsBool(j) then return false; fi; t := TransversalElement( j, stb, One(G) ); stb := List( stb.stab, x -> x^t ); - stb := AddIgsToIgs( stb, Igs(N) ); + # do not use AddIgsToIgs: stb may not be an igs + stb := AddToIgs( Igs(N), stb ); C := SubgroupByIgs( G, stb ); k := k * t; diff --git a/gap/pcpgrp/findex.gi b/gap/pcpgrp/findex.gi index 67b3dd31..e587cd9d 100644 --- a/gap/pcpgrp/findex.gi +++ b/gap/pcpgrp/findex.gi @@ -93,7 +93,8 @@ BindGlobal( "SubgroupsFirstLayerByIndex", function( G, pcp, n ) fi; od; # get Igs of H by lifting H/N to H - exp[i] := AddIgsToIgs( base, denom ); + # do not use AddIgsToIgs: lifts may not be an igs + exp[i] := AddToIgs( denom, base ); # H is normal since G/N is abelian, so its normaliser is all of G # open is the remaining index factor exp[i] := rec( repr := SubgroupByIgs( G, exp[i] ), diff --git a/gap/pcpgrp/fitting.gi b/gap/pcpgrp/fitting.gi index faaab947..67626d25 100644 --- a/gap/pcpgrp/fitting.gi +++ b/gap/pcpgrp/fitting.gi @@ -38,7 +38,8 @@ function(G) # refine pcp by subs for j in [2..Length(subs)] do gens := List( subs[j], x -> MappedVector(x, pcps[i]) ); - gens := AddIgsToIgs( gens, DenominatorOfPcp( pcps[i] ) ); + # do not use AddIgsToIgs: lifts may not be an igs + gens := AddToIgs( DenominatorOfPcp( pcps[i] ), gens ); U := SubgroupByIgs( G, gens ); Add( refs, U ); od; diff --git a/gap/pcpgrp/maxsub.gi b/gap/pcpgrp/maxsub.gi index 3cfc4d3f..8764979f 100644 --- a/gap/pcpgrp/maxsub.gi +++ b/gap/pcpgrp/maxsub.gi @@ -21,7 +21,8 @@ BindGlobal( "MaximalSubgroupsByLayer", function( G, pcp, p ) if q <> 0 and q <> p then return []; fi; if q = 0 then new := List( pcp, x -> x ^ p ); - new := AddIgsToIgs( new, DenominatorOfPcp( pcp ) ); + # do not use AddIgsToIgs: powers may not be an igs + new := AddToIgs( DenominatorOfPcp( pcp ), new ); new := SubgroupByIgs( G, new ); new := Pcp( GroupOfPcp( pcp ), new ); else diff --git a/gap/pcpgrp/normcon.gi b/gap/pcpgrp/normcon.gi index a80c6ae3..534d4780 100644 --- a/gap/pcpgrp/normcon.gi +++ b/gap/pcpgrp/normcon.gi @@ -54,7 +54,8 @@ BindGlobal( "LiftBlockToPointNormalizer", function( CR, cc, C, H, HN, c ) # set up b and t b := AddIgsToIgs( Igs(H), DenominatorOfPcp( CR.normal ) ); r := List( cc.rls, x -> MappedVector( x, CR.normal ) ); - b := AddIgsToIgs( r, b ); + # do not use AddIgsToIgs: r may not be an igs + b := AddToIgs( b, r ); t := ShallowCopy( AsList( Pcp( C, HN ) ) ); # catch a special case @@ -67,7 +68,8 @@ BindGlobal( "LiftBlockToPointNormalizer", function( CR, cc, C, H, HN, c ) d := cc.CocToCBElement( cc, d-c ) * cc.trf; t[i] := t[i] * MappedVector( d, CR.normal ); od; - return SubgroupByIgsAndIgs( C, t, b ); + # do not use AddIgsToIgs: t may not be an igs + return SubgroupByIgs( C, b, t ); end ); ############################################################################# @@ -95,8 +97,7 @@ BindGlobal( "NormalizerOfIntersection", function( C, N, I ) act := InducedByField( act, F ); int := VectorspaceBasis( int*One(F) ); stb := PcpOrbitStabilizer( int, fac, act, OnSubspacesByCanonicalBasis ); - stb := AddIgsToIgs( stb.stab, AsList(pcp) ); - return SubgroupByIgs( C, stb ); + return SubgroupByIgsAndIgs( C, stb.stab, AsList(pcp) ); # the infinite case else @@ -181,7 +182,8 @@ BindGlobal( "PcpsOfAbelianFactor", function( N, I ) tor := pcp{Filtered([1..Length(rel)], x -> rel[x] > 0 )}; # the factor mod torsion - T := SubgroupByIgsAndIgs( N, tor, sub ); + # do not use AddIgsToIgs: lifts may not be an igs + T := SubgroupByIgs( N, sub, tor ); if IndexNC(N,T) > 1 then Add( ser, Pcp(N,T,"snf") ); pcp := Pcp(T, I); @@ -193,7 +195,8 @@ BindGlobal( "PcpsOfAbelianFactor", function( N, I ) p := Factors(rel[1])[1]; gen := List( pcp, x -> x^p ); gen := Filtered( gen, x -> x <> One(N) ); - M := SubgroupByIgsAndIgs( N, gen, sub ); + # do not use AddIgsToIgs: powers may not be an igs + M := SubgroupByIgs( N, sub, gen ); Add( ser, Pcp(T,M,"snf") ); T := M; pcp := Pcp(T, I); diff --git a/gap/pcpgrp/torsion.gi b/gap/pcpgrp/torsion.gi index f1b2d703..452bace7 100644 --- a/gap/pcpgrp/torsion.gi +++ b/gap/pcpgrp/torsion.gi @@ -72,7 +72,7 @@ BindGlobal( "TorsionSubgroupPcpGroup", function( G ) H := SubgroupByIgs( G, DenominatorOfPcp( efa[i] ) ); for g in gens do N := ShallowCopy( H ); - H := SubgroupByIgs( G, AddIgsToIgs( [g], Igs( N ) ) ); + H := SubgroupByIgsAndIgs( G, [g], Igs( N ) ); # compute complement to N in H mod T new := ExtendedSeriesPcps( sub, N ); @@ -151,7 +151,7 @@ BindGlobal( "NormalTorsionSubgroupPcpGroup", function( G ) H := SubgroupByIgs( G, DenominatorOfPcp( efa[i] ) ); for g in gens do N := ShallowCopy( H ); - H := SubgroupByIgs( G, AddIgsToIgs( [g], Igs(N) )); + H := SubgroupByIgsAndIgs( G, [g], Igs(N) ); # compute complement to N in H mod T new := ExtendedSeriesPcps( sub, N ); @@ -282,8 +282,8 @@ end ); BindGlobal( "SubgroupBySubspace", function( pcp, exp ) local gens; gens := List( exp, x -> MappedVector( IntVector( x ), pcp ) ); - gens := AddIgsToIgs( gens, DenominatorOfPcp( pcp ) ); - return SubgroupByIgs( GroupOfPcp( pcp ), gens ); + return SubgroupByIgsAndIgs( GroupOfPcp( pcp ), gens, + DenominatorOfPcp( pcp ) ); end ); ############################################################################# diff --git a/tst/AddIgsToIgs.tst b/tst/AddIgsToIgs.tst new file mode 100644 index 00000000..5fe12c57 --- /dev/null +++ b/tst/AddIgsToIgs.tst @@ -0,0 +1,37 @@ +gap> START_TEST( "AddIgsToIgs.tst" ); + +# +gap> U := UnitriangularPcpGroup( 4, 2 );; +gap> g := U.1;; +gap> h := U.1 * U.4 * U.6;; +gap> r := RepresentativeAction( U, g, h );; +gap> r <> fail and g ^ r = h; +true + +# +gap> P := ExamplesOfSomePcpGroups( 5 );; +gap> C := CyclicGroup( IsPcpGroup, 2 );; +gap> H := Subgroup( P, [ P.1 ] );; +gap> G := WreathProduct( H, C, RegularActionHomomorphism( C ) );; +gap> L1 := LowIndexSubgroupClasses( G, 3 );; +gap> ForAll( L1, c -> Index( G, Representative( c ) ) = 3 ); +true +gap> L2 := MaximalSubgroupClassesByIndex( G, 2 );; +gap> ForAll( L2, c -> Index( G, Representative( c ) ) = 2 ); +true + +# +gap> P := ExamplesOfSomePcpGroups( 5 );; +gap> C := AbelianPcpGroup( 1 );; +gap> H := Subgroup( P, [ P.1 ] );; +gap> A := DirectProduct( H, C );; +gap> gens := [ A.1, A.3 ];; +gap> imgs := [ A.1 ^ 2 * A.3, A.1 ^ -1 ];; +gap> aut := GroupHomomorphismByImages( A, A, gens, imgs );; +gap> alpha := GroupHomomorphismByImages( C, Group( aut ), [ C.1 ], [ aut ] );; +gap> G := SemidirectProduct( C, alpha, A );; +gap> S := SemiSimpleEfaSeries( G )[ 3 ];; +gap> GeneratorsOfGroup( S )[ 1 ] ^ 2 in S; +true + +gap> STOP_TEST( "AddIgsToIgs.tst" );