diff --git a/doc/ref/grpfp.xml b/doc/ref/grpfp.xml index 6a4507d2a0..bf4eb25727 100644 --- a/doc/ref/grpfp.xml +++ b/doc/ref/grpfp.xml @@ -486,7 +486,7 @@ gap> hom:=IsomorphismFpGroup(u); [ <[ [ 1, 1 ] ]|f2^-1*f1^-1> ] -> [ F1 ] gap> new:=Range(hom); -gap> List(GeneratorsOfGroup(new),i->PreImagesRepresentative(hom,i)); +gap> List(GeneratorsOfGroup(new),i->PreImagesRepresentativeNC(hom,i)); [ <[ [ 1, 1 ] ]|f2^-1*f1^-1> ] ]]>

@@ -504,7 +504,7 @@ behave like ordinary words and no extra treatment should be necessary. r:=Range(hom).1^10; F1^10 -gap> p:=PreImagesRepresentative(hom,r); +gap> p:=PreImagesRepresentativeNC(hom,r); <[ [ 1, 10 ] ]|(f2^-1*f1^-1)^10> ]]> diff --git a/doc/ref/mapping.xml b/doc/ref/mapping.xml index e23f858f8c..e1928ba20a 100644 --- a/doc/ref/mapping.xml +++ b/doc/ref/mapping.xml @@ -1,6 +1,6 @@ - + diff --git a/doc/ref/rws.xml b/doc/ref/rws.xml index 86b8a5676e..e644b345a4 100644 --- a/doc/ref/rws.xml +++ b/doc/ref/rws.xml @@ -174,7 +174,7 @@ gap> red:=ReducedForm(k,UnderlyingElement(melm)); f1^-1^3*f2^-1*f1^2 gap> melm:=ElementOfFpMonoid(FamilyObj(One(mon)),red); f1^-1^3*f2^-1*f1^2 -gap> gpelm:=PreImagesRepresentative(mhom,melm); +gap> gpelm:=PreImagesRepresentativeNC(mhom,melm); f1^-3*f2^-1*f1^2 gap> r=gpelm; true diff --git a/doc/tut/group.xml b/doc/tut/group.xml index 3d19ea2713..739fa0fd5c 100644 --- a/doc/tut/group.xml +++ b/doc/tut/group.xml @@ -1,12 +1,12 @@ - + - - - - + + + + - + @@ -168,10 +168,9 @@ action domain of norm. (It only happens that both are subsets of the natural numbers.) We can now form images and preimages under the natural homomorphism. The set of preimages of an element under hom is a coset modulo elab. -We use the function here because -hom is not -a bijection, so an element of the range can have several preimages or -none at all. +We use the function here +because hom is not a bijection, +so an element of the range can have several preimages or none at all.

ker:= Kernel( hom ); @@ -943,18 +942,20 @@ gap> PreImage( hom, TrivialSubgroup(s3) ); # the kernel Group([ (1,4)(2,3), (1,3)(2,4) ]) ]]>

-This homomorphism from S_4 onto S_3 is well known from elementary -group theory. Images of elements and subgroups under hom can be +This homomorphism from S_4 onto S_3 is well known from +elementary group theory. +Images of elements and subgroups under hom can be calculated with the function . -But since the mapping hom is not bijective, we cannot use the -function for preimages of -elements (they can have several preimages). Instead, we have to use -, -which returns one preimage if at least one -exists (and would return fail if none exists, which cannot occur for +But since the mapping hom is not bijective, we cannot use the +function for preimages of elements +(they can have several preimages). +Instead, we have to use + +which returns one preimage if at least one exists +(and would return fail if none exists, which cannot occur for our surjective hom). -On the other hand, we can use for the -preimage of a set (which always exists, even if it is empty). +On the other hand, we can use for the +preimage of a set (which always exists, even if it is empty).

Suppose we mistype the input when trying to construct a homomorphism as below.

diff --git a/lib/algebra.gi b/lib/algebra.gi index e8457b37e1..df6d32f75f 100644 --- a/lib/algebra.gi +++ b/lib/algebra.gi @@ -3647,7 +3647,7 @@ InstallMethod( CentralIdempotentsOfAlgebra, until k>Length(ideals); - id:= List( ids, e -> PreImagesRepresentative( hom, e ) ); + id:= List( ids, e -> PreImagesRepresentativeNC( hom, e ) ); # Now we lift the idempotents to the big algebra `A'. The # first idempotent is lifted as follows: diff --git a/lib/algfp.gi b/lib/algfp.gi index c65a8ec796..51adff0b6d 100644 --- a/lib/algfp.gi +++ b/lib/algfp.gi @@ -705,7 +705,7 @@ InstallHandlingByNiceBasis( "IsFpAlgebraElementsSpace", rec( if hom = fail then TryNextMethod(); fi; - return PreImagesRepresentative( hom, r ); + return PreImagesRepresentativeNC( hom, r ); end ) ); diff --git a/lib/alghom.gi b/lib/alghom.gi index 8dc79c6efd..86293e194e 100644 --- a/lib/alghom.gi +++ b/lib/alghom.gi @@ -576,18 +576,29 @@ InstallMethod( ImagesRepresentative, ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . . for algebra g.m.b.i. +#M PreImagesRepresentativeNC( , ) . . . . . for algebra g.m.b.i. ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for algebra g.m.b.i., and element", FamRangeEqFamElm, [ IsGeneralMapping and IsAlgebraGeneralMappingByImagesDefaultRep, IsObject ], function( map, elm ) - return PreImagesRepresentative( AsLeftModuleGeneralMappingByImages(map), - elm ); + return PreImagesRepresentativeNC( + AsLeftModuleGeneralMappingByImages(map), elm ); end ); +## (13/05/26) commented this out to prevent infinite recursion in alghom.tst +## InstallMethod( PreImagesRepresentativeNC, +## "for algebra g.m.b.i. knowing inverse, and element", +## FamRangeEqFamElm, +## [ IsGeneralMapping and IsAlgebraGeneralMappingByImagesDefaultRep +## and HasInverseGeneralMapping, +## IsObject ], +## function( map, elm ) +## return ImagesRepresentative( InverseGeneralMapping(map), elm ); +## end ); + ############################################################################# ## @@ -902,7 +913,7 @@ InstallMethod( ImagesRepresentative, ############################################################################# ## -#M PreImagesRepresentative( , ) +#M PreImagesRepresentativeOperationAlgebraHomomorphism( , ) ## BindGlobal( "PreImagesRepresentativeOperationAlgebraHomomorphism", function( ophom, mat ) if not IsBound( ophom!.basisImage ) then @@ -915,7 +926,7 @@ BindGlobal( "PreImagesRepresentativeOperationAlgebraHomomorphism", function( oph return mat; end ); -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for an operation algebra homomorphism, and an element", FamRangeEqFamElm, [ IsOperationAlgebraHomomorphismDefaultRep, IsMatrix ], @@ -1076,9 +1087,9 @@ InstallMethod( ImagesRepresentative, ############################################################################# ## -#M PreImagesRepresentative( , ) +#M PreImagesRepresentativeNC( , ) ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for an alg. hom. from f. p. algebra, and an element", FamRangeEqFamElm, [ IsAlgebraHomomorphismFromFpRep, IsMatrix ], diff --git a/lib/alglie.gi b/lib/alglie.gi index 322e003d6d..375414ea0a 100644 --- a/lib/alglie.gi +++ b/lib/alglie.gi @@ -34,7 +34,7 @@ InstallMethod( LieUpperCentralSeries, # under the natural homomorphism. Add( S, C ); hom:= NaturalHomomorphismByIdeal( L, C ); - C:= PreImages( hom, LieCentre( Range( hom ) ) ); + C:= PreImagesNC( hom, LieCentre( Range( hom ) ) ); #T we would like to get ideals! #T is it possible to teach the hom. that the preimage of an ideal is an ideal? @@ -1057,7 +1057,7 @@ InstallMethod( PowerS, F:= LeftActingDomain( L ); p:= Characteristic( F ); - return List( [ 1 .. p-1 ], i -> PowerSi( F , i ) ); + return List( [ 1 .. p-1 ], i -> PowerSi( F, i ) ); end ); @@ -1385,7 +1385,7 @@ InstallMethod( CartanSubalgebra, ## ## This function calculates a basis of the associative matrix algebra ## generated by ad_L K, where is a subalgebra of . -## If {x_1,\ldots ,x_n} is a basis of K, then this algebra is spanned +## If {x_1,\ldots,x_n} is a basis of K, then this algebra is spanned ## by all words ## ad x_{i_1}\cdots ad x_{i_t} ## where t>0. @@ -1706,7 +1706,7 @@ InstallMethod( LieSolvableRadical, quo:= ImagesSource( hom ); r1:= LieSolvableRadical( quo ); B:= BasisVectors( Basis( r1 ) ); - B:= List( B, x -> PreImagesRepresentative( hom, x ) ); + B:= List( B, x -> PreImagesRepresentativeNC( hom, x ) ); Append( B, BasisVectors( Basis( n ) ) ); fi; @@ -2092,7 +2092,7 @@ InstallMethod( DirectSumDecomposition, SetRadicalOfAlgebra( Q, Subalgebra( Q, [ Zero( Q ) ] ) ); id:= List( CentralIdempotentsOfAlgebra( Q ), - x->PreImagesRepresentative(hom,x)); + x->PreImagesRepresentativeNC(hom,x)); # Now we lift the idempotents to the big algebra `A'. The # first idempotent is lifted as follows: @@ -2749,7 +2749,7 @@ InstallMethod( NonNilpotentElement, # Now `char F =0'. # In this case either `L' is nilpotent or one of the - # elements $L.1, \ldots , L.n, L.i + L.j; 1 \leq i < j$ + # elements $L.1, \ldots, L.n, L.i + L.j; 1 \leq i < j$ # is non nilpotent. for i in [ 1 .. n ] do @@ -4017,9 +4017,9 @@ InstallMethod( ImagesRepresentative, ########################################################################### ## -#M PreImagesRepresentative( f, x ) +#M PreImagesRepresentativeNC( f, x ) ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for Fp to SCA mapping, and element", FamRangeEqFamElm, [ IsFptoSCAMorphism, IsSCAlgebraObj ], 0, @@ -5567,9 +5567,9 @@ InstallMethod( JenningsLieAlgebra, # Construct the homogeneous components of `L': J:=JenningsSeries ( G ); - Homs:= List ( [1..Length(J)-1] , x -> + Homs:= List ( [1..Length(J)-1], x -> NaturalHomomorphismByNormalSubgroupNC( J[x], J[x+1] )); - grades := List ( Homs , Range ); + grades := List ( Homs, Range ); hom_pcg:= List( grades, IsomorphismSpecialPcGroup ); pcgps:= List( hom_pcg, Range ); gens := []; @@ -5577,11 +5577,11 @@ InstallMethod( JenningsLieAlgebra, pos := []; for i in [1.. Length(grades)] do tempgens:= GeneratorsOfGroup( pcgps[i] ); - Append ( gens , tempgens); + Append ( gens, tempgens); # Record the number that each generator has in extrep. Add( enum_gens, List( tempgens, x -> ExtRepOfObj( x )[1] ) ); - Append ( pos , List ( tempgens , x-> i ) ); + Append ( pos, List ( tempgens, x-> i ) ); od; # Construct the field and the multiplication table: @@ -5589,11 +5589,11 @@ InstallMethod( JenningsLieAlgebra, dim:= Length(gens); p:= PrimePGroup( G ); F:= GF( p ); - T:= EmptySCTable( dim , Zero(F) , "antisymmetric" ); + T:= EmptySCTable( dim, Zero(F), "antisymmetric" ); pimgs := []; for i in [1..dim] do - a:= PreImagesRepresentative( Homs[pos[i]] , - PreImagesRepresentative( hom_pcg[pos[i]], gens[i] ) ); + a:= PreImagesRepresentativeNC( Homs[pos[i]], + PreImagesRepresentativeNC( hom_pcg[pos[i]], gens[i] ) ); # calculate the p-th power image of `a': @@ -5610,10 +5610,10 @@ InstallMethod( JenningsLieAlgebra, # Calculate the commutator [a,b], and map the result into # the correct homogeneous component. - b:= PreImagesRepresentative( Homs[pos[j]], - PreImagesRepresentative( hom_pcg[pos[j]], gens[j] )); + b:= PreImagesRepresentativeNC( Homs[pos[j]], + PreImagesRepresentativeNC( hom_pcg[pos[j]], gens[j] )); c:= Image( hom_pcg[pos[i] + pos[j]], - Image(Homs[pos[i] + pos[j]], a^-1*b^-1*a*b) ); + Image(Homs[pos[i] + pos[j]], a^-1*b^-1*a*b) ); e:= ExtRepOfObj(c); co:=[]; for k in [1,3..Length(e)-1] do @@ -5764,9 +5764,9 @@ InstallMethod( PCentralLieAlgebra, p:= PrimePGroup( G ); J:= PCentralSeries( G, p ); - Homs:= List ( [1..Length(J)-1] , x -> + Homs:= List ( [1..Length(J)-1], x -> NaturalHomomorphismByNormalSubgroupNC( J[x], J[x+1] )); - grades := List ( Homs , Range ); + grades := List ( Homs, Range ); hom_pcg:= List( grades, IsomorphismSpecialPcGroup ); pcgps:= List( hom_pcg, Range ); gens := []; @@ -5774,22 +5774,22 @@ InstallMethod( PCentralLieAlgebra, pos := []; for i in [1.. Length(grades)] do tempgens:= GeneratorsOfGroup( pcgps[i] ); - Append ( gens , tempgens); + Append ( gens, tempgens); # Record the number that each generator has in extrep. Add( enum_gens, List( tempgens, x -> ExtRepOfObj( x )[1] ) ); - Append ( pos , List ( tempgens , x-> i ) ); + Append ( pos, List ( tempgens, x-> i ) ); od; # Construct the field and the multiplication table: dim:= Length(gens); F:= GF( p ); - T:= EmptySCTable( dim , Zero(F) , "antisymmetric" ); + T:= EmptySCTable( dim, Zero(F), "antisymmetric" ); pimgs := []; for i in [1..dim] do - a:= PreImagesRepresentative( Homs[pos[i]] , - PreImagesRepresentative( hom_pcg[pos[i]], gens[i] ) ); + a:= PreImagesRepresentativeNC( Homs[pos[i]], + PreImagesRepresentativeNC( hom_pcg[pos[i]], gens[i] ) ); # calculate the p-th power image of `a': @@ -5807,10 +5807,10 @@ InstallMethod( PCentralLieAlgebra, # Calculate the commutator [a,b], and map the result into # the correct homogeneous component. - b:= PreImagesRepresentative( Homs[pos[j]], - PreImagesRepresentative( hom_pcg[pos[j]], gens[j] )); + b:= PreImagesRepresentativeNC( Homs[pos[j]], + PreImagesRepresentativeNC( hom_pcg[pos[j]], gens[j] )); c:= Image( hom_pcg[pos[i] + pos[j]], - Image(Homs[pos[i] + pos[j]], a^-1*b^-1*a*b) ); + Image(Homs[pos[i] + pos[j]], a^-1*b^-1*a*b) ); e:= ExtRepOfObj(c); co:=[]; for k in [1,3..Length(e)-1] do diff --git a/lib/algrep.gd b/lib/algrep.gd index 7e1244e589..22cd2f400b 100644 --- a/lib/algrep.gd +++ b/lib/algrep.gd @@ -697,10 +697,12 @@ DeclareOperation( "ModuleByRestriction", [ IsAlgebraModule, IsAlgebra ] ); ## ## ## -## Here V must be a sub-algebra module of V. This function returns -## the projection from V onto V/W. It is a linear map, that is -## also a module homomorphism. As usual images can be formed with -## Image( f, v ) and pre-images with PreImagesRepresentative( f, u ). +## Here V must be a sub-algebra module of V. +## This function returns +## the projection from V onto V/W. +## It is a linear map, that is also a module homomorphism. +## As usual images can be formed with Image( f, v ) +## and pre-images with PreImagesRepresentativeNC( f, u ). ##

## The quotient module can also be formed ## by entering V/W. @@ -726,7 +728,7 @@ DeclareOperation( "ModuleByRestriction", [ IsAlgebraModule, IsAlgebra ] ); ## 18 over Rationals>> ## gap> v:= Basis( quo )[1]; ## [ 1, 0, 0, 0, 0, 0, 0, 0, 0 ] -## gap> PreImagesRepresentative( f, v ); +## gap> PreImagesRepresentativeNC( f, v ); ## v.4 ## gap> Basis( C )[4]^v; ## [ 1, 0, 0, 0, 0, 0, 0, 0, 0 ] diff --git a/lib/algrep.gi b/lib/algrep.gi index 8d331feee2..7607190b94 100644 --- a/lib/algrep.gi +++ b/lib/algrep.gi @@ -1212,24 +1212,24 @@ InstallMethod( NaturalHomomorphismBySubAlgebraModule, if IsLeftAlgebraModuleElementCollection( V ) then if IsRightAlgebraModuleElementCollection( V ) then left_op:= function( x, v ) - return ImagesRepresentative( f, x^PreImagesRepresentative( f, v ) ); + return ImagesRepresentative( f, x^PreImagesRepresentativeNC( f, v ) ); end; right_op:= function( v, x ) - return ImagesRepresentative( f, PreImagesRepresentative( f, v )^x ); + return ImagesRepresentative( f, PreImagesRepresentativeNC( f, v )^x ); end; qmod:= BiAlgebraModule( LeftActingAlgebra( V ), RightActingAlgebra( V ), left_op, right_op, quot ); else left_op:= function( x, v ) - return ImagesRepresentative( f, x^PreImagesRepresentative( f, v ) ); + return ImagesRepresentative( f, x^PreImagesRepresentativeNC( f, v ) ); end; qmod:= LeftAlgebraModule( LeftActingAlgebra( V ), left_op, quot); fi; else right_op:= function( v, x ) - return ImagesRepresentative( f, PreImagesRepresentative( f, v )^x ); + return ImagesRepresentative( f, PreImagesRepresentativeNC( f, v )^x ); end; qmod:= RightAlgebraModule( RightActingAlgebra( V ), right_op, quot ); diff --git a/lib/autsr.gi b/lib/autsr.gi index 241cc84115..c6ec449f8c 100644 --- a/lib/autsr.gi +++ b/lib/autsr.gi @@ -118,7 +118,7 @@ local C,M,p,all,gens,sub,q,hom,fp,rels,new,pre,i,free,cnt; rels:=Filtered(RelatorsOfFpGroup(fp),x->ForAll(ExponentSums(x),x->x mod p=0)); rels:=List(rels,x->ElementOfFpGroup(FamilyObj(One(fp)),x)); new:=RestrictedMapping(nat,C)*hom; - pre:=List(rels,x->PreImagesRepresentative(new,x)); + pre:=List(rels,x->PreImagesRepresentativeNC(new,x)); for i in [1..Length(rels)] do if not pre[i] in sub then Add(all,MappedWord(rels[i], @@ -141,7 +141,7 @@ local ocr,fphom,fpg,free,len,dim,tmp,L0,R,rels,mat,r,RS,i,g,v,cnt; fpg:=FreeGeneratorsOfFpGroup(Range(fphom)); ocr.factorpres:=[fpg,RelatorsOfFpGroup(Range(fphom))]; ocr.generators:=List(GeneratorsOfGroup(Range(fphom)), - i->PreImagesRepresentative(fphom,i)); + i->PreImagesRepresentativeNC(fphom,i)); OCAddMatrices(ocr,ocr.generators); OCAddRelations(ocr,ocr.generators); OCAddSumMatrices(ocr,ocr.generators); @@ -274,8 +274,8 @@ BindGlobal("AGSRAutomLift",function(ocr,nat,fhom,miso) # allow to deduce corresponding module aut. t:=ocr.trickrels; phom:=IdentityMapping(ocr.moduleauts); - s:=List(t.gens,x->PreImagesRepresentative(nat,x)); - l:=List(t.gens,x->PreImagesRepresentative(nat,ImagesRepresentative(fhom,x))); + s:=List(t.gens,x->PreImagesRepresentativeNC(nat,x)); + l:=List(t.gens,x->PreImagesRepresentativeNC(nat,ImagesRepresentative(fhom,x))); s:=List(t.rels,x->MappedWord(x,GeneratorsOfGroup(t.free),s)); l:=List(t.rels,x->MappedWord(x,GeneratorsOfGroup(t.free),l)); @@ -294,7 +294,7 @@ BindGlobal("AGSRAutomLift",function(ocr,nat,fhom,miso) Size(Image(phom))); fi; for ep in enum do - e:=PreImagesRepresentative(phom,ep); + e:=PreImagesRepresentativeNC(phom,ep); psim:=e*miso; psim:=psim^-1; w:=-List(v,i->i*psim); @@ -486,7 +486,7 @@ local S,c,hom,q,a,b,i,t,have,ups,new,u,good,abort,clim,worked,pp, cnt:=0; for b in t do - new:=PreImagesRepresentative(hom,b); + new:=PreImagesRepresentativeNC(hom,b); if (pp=false or new^pp in S) and locond(new) then S:=ClosureGroup(S,new); have:=true; @@ -1024,31 +1024,39 @@ local ff,r,d,ser,u,v,i,j,k,p,bd,e,gens,lhom,M,N,hom,Q,Mim,q,ocr,split,MPcgs, ocr:=OneCocycles(Q,Mim); split:=ocr.isSplitExtension; if not split then - # test: Semisimple and Frattini - b:=MTX.BasisRadical(mo); - fratsim:=Length(b)=0; - if not fratsim then - b:=List(b,x->PreImagesRepresentative(hom,PcElementByExponents(MPcgs,x))); - for j in b do - N:=ClosureSubgroup(N,b); - od; - # insert in series - for j in [Length(ser),Length(ser)-1..i+1] do - ser[j+1]:=ser[j]; - od; - ser[i+1]:=N; - Info(InfoMorph,2,"insert1"); - else - # Frattini? - fratsim:=IsSubset(FrattiniSubgroup(Q),Mim); - if not fratsim then - N:=Intersection(FrattiniSubgroup(Q),Mim); - # insert - for j in [Length(ser),Length(ser)-1..i+1] do - ser[j+1]:=ser[j]; - od; - ser[i+1]:=PreImage(hom,N); - Info(InfoMorph,2,"insert2"); + # test: Semisimple and Frattini + b:=MTX.BasisRadical(mo); + fratsim:=Length(b)=0; + if not fratsim then + b:=List(b,x->PreImagesRepresentativeNC(hom,PcElementByExponents(MPcgs,x))); + for j in b do + N:=ClosureSubgroup(N,b); + od; + # insert + for j in [Length(ser),Length(ser)-1..i+1] do + ser[j+1]:=ser[j]; + od; + ser[i+1]:=N; + Info(InfoMorph,2,"insert1"); + else + # Frattini? + fratsim:=IsSubset(FrattiniSubgroup(Q),Mim); + if not fratsim then + N:=Intersection(FrattiniSubgroup(Q),Mim); + # insert + for j in [Length(ser),Length(ser)-1..i+1] do + ser[j+1]:=ser[j]; + od; + ser[i+1]:=PreImage(hom,N); + Info(InfoMorph,2,"insert2"); + fi; + N:=ser[i+1]; # the added normal + if rada<>fail + and ForAny(GeneratorsOfGroup(rada),x->N<>Image(x,N)) then + Info(InfoMorph,3,"radical automorphism stabilizer"); + SetIsGroupOfAutomorphismsFiniteGroup(rada,true); + NiceMonomorphism(rada:autactbase:=fail,someCharacteristics:=fail); + rada:=Stabilizer(rada,N,asAutom); fi; N:=ser[i+1]; # the added normal fi; @@ -1127,11 +1135,11 @@ local ff,r,d,ser,u,v,i,j,k,p,bd,e,gens,lhom,M,N,hom,Q,Mim,q,ocr,split,MPcgs, cond:=function(perm) local aut,newgens,mo2,iso,a; if perm in Aperm then - return true; - fi; - aut:=PreImagesRepresentative(AQiso,perm); - newgens:=List(gens,x->PreImagesRepresentative(comiso, - ImagesRepresentative(aut,ImagesRepresentative(comiso,x)))); + return true; + fi; + aut:=PreImagesRepresentativeNC(AQiso,perm); + newgens:=List(gens,x->PreImagesRepresentativeNC(comiso, + ImagesRepresentative(aut,ImagesRepresentative(comiso,x)))); mo2:=GModuleByMats(LinearActionLayer(newgens,MPcgs),mo.field); iso:=MTX.IsomorphismModules(mo,mo2); @@ -1161,11 +1169,11 @@ local ff,r,d,ser,u,v,i,j,k,p,bd,e,gens,lhom,M,N,hom,Q,Mim,q,ocr,split,MPcgs, precond:=function(perm) local aut,newgens,mo2; if perm in Aperm then - return true; - fi; - aut:=PreImagesRepresentative(AQiso,perm); - newgens:=List(GeneratorsOfGroup(Q), - x->PreImagesRepresentative(q,Image(aut,ImagesRepresentative(q,x)))); + return true; + fi; + aut:=PreImagesRepresentativeNC(AQiso,perm); + newgens:=List(GeneratorsOfGroup(Q), + x->PreImagesRepresentativeNC(q,Image(aut,ImagesRepresentative(q,x)))); mo2:=GModuleByMats(LinearActionLayer(newgens,MPcgs),mo.field); return MTX.IsomorphismModules(mo,mo2)<>fail; end; @@ -1173,11 +1181,11 @@ local ff,r,d,ser,u,v,i,j,k,p,bd,e,gens,lhom,M,N,hom,Q,Mim,q,ocr,split,MPcgs, cond:=function(perm) local aut,newgens,mo2,iso,a; if perm in Aperm then - return true; - fi; - aut:=PreImagesRepresentative(AQiso,perm); - newgens:=List(GeneratorsOfGroup(Q), - x->PreImagesRepresentative(q,Image(aut,ImagesRepresentative(q,x)))); + return true; + fi; + aut:=PreImagesRepresentativeNC(AQiso,perm); + newgens:=List(GeneratorsOfGroup(Q), + x->PreImagesRepresentativeNC(q,Image(aut,ImagesRepresentative(q,x)))); mo2:=GModuleByMats(LinearActionLayer(newgens,MPcgs),mo.field); iso:=MTX.IsomorphismModules(mo,mo2); if iso=fail then @@ -1234,12 +1242,12 @@ local ff,r,d,ser,u,v,i,j,k,p,bd,e,gens,lhom,M,N,hom,Q,Mim,q,ocr,split,MPcgs, # stabilize class k:=SmallGeneratingSet(sub); ac:=OrbitStabilizerAlgorithm(sub,false,false, - k,List(k,x->PreImagesRepresentative(AQiso,x)), + k,List(k,x->PreImagesRepresentativeNC(AQiso,x)), rec(pnt:=j, act:= function(set,phi) #local phi; - #phi:=PreImagesRepresentative(AQiso,perm); + #phi:=PreImagesRepresentativeNC(AQiso,perm); return Set(List(set,x->Image(phi,x))); end, onlystab:=true)); @@ -1365,10 +1373,10 @@ local ff,r,d,ser,u,v,i,j,k,p,bd,e,gens,lhom,M,N,hom,Q,Mim,q,ocr,split,MPcgs, for j in GeneratorsOfGroup(rada) do k:=GroupHomomorphismByImagesNC(rf,rf, GeneratorsOfGroup(rf), - List(GeneratorsOfGroup(rf), - y->ImagesRepresentative(hom,ImagesRepresentative(j, - PreImagesRepresentative(hom,y))))); - Assert(2,IsBijective(k)); + List(GeneratorsOfGroup(rf), + y->ImagesRepresentative(hom,ImagesRepresentative(j, + PreImagesRepresentativeNC(hom,y))))); + Assert(2,IsBijective(k)); Add(ind,k); od; @@ -1387,57 +1395,57 @@ local ff,r,d,ser,u,v,i,j,k,p,bd,e,gens,lhom,M,N,hom,Q,Mim,q,ocr,split,MPcgs, # reduce to subgroup that induces valid automorphisms Info(InfoMorph,1,"Radical autos reduce by factor ",Size(res)/Size(ind)); resperm:=IsomorphismPermGroup(C); - proj:=GroupHomomorphismByImagesNC(AQP,Image(resperm), - B[2],List(GeneratorsOfGroup(res),x->ImagesRepresentative(resperm,x))); - C:=PreImage(proj,Image(resperm,ind)); - C:=List(SmallGeneratingSet(C),x->PreImagesRepresentative(AQiso,x)); - AQ:=Group(C); - SetIsFinite(AQ,true); - SetIsGroupOfAutomorphismsFiniteGroup(AQ,true); + proj:=GroupHomomorphismByImagesNC(AQP,Image(resperm), + B[2],List(GeneratorsOfGroup(res),x->ImagesRepresentative(resperm,x))); + C:=PreImage(proj,Image(resperm,ind)); + C:=List(SmallGeneratingSet(C),x->PreImagesRepresentativeNC(AQiso,x)); + AQ:=Group(C); + SetIsFinite(AQ,true); + SetIsGroupOfAutomorphismsFiniteGroup(AQ,true); makeaqiso(); fi; # # hook for using existing characteristics to reduce for next step if somechar<>fail then u:=Filtered(Unique(List(somechar,x->Image(hom,x))),x->Size(x)>1); - u:=Filtered(u,s->ForAny(GeneratorsOfGroup(AQ),h->Image(h,s)<>s)); - SortBy(u,Size); - Info(InfoMorph,1,"Forced characteristics ",List(u,Size)); - - if scharorb<>fail then - # these are subgroups for which certain orbits must be stabilized. - C:=List(Reversed(scharorb),x->List(x,y->Image(hom,y))); - C:=Filtered(C,x->Size(x[1])>1 and Size(x[1])Size(x[1]))); - Append(u,C); - fi; + u:=Filtered(u,s->ForAny(GeneratorsOfGroup(AQ),h->Image(h,s)<>s)); + SortBy(u,Size); + Info(InfoMorph,1,"Forced characteristics ",List(u,Size)); + + if scharorb<>fail then + # these are subgroups for which certain orbits must be stabilized. + C:=List(Reversed(scharorb),x->List(x,y->Image(hom,y))); + C:=Filtered(C,x->Size(x[1])>1 and Size(x[1])Size(x[1]))); + Append(u,C); + fi; - if Length(u)>0 then - C:=MappingGeneratorsImages(AQiso); - if C[2]<>GeneratorsOfGroup(AQP) then - C:=[List(GeneratorsOfGroup(AQP), - x->PreImagesRepresentative(AQiso,x)), - GeneratorsOfGroup(AQP)]; + if Length(u)>0 then + C:=MappingGeneratorsImages(AQiso); + if C[2]<>GeneratorsOfGroup(AQP) then + C:=[List(GeneratorsOfGroup(AQP), + x->PreImagesRepresentativeNC(AQiso,x)), + GeneratorsOfGroup(AQP)]; + fi; + for j in u do + if IsList(j) then + # stabilizer set of subgroups + jorb:=ShallowCopy(Orbit(AQP,j[1],C[2],C[1],asAutom)); + jorpo:=[Position(jorb,j[1]),Position(jorb,j[2])]; + if jorpo[2]=fail then + Append(jorb,Orbit(AQP,j[1],C[2],C[1],asAutom)); + jorpo[2]:=Position(jorb,j[2]); + fi; + if Length(jorb)>Length(j) then + B:=ActionHomomorphism(AQP,jorb,C[2],C[1],asAutom); + substb:=Group(List(C[2],x->ImagesRepresentative(B,x)),()); + substb:=Stabilizer(substb,Set(jorpo),OnSets); + substb:=PreImage(B,substb); + Info(InfoMorph,2,"Stabilize characteristic orbit ",Size(j[1]), + " :",Size(AQP)/Size(substb) ); + else + substb:=AQP; fi; - for j in u do - if IsList(j) then - # stabilizer set of subgroups - jorb:=ShallowCopy(Orbit(AQP,j[1],C[2],C[1],asAutom)); - jorpo:=[Position(jorb,j[1]),Position(jorb,j[2])]; - if jorpo[2]=fail then - Append(jorb,Orbit(AQP,j[1],C[2],C[1],asAutom)); - jorpo[2]:=Position(jorb,j[2]); - fi; - if Length(jorb)>Length(j) then - B:=ActionHomomorphism(AQP,jorb,C[2],C[1],asAutom); - substb:=Group(List(C[2],x->ImagesRepresentative(B,x)),()); - substb:=Stabilizer(substb,Set(jorpo),OnSets); - substb:=PreImage(B,substb); - Info(InfoMorph,2,"Stabilize characteristic orbit ",Size(j[1]), - " :",Size(AQP)/Size(substb) ); - else - substb:=AQP; - fi; else @@ -1450,7 +1458,7 @@ local ff,r,d,ser,u,v,i,j,k,p,bd,e,gens,lhom,M,N,hom,Q,Mim,q,ocr,split,MPcgs, substb:=SmallGeneratingSet(substb); AQP:=Group(substb); SetSize(AQP,B); - C:=[List(substb,x->PreImagesRepresentative(AQiso,x)),substb]; + C:=[List(substb,x->PreImagesRepresentativeNC(AQiso,x)),substb]; fi; od; @@ -1883,7 +1891,7 @@ local d,a,map,cG,nG,nH,i,j,u,v,asAutomorphism,K,L,conj,e1,e2, else gens:=SmallGeneratingSet(api); fi; - pre:=List(gens,x->PreImagesRepresentative(iso,x)); + pre:=List(gens,x->PreImagesRepresentativeNC(iso,x)); map:=RepresentativeAction(SubgroupNC(a,pre),u,v,asAutomorphism); if map=fail then return fail; @@ -1904,6 +1912,6 @@ local d,a,map,cG,nG,nH,i,j,u,v,asAutomorphism,K,L,conj,e1,e2, fi; return GroupHomomorphismByImagesNC(G,H,GeneratorsOfGroup(G), - List(GeneratorsOfGroup(G),x->PreImagesRepresentative(e2, + List(GeneratorsOfGroup(G),x->PreImagesRepresentativeNC(e2, Image(conj,Image(e1,x))))); end); diff --git a/lib/clas.gi b/lib/clas.gi index b933b7d50b..2a27e3cbba 100644 --- a/lib/clas.gi +++ b/lib/clas.gi @@ -395,7 +395,7 @@ local H,cl,a,c; H:=Image(hom,G); cl:=[]; for c in ConjugacyClasses(H) do - a:=ConjugacyClass(G,PreImagesRepresentative(hom,Representative(c))); + a:=ConjugacyClass(G,PreImagesRepresentativeNC(hom,Representative(c))); if HasStabilizerOfExternalSet(c) then SetStabilizerOfExternalSet(a,PreImage(hom,StabilizerOfExternalSet(c))); fi; diff --git a/lib/clashom.gi b/lib/clashom.gi index 201b2cd9b7..7fbcae3ee3 100644 --- a/lib/clashom.gi +++ b/lib/clashom.gi @@ -499,7 +499,7 @@ local clT, # classes T for k in clop do Info(InfoHomClass,1,"lifting class ",Representative(k)); - r:=PreImagesRepresentative(ophom,Representative(k)); + r:=PreImagesRepresentativeNC(ophom,Representative(k)); # try to make r of small order rp:=r^Order(Representative(k)); rp:=RepresentativeAction(M,Concatenation(components), @@ -544,134 +544,134 @@ local clT, # classes T end; for j in [1..Length(reps)] do - scj:=Size(centralizers[j]); - dsz:=0; - centrhom:=ActionHomomorphism(centralizers_r[j],components[i], - "surjective"); - localcent_r:=Image(centrhom); - Info(InfoHomClass,4,i,":",j); - Info(InfoHomClass,3,"acting: ",Size(centralizers[j])," minimum ", - Int(Size(Image(projections[i]))/Size(centralizers[j])), - " orbits."); - # compute C(r)-classes - clTR:=[]; - for l in clT do - Info(InfoHomClass,4,"DC",Index(T,l[2])," ",Index(T,localcent_r)); - dc:=DoubleCosetRepsAndSizes(T,l[2],localcent_r); - clTR:=Concatenation(clTR,List(dc,i->l[1]^i[1])); - od; + scj:=Size(centralizers[j]); + dsz:=0; + centrhom:=ActionHomomorphism(centralizers_r[j],components[i], + "surjective"); + localcent_r:=Image(centrhom); + Info(InfoHomClass,4,i,":",j); + Info(InfoHomClass,3,"acting: ",Size(centralizers[j])," minimum ", + Int(Size(Image(projections[i]))/Size(centralizers[j])), + " orbits."); + # compute C(r)-classes + clTR:=[]; + for l in clT do + Info(InfoHomClass,4,"DC",Index(T,l[2])," ",Index(T,localcent_r)); + dc:=DoubleCosetRepsAndSizes(T,l[2],localcent_r); + clTR:=Concatenation(clTR,List(dc,i->l[1]^i[1])); + od; - orb:=[]; - for p in [1..Length(clTR)] do - - repres:=PreImagesRepresentative(projections[i],clTR[p]); - if i=1 or isdirprod - or reps[j]*RestrictedPermNC(repres,components[i]) - in Mproj[i] then - stab:=Centralizer(localcent_r,clTR[p]); - if Index(localcent_r,stab)clTR[p] then - genpos:=Position(img,clTR[p]); - img:=Permuted(img,(1,genpos)); - fi; - else - img:=ConjugacyClass(localcent_r,clTR[p],stab); - fi; - Add(orb,[repres,PreImage(centrhom,stab),img,localcent_r]); + orb:=[]; + for p in [1..Length(clTR)] do + + repres:=PreImagesRepresentativeNC(projections[i],clTR[p]); + if i=1 or isdirprod + or reps[j]*RestrictedPermNC(repres,components[i]) + in Mproj[i] then + stab:=Centralizer(localcent_r,clTR[p]); + if Index(localcent_r,stab)clTR[p] then + genpos:=Position(img,clTR[p]); + img:=Permuted(img,(1,genpos)); fi; - od; - clTR:=orb; - - #was: - #clTR:=List(clTR,i->ConjugacyClass(localcent_r,i)); - #clTR:=List(clTR,j->[PreImagesRepresentative(projections[i], - # Representative(j)), - # PreImage(centrhom,Centralizer(j)), - # j]); - - # put small classes to the top (to be sure to hit them and make - # large local stabilizers) - SortBy(clTR,x->Size(x[3])); - - Info(InfoHomClass,3,Length(clTR)," local classes"); - - cystr:=[]; - for p in [1..Length(clTR)] do - repres:=Immutable(CycleStructurePerm(Representative(clTR[p][3]))); - select:=First(cystr,x->x[1]=repres); - if select=fail then - Add(cystr,[repres,[p]]); - else - AddSet(select[2],p); - fi; - od; - - cengen:=GeneratorsOfGroup(centralizers[j]); - if Length(cengen)>10 then - cengen:=SmallGeneratingSet(centralizers[j]); + else + img:=ConjugacyClass(localcent_r,clTR[p],stab); fi; - #cengen:=Filtered(cengen,i->not i in localcent_r); - - while Length(clTR)>0 do - - # orbit algorithm on classes - stab:=clTR[1][2]; - orb:=[clTR[1]]; - #repres:=RestrictedPermNC(clTR[1][1],components[i]); - repres:=clTR[1][1]; - trans:=[One(M)]; - select:=[2..Length(clTR)]; + Add(orb,[repres,PreImage(centrhom,stab),img,localcent_r]); + fi; + od; + clTR:=orb; + + #was: + #clTR:=List(clTR,i->ConjugacyClass(localcent_r,i)); + #clTR:=List(clTR,j->[PreImagesRepresentative(projections[i], + # Representative(j)), + # PreImage(centrhom,Centralizer(j)), + # j]); + + # put small classes to the top (to be sure to hit them and make + # large local stabilizers) + SortBy(clTR,x->Size(x[3])); + + Info(InfoHomClass,3,Length(clTR)," local classes"); + + cystr:=[]; + for p in [1..Length(clTR)] do + repres:=Immutable(CycleStructurePerm(Representative(clTR[p][3]))); + select:=First(cystr,x->x[1]=repres); + if select=fail then + Add(cystr,[repres,[p]]); + else + AddSet(select[2],p); + fi; + od; - orpo:=1; - minlen:=Size(orb[1][3]); - possible:=false; - stabtrue:=false; - pf:=infinity; - maxdiff:=Size(T); - again:=0; - trymap:=false; - ug:=[]; - # test whether we have full orbit and full stabilizer - while Size(centralizers[j])>(Sum(orb,i->Size(i[3]))*Size(stab)) do - genpos:=1; - while genpos<=Length(cengen) and - Size(centralizers[j])>(Sum(orb,i->Size(i[3]))*Size(stab)) do - gen:=cengen[genpos]; - skip:=false; - if trymap<>false then - orpo:=trymap[1]; - gen:=trymap[2]; - trymap:=false; - elif again>0 then - if not IsBound(ug[genpos]) then - ug[genpos]:=Intersection(centralizers_r[j], - ConjugateSubgroup(centralizers_r[j],gen^-1)); - fi; - if again<500 and ForAll(GeneratorsOfGroup(centralizers_r[j]), - i->i in ug[genpos]) - then - # the random elements will give us nothing new - skip:=true; - else - # get an element not in ug[genpos] - repeat - img:=Random(centralizers_r[j]); - until not img in ug[genpos] or again>=500; - gen:=img*gen; - fi; - fi; + cengen:=GeneratorsOfGroup(centralizers[j]); + if Length(cengen)>10 then + cengen:=SmallGeneratingSet(centralizers[j]); + fi; + #cengen:=Filtered(cengen,i->not i in localcent_r); + + while Length(clTR)>0 do + + # orbit algorithm on classes + stab:=clTR[1][2]; + orb:=[clTR[1]]; + #repres:=RestrictedPermNC(clTR[1][1],components[i]); + repres:=clTR[1][1]; + trans:=[One(M)]; + select:=[2..Length(clTR)]; + + orpo:=1; + minlen:=Size(orb[1][3]); + possible:=false; + stabtrue:=false; + pf:=infinity; + maxdiff:=Size(T); + again:=0; + trymap:=false; + ug:=[]; + # test whether we have full orbit and full stabilizer + while Size(centralizers[j])>(Sum(orb,i->Size(i[3]))*Size(stab)) do + genpos:=1; + while genpos<=Length(cengen) and + Size(centralizers[j])>(Sum(orb,i->Size(i[3]))*Size(stab)) do + gen:=cengen[genpos]; + skip:=false; + if trymap<>false then + orpo:=trymap[1]; + gen:=trymap[2]; + trymap:=false; + elif again>0 then + if not IsBound(ug[genpos]) then + ug[genpos]:=Intersection(centralizers_r[j], + ConjugateSubgroup(centralizers_r[j],gen^-1)); + fi; + if again<500 and ForAll(GeneratorsOfGroup(centralizers_r[j]), + i->i in ug[genpos]) + then + # the random elements will give us nothing new + skip:=true; + else + # get an element not in ug[genpos] + repeat + img:=Random(centralizers_r[j]); + until not img in ug[genpos] or again>=500; + gen:=img*gen; + fi; + fi; - if not skip then + if not skip then - img:=Image(projections[i],opfun(orb[orpo][1],gen)); + img:=Image(projections[i],opfun(orb[orpo][1],gen)); - smacla:=select; + smacla:=select; - if not stabtrue then - p:=PositionProperty(orb,i->img in i[3]); - ppos:=fail; + if not stabtrue then + p:=PositionProperty(orb,i->img in i[3]); + ppos:=fail; else # we have the stabilizer and thus are only interested in # getting new elements. @@ -694,50 +694,50 @@ local clT, # classes T return fail; fi; else - p:=ppos; - fi; + p:=ppos; + fi; - RemoveSet(select,p); - Add(orb,clTR[p]); + RemoveSet(select,p); + Add(orb,clTR[p]); - if trans[orpo]=false then - Add(trans,false); - else - #change the transversal element to map to the representative - con:=trans[orpo]*gen; - limg:=opfun(repres,con); - con:=con*PreImagesRepresentative(centrhom, - RepresentativeAction(localcent_r, - Image(projections[i],limg), - Representative(clTR[p][3]))); - Assert(2,Image(projections[i],opfun(repres,con)) - =Representative(clTR[p][3])); - - Add(trans,con); - - for stgen in GeneratorsOfGroup(clTR[p][2]) do - Assert( 2, IsOne( Image( projections[i], - opfun(repres,con*stgen/con)/repres ) ) ); - stab:=ClosureGroup(stab,con*stgen/con); - od; - fi; + if trans[orpo]=false then + Add(trans,false); + else + #change the transversal element to map to the representative + con:=trans[orpo]*gen; + limg:=opfun(repres,con); + con:=con*PreImagesRepresentativeNC(centrhom, + RepresentativeAction(localcent_r, + Image(projections[i],limg), + Representative(clTR[p][3]))); + Assert(2,Image(projections[i],opfun(repres,con)) + =Representative(clTR[p][3])); + + Add(trans,con); + + for stgen in GeneratorsOfGroup(clTR[p][2]) do + Assert( 2, IsOne( Image( projections[i], + opfun(repres,con*stgen/con)/repres ) ) ); + stab:=ClosureGroup(stab,con*stgen/con); + od; + fi; - # compute new minimum length + # compute new minimum length - if Length(select)>0 then - remainlen:=List(clTR{select},i->Size(i[3])); - gcd:=Gcd(remainlen); - diff:=minlen-Sum(orb,i->Size(i[3])); + if Length(select)>0 then + remainlen:=List(clTR{select},i->Size(i[3])); + gcd:=Gcd(remainlen); + diff:=minlen-Sum(orb,i->Size(i[3])); - if diff<0 then - # only go through this if the orbit actually grew - # larger - minlen:=Sum(orb,i->Size(i[3])); - repeat - if dsz=0 then - dsz:=DivisorsInt(scj); - fi; - while not minlen in dsz do + if diff<0 then + # only go through this if the orbit actually grew + # larger + minlen:=Sum(orb,i->Size(i[3])); + repeat + if dsz=0 then + dsz:=DivisorsInt(scj); + fi; + while not minlen in dsz do # workaround rare problem -- try again if First(dsz,i->i>=minlen)=fail then return ConjugacyClassesSubwreath( @@ -790,149 +790,149 @@ local clT, # classes T stabtrue:=true; fi; - elif not stabtrue then - # we have an element that stabilizes the conjugacy class. - # correct this to an element that fixes the representative. - # (As we have taken already the centralizer in - # centralizers_r, it is sufficient to correct by - # centralizers_r-conjugation.) - con:=trans[orpo]*gen; - limg:=opfun(repres,con); - con:=con*PreImagesRepresentative(centrhom, - RepresentativeAction(localcent_r, - Image(projections[i],limg), - Representative(orb[p][3]))); - stab:=ClosureGroup(stab,con/trans[p]); - if Size(stab)*2*minlen>Size(centralizers[j]) then - Info(InfoHomClass,3, - "true stabilizer found (cannot grow)"); - minlen:=Size(centralizers[j])/Size(stab); - maxdiff:=minlen-Sum(orb,i->Size(i[3])); - stabtrue:=true; - fi; - fi; + elif not stabtrue then + # we have an element that stabilizes the conjugacy class. + # correct this to an element that fixes the representative. + # (As we have taken already the centralizer in + # centralizers_r, it is sufficient to correct by + # centralizers_r-conjugation.) + con:=trans[orpo]*gen; + limg:=opfun(repres,con); + con:=con*PreImagesRepresentativeNC(centrhom, + RepresentativeAction(localcent_r, + Image(projections[i],limg), + Representative(orb[p][3]))); + stab:=ClosureGroup(stab,con/trans[p]); + if Size(stab)*2*minlen>Size(centralizers[j]) then + Info(InfoHomClass,3, + "true stabilizer found (cannot grow)"); + minlen:=Size(centralizers[j])/Size(stab); + maxdiff:=minlen-Sum(orb,i->Size(i[3])); + stabtrue:=true; + fi; + fi; - if stabtrue then + if stabtrue then - smacla:=Filtered(select,i->Size(clTR[i][3])<=maxdiff); + smacla:=Filtered(select,i->Size(clTR[i][3])<=maxdiff); - if Length(smacla)Size(i[3])); + if Length(smacla)Size(i[3])); - CompletionBar(InfoHomClass,3,"trueorb ",1-maxdiff/minlen); - #Info(InfoHomClass,3, - # "This is the true orbit length (missing ", - # maxdiff,")"); + CompletionBar(InfoHomClass,3,"trueorb ",1-maxdiff/minlen); + #Info(InfoHomClass,3, + # "This is the true orbit length (missing ", + # maxdiff,")"); - if Size(stab)*Sum(orb,i->Size(i[3])) - =Size(centralizers[j]) then + if Size(stab)*Sum(orb,i->Size(i[3])) + =Size(centralizers[j]) then maxdiff:=0; - elif Sum(remainlen)=maxdiff then - Info(InfoHomClass,2, - "Full possible remainder must fuse"); - orb:=Concatenation(orb,clTR{smacla}); - select:=Difference(select,smacla); - - else - # test whether there is only one possibility to get - # this length - if Length(smacla)<20 and - Sum(List([1..Minimum(Length(smacla), - Int(maxdiff/gcd+1))], - x-> NrCombinations(smacla,x)))<10000 then - # get all reasonable combinations - smare:=[1..Length(smacla)]; #range for smacla - combl:=Concatenation(List([1..Int(maxdiff/gcd+1)], - i->Combinations(smare,i))); - # pick those that have the correct length - combl:=Filtered(combl,i->Sum(remainlen{i})=maxdiff); - if Length(combl)>1 then - Info(InfoHomClass,3,"Addendum not unique (", - Length(combl)," possibilities)"); - if (maxdiff<10 or again>0) - and ForAll(combl,i->Length(i)<=5) then - # we have tried often enough, now try to pick the - # right ones - possible:=false; - combl:=Union(combl); - combl:=smacla{combl}; - genpos2:=1; - smacla:=[]; - while possible=false and Length(combl)>0 do - img:=Image(projections[i], - opfun(clTR[combl[1]][1],cengen[genpos2])); - p:=PositionProperty(orb,i->img in i[3]); - if p<>fail then - # it is! - Info(InfoHomClass,4,"got one!"); - - # remember the element to try - trymap:=[p,(cengen[genpos2]* - PreImagesRepresentative( - RestrictedMapping(projections[i], - centralizers[j]), - RepresentativeAction( - orb[p][4], - img,Representative(orb[p][3])) ))^-1]; - - Add(smacla,combl[1]); - combl:=combl{[2..Length(combl)]}; - if Sum(clTR{smacla},i->Size(i[3]))=maxdiff then - # bingo! - possible:=true; - fi; - fi; - genpos2:=genpos2+1; - if genpos2>Length(cengen) then - genpos2:=1; - combl:=combl{[2..Length(combl)]}; - fi; - od; - if possible=false then - Info(InfoHomClass,4,"Even test failed!"); - else - orb:=Concatenation(orb,clTR{smacla}); - select:=Difference(select,smacla); - Info(InfoHomClass,3,"Completed orbit (hard)"); - fi; - fi; - elif Length(combl)>0 then - combl:=combl[1]; - orb:=Concatenation(orb,clTR{smacla{combl}}); - select:=Difference(select,smacla{combl}); - Info(InfoHomClass,3,"Completed orbit"); - fi; - fi; - fi; - fi; + elif Sum(remainlen)=maxdiff then + Info(InfoHomClass,2, + "Full possible remainder must fuse"); + orb:=Concatenation(orb,clTR{smacla}); + select:=Difference(select,smacla); + else + # test whether there is only one possibility to get + # this length + if Length(smacla)<20 and + Sum(List([1..Minimum(Length(smacla), + Int(maxdiff/gcd+1))], + x-> NrCombinations(smacla,x)))<10000 then + # get all reasonable combinations + smare:=[1..Length(smacla)]; #range for smacla + combl:=Concatenation(List([1..Int(maxdiff/gcd+1)], + i->Combinations(smare,i))); + # pick those that have the correct length + combl:=Filtered(combl,i->Sum(remainlen{i})=maxdiff); + if Length(combl)>1 then + Info(InfoHomClass,3,"Addendum not unique (", + Length(combl)," possibilities)"); + if (maxdiff<10 or again>0) + and ForAll(combl,i->Length(i)<=5) then + # we have tried often enough, now try to pick the + # right ones + possible:=false; + combl:=Union(combl); + combl:=smacla{combl}; + genpos2:=1; + smacla:=[]; + while possible=false and Length(combl)>0 do + img:=Image(projections[i], + opfun(clTR[combl[1]][1],cengen[genpos2])); + p:=PositionProperty(orb,i->img in i[3]); + if p<>fail then + # it is! + Info(InfoHomClass,4,"got one!"); + + # remember the element to try + trymap:=[p,(cengen[genpos2]* + PreImagesRepresentativeNC( + RestrictedMapping(projections[i], + centralizers[j]), + RepresentativeAction( + orb[p][4], + img,Representative(orb[p][3])) ))^-1]; + + Add(smacla,combl[1]); + combl:=combl{[2..Length(combl)]}; + if Sum(clTR{smacla},i->Size(i[3]))=maxdiff then + # bingo! + possible:=true; + fi; + fi; + genpos2:=genpos2+1; + if genpos2>Length(cengen) then + genpos2:=1; + combl:=combl{[2..Length(combl)]}; + fi; + od; + if possible=false then + Info(InfoHomClass,4,"Even test failed!"); + else + orb:=Concatenation(orb,clTR{smacla}); + select:=Difference(select,smacla); + Info(InfoHomClass,3,"Completed orbit (hard)"); fi; - else - Info(InfoHomClass,5,"skip"); - fi; # if not skip + fi; + elif Length(combl)>0 then + combl:=combl[1]; + orb:=Concatenation(orb,clTR{smacla{combl}}); + select:=Difference(select,smacla{combl}); + Info(InfoHomClass,3,"Completed orbit"); + fi; + fi; + fi; + fi; - genpos:=genpos+1; - od; - orpo:=orpo+1; - if orpo>Length(orb) then - Info(InfoHomClass,3,"Size factor:",EvalF( - (Sum(orb,i->Size(i[3]))*Size(stab))/Size(centralizers[j])), - " orbit consists of ",Length(orb)," suborbits, iterating"); - - if stabtrue then - pper:=false; - # we know stabilizer, just need to find orbit. As these are - # likely small additions, search in reverse. - for p in select do - for genpos in [1..Length(cengen)] do - gen:=Random(centralizers_r[j])*cengen[genpos]; - img:=Image(projections[i],opfun(clTR[p][1],gen)); - orpo:=CycleStructurePerm(img); - ppos:=First(First(cystr,x->x[1]=orpo)[2], - i->not i in select and - img in clTR[i][3]); + fi; + else + Info(InfoHomClass,5,"skip"); + fi; # if not skip + + genpos:=genpos+1; + od; + orpo:=orpo+1; + if orpo>Length(orb) then + Info(InfoHomClass,3,"Size factor:",EvalF( + (Sum(orb,i->Size(i[3]))*Size(stab))/Size(centralizers[j])), + " orbit consists of ",Length(orb)," suborbits, iterating"); + + if stabtrue then + pper:=false; + # we know stabilizer, just need to find orbit. As these are + # likely small additions, search in reverse. + for p in select do + for genpos in [1..Length(cengen)] do + gen:=Random(centralizers_r[j])*cengen[genpos]; + img:=Image(projections[i],opfun(clTR[p][1],gen)); + orpo:=CycleStructurePerm(img); + ppos:=First(First(cystr,x->x[1]=orpo)[2], + i->not i in select and + img in clTR[i][3]); if ppos<>fail and p in select then # so the image is in clTR[ppos] which must be in orb ppos:=Position(orb,clTR[ppos]); @@ -1140,9 +1140,8 @@ local cs, # chief series of G # compute the classes of the simple nonabelian factor by random search hom:=NaturalHomomorphismByNormalSubgroupNC(G,lastM); cl:=ConjugacyClasses(Image(hom)); - cl:=List(cl,i->[PreImagesRepresentative(hom,Representative(i)), - PreImage(hom,StabilizerOfExternalSet(i))]); - cs:=Concatenation([G],Filtered(cs,x->IsSubset(lastM,x))); + cl:=List(cl,i->[PreImagesRepresentativeNC(hom,Representative(i)), + PreImage(hom,StabilizerOfExternalSet(i))]); fi; for i in [2..Length(cs)] do @@ -1183,144 +1182,144 @@ local cs, # chief series of G if IsNormal(G,subN) then - # only one -> Call standard process + # only one -> Call standard process - Fhom:=fail; - # is this an almost top factor? - if Index(G,M)<10 then - Thom:=NaturalHomomorphismByNormalSubgroupNC(G,subN); - T1:=Image(Thom,M); - S1:=Image(Thom); - if Size(Centralizer(S1,T1))=1 then - deg1:=NrMovedPoints(S1); - Info(InfoHomClass,2, - "top factor gives conjugating representation, deg ",deg1); + Fhom:=fail; + # is this an almost top factor? + if Index(G,M)<10 then + Thom:=NaturalHomomorphismByNormalSubgroupNC(G,subN); + T1:=Image(Thom,M); + S1:=Image(Thom); + if Size(Centralizer(S1,T1))=1 then + deg1:=NrMovedPoints(S1); + Info(InfoHomClass,2, + "top factor gives conjugating representation, deg ",deg1); - Fhom:=Thom; - fi; - else - Thom:=NaturalHomomorphismByNormalSubgroupNC(M,subN); - T1:=Image(Thom,M); - fi; + Fhom:=Thom; + fi; + else + Thom:=NaturalHomomorphismByNormalSubgroupNC(M,subN); + T1:=Image(Thom,M); + fi; - if Fhom=fail then - autos:=List(GeneratorsOfGroup(G), - i->GroupHomomorphismByImagesNC(T1,T1,GeneratorsOfGroup(T1), - List(GeneratorsOfGroup(T1), - j->Image(Thom,PreImagesRepresentative(Thom,j)^i)))); - - # find (probably another) permutation rep for T1 for which all - # automorphisms can be represented by permutations - arhom:=AutomorphismRepresentingGroup(T1,autos); - S1:=arhom[1]; - deg1:=NrMovedPoints(S1); - Fhom:=GroupHomomorphismByImagesNC(G,S1,GeneratorsOfGroup(G),arhom[3]); - fi; + if Fhom=fail then + autos:=List(GeneratorsOfGroup(G), + i->GroupHomomorphismByImagesNC(T1,T1,GeneratorsOfGroup(T1), + List(GeneratorsOfGroup(T1), + j->Image(Thom,PreImagesRepresentativeNC(Thom,j)^i)))); + + # find (probably another) permutation rep for T1 for which all + # automorphisms can be represented by permutations + arhom:=AutomorphismRepresentingGroup(T1,autos); + S1:=arhom[1]; + deg1:=NrMovedPoints(S1); + Fhom:=GroupHomomorphismByImagesNC(G,S1,GeneratorsOfGroup(G),arhom[3]); + fi; - F:=Image(Fhom,G); + F:=Image(Fhom,G); - clF:=ClassesFromClassical(F); - if clF=fail then - clF:=ConjugacyClassesByRandomSearch(F); - fi; + clF:=ClassesFromClassical(F); + if clF=fail then + clF:=ConjugacyClassesByRandomSearch(F); + fi; - clF:=List(clF,j->[Representative(j),StabilizerOfExternalSet(j)]); + clF:=List(clF,j->[Representative(j),StabilizerOfExternalSet(j)]); else - csM:=Orbit(G,subN); # all conjugates - n:=Length(csM); + csM:=Orbit(G,subN); # all conjugates + n:=Length(csM); - if n=1 then - Error("this cannot happen"); - T:=M; - fi; - - T:=Intersection(csM{[2..Length(csM)]}); # one T_i - if Length(GeneratorsOfGroup(T))>5 then - T:=Group(SmallGeneratingSet(T)); - fi; + if n=1 then + Error("this cannot happen"); + T:=M; + fi; - T:=Orbit(G,T); # get all the t's - # now T[1] is a complement to csM[1] in G/N. + T:=Intersection(csM{[2..Length(csM)]}); # one T_i + if Length(GeneratorsOfGroup(T))>5 then + T:=Group(SmallGeneratingSet(T)); + fi; - # now compute the operation of G on M/N - Qhom:=ActionHomomorphism(G,T,"surjective"); - Q:=Image(Qhom,G); - S:=PreImage(Qhom,Stabilizer(Q,1)); + T:=Orbit(G,T); # get all the t's + # now T[1] is a complement to csM[1] in G/N. - # find a permutation rep. for S-action on T[1] - Thom:=NaturalHomomorphismByNormalSubgroupNC(T[1],N); - T1:=Image(Thom); - if not IsSubset([1..NrMovedPoints(T1)], - MovedPoints(T1)) then - Thom:=Thom*ActionHomomorphism(T1,MovedPoints(T1),"surjective"); - fi; - T1:=Image(Thom,T[1]); - if IsPermGroup(T1) and - NrMovedPoints(T1)>SufficientlySmallDegreeSimpleGroupOrder(Size(T1)) then - Thom:=Thom*SmallerDegreePermutationRepresentation(T1:cheap); - Info(InfoHomClass,1,"reduced simple degree ",NrMovedPoints(T1), - " ",NrMovedPoints(Image(Thom))); - T1:=Image(Thom,T[1]); - fi; + # now compute the operation of G on M/N + Qhom:=ActionHomomorphism(G,T,"surjective"); + Q:=Image(Qhom,G); + S:=PreImage(Qhom,Stabilizer(Q,1)); - autos:=List(GeneratorsOfGroup(S), - i->GroupHomomorphismByImagesNC(T1,T1,GeneratorsOfGroup(T1), - List(GeneratorsOfGroup(T1), - j->Image(Thom,PreImagesRepresentative(Thom,j)^i)))); + # find a permutation rep. for S-action on T[1] + Thom:=NaturalHomomorphismByNormalSubgroupNC(T[1],N); + T1:=Image(Thom); + if not IsSubset([1..NrMovedPoints(T1)], + MovedPoints(T1)) then + Thom:=Thom*ActionHomomorphism(T1,MovedPoints(T1),"surjective"); + fi; + T1:=Image(Thom,T[1]); + if IsPermGroup(T1) and + NrMovedPoints(T1)>SufficientlySmallDegreeSimpleGroupOrder(Size(T1)) then + Thom:=Thom*SmallerDegreePermutationRepresentation(T1:cheap); + Info(InfoHomClass,1,"reduced simple degree ",NrMovedPoints(T1), + " ",NrMovedPoints(Image(Thom))); + T1:=Image(Thom,T[1]); + fi; - # find (probably another) permutation rep for T1 for which all - # automorphisms can be represented by permutations - arhom:=AutomorphismRepresentingGroup(T1,autos); - S1:=arhom[1]; - deg1:=NrMovedPoints(S1); - Thom:=GroupHomomorphismByImagesNC(S,S1,GeneratorsOfGroup(S),arhom[3]); - - T1:=Image(Thom,T[1]); - - # now embed into wreath - w:=WreathProduct(S1,Q); - wbas:=DirectProduct(List([1..n],i->S1)); - emb:=List([1..n+1],i->Embedding(w,i)); - proj:=List([1..n],i->Projection(wbas,i)); - components:=WreathProductInfo(w).components; - - # define isomorphisms between the components - reps:=List([1..n],i-> - PreImagesRepresentative(Qhom,RepresentativeAction(Q,1,i))); - - genimages:=[]; - for j in GeneratorsOfGroup(G) do - img:=Image(Qhom,j); - gimg:=Image(emb[n+1],img); - for k in [1..n] do - # look at part of j's action on the k-th factor. - # we get this by looking at the action of - # reps[k] * j * reps[k^img]^-1 - # 1 -> k -> k^img -> 1 - # on the first component. - act:=reps[k]*j*(reps[k^img]^-1); - # this must be multiplied *before* permuting - gimg:=ImageElm(emb[k],ImageElm(Thom,act))*gimg; - gimg:=RestrictedPermNC(gimg,MovedPoints(w)); - od; - Add(genimages,gimg); - od; + autos:=List(GeneratorsOfGroup(S), + i->GroupHomomorphismByImagesNC(T1,T1,GeneratorsOfGroup(T1), + List(GeneratorsOfGroup(T1), + j->Image(Thom,PreImagesRepresentativeNC(Thom,j)^i)))); + + # find (probably another) permutation rep for T1 for which all + # automorphisms can be represented by permutations + arhom:=AutomorphismRepresentingGroup(T1,autos); + S1:=arhom[1]; + deg1:=NrMovedPoints(S1); + Thom:=GroupHomomorphismByImagesNC(S,S1,GeneratorsOfGroup(S),arhom[3]); + + T1:=Image(Thom,T[1]); + + # now embed into wreath + w:=WreathProduct(S1,Q); + wbas:=DirectProduct(List([1..n],i->S1)); + emb:=List([1..n+1],i->Embedding(w,i)); + proj:=List([1..n],i->Projection(wbas,i)); + components:=WreathProductInfo(w).components; + + # define isomorphisms between the components + reps:=List([1..n],i-> + PreImagesRepresentativeNC(Qhom,RepresentativeAction(Q,1,i))); + + genimages:=[]; + for j in GeneratorsOfGroup(G) do + img:=Image(Qhom,j); + gimg:=Image(emb[n+1],img); + for k in [1..n] do + # look at part of j's action on the k-th factor. + # we get this by looking at the action of + # reps[k] * j * reps[k^img]^-1 + # 1 -> k -> k^img -> 1 + # on the first component. + act:=reps[k]*j*(reps[k^img]^-1); + # this must be multiplied *before* permuting + gimg:=ImageElm(emb[k],ImageElm(Thom,act))*gimg; + gimg:=RestrictedPermNC(gimg,MovedPoints(w)); + od; + Add(genimages,gimg); + od; - F:=Subgroup(w,genimages); - if AssertionLevel()>=2 then - Fhom:=GroupHomomorphismByImages(G,F,GeneratorsOfGroup(G),genimages); - Assert(1,fail<>Fhom); - else - Fhom:=GroupHomomorphismByImagesNC(G,F,GeneratorsOfGroup(G),genimages); - fi; + F:=Subgroup(w,genimages); + if AssertionLevel()>=2 then + Fhom:=GroupHomomorphismByImages(G,F,GeneratorsOfGroup(G),genimages); + Assert(1,fail<>Fhom); + else + Fhom:=GroupHomomorphismByImagesNC(G,F,GeneratorsOfGroup(G),genimages); + fi; - Info(InfoHomClass,1,"constructed Fhom"); + Info(InfoHomClass,1,"constructed Fhom"); - # 2) compute the classes for F + # 2) compute the classes for F - if n>1 then + if n>1 then #if IsPermGroup(F) and NrMovedPoints(F)<18 then # # the old Butler/Theissen approach is still OK # clF:=[]; @@ -1337,30 +1336,30 @@ local cs, # chief series of G clF:=ConjugacyClassesSubwreath(F,FM,n,S1, Action(FM,components[1]),T1,components,emb,proj); if clF=fail then - #Error("failure"); - # weird error happened -- redo - j:=Random(SymmetricGroup(MovedPoints(G))); - FM:=List(GeneratorsOfGroup(G),x->x^j); - F:=Group(FM); - SetSize(F,Size(G)); - FM:=GroupHomomorphismByImagesNC(G,F,GeneratorsOfGroup(G),FM); - clF:=ConjugacyClassesFittingFreeGroup(F); - clF:=List(clF,x->[PreImagesRepresentative(FM,x[1]),PreImage(FM,x[2])]); - return clF; - fi; - #fi; - else - FM:=Image(Fhom,M); - Info(InfoHomClass,1, - "classes by random search in almost simple group"); + #Error("failer"); + # weird error happened -- redo + j:=Random(SymmetricGroup(MovedPoints(G))); + FM:=List(GeneratorsOfGroup(G),x->x^j); + F:=Group(FM); + SetSize(F,Size(G)); + FM:=GroupHomomorphismByImagesNC(G,F,GeneratorsOfGroup(G),FM); + clF:=ConjugacyClassesFittingFreeGroup(F); + clF:=List(clF,x->[PreImagesRepresentativeNC(FM,x[1]),PreImage(FM,x[2])]); + return clF; + fi; + #fi; + else + FM:=Image(Fhom,M); + Info(InfoHomClass,1, + "classes by random search in almost simple group"); - clF:=ClassesFromClassical(F); - if clF=fail then - clF:=ConjugacyClassesByRandomSearch(F); - fi; + clF:=ClassesFromClassical(F); + if clF=fail then + clF:=ConjugacyClassesByRandomSearch(F); + fi; - clF:=List(clF,j->[Representative(j),StabilizerOfExternalSet(j)]); - fi; + clF:=List(clF,j->[Representative(j),StabilizerOfExternalSet(j)]); + fi; fi; # true orbit of T. Assert(2,Sum(clF,i->Index(F,i[2]))=Size(F)); @@ -1371,106 +1370,106 @@ local cs, # chief series of G # the length(cl)=1 gets rid of solvable stuff on the top we got ``too # early''. if IsSubgroup(N,KernelOfMultiplicativeGeneralMapping(Fhom)) then - Info(InfoHomClass,1, - "homomorphism is faithful for relevant factor, take preimages"); - if Size(N)=1 and onlysizes=true then - cl:=List(clF,i->[PreImagesRepresentative(Fhom,i[1]),Size(i[2])]); - else - cl:=List(clF,i->[PreImagesRepresentative(Fhom,i[1]), - PreImage(Fhom,i[2])]); + Info(InfoHomClass,1, + "homomorphism is faithful for relevant factor, take preimages"); + if Size(N)=1 and onlysizes=true then + cl:=List(clF,i->[PreImagesRepresentativeNC(Fhom,i[1]),Size(i[2])]); + else + cl:=List(clF,i->[PreImagesRepresentativeNC(Fhom,i[1]), + PreImage(Fhom,i[2])]); fi; else - Info(InfoHomClass,1,"forming subdirect products"); - - FM:=Image(Fhom,lastM); - FMhom:=RestrictedMapping(Fhom,lastM); - if Index(F,FM)=1 then - Info(InfoHomClass,1,"degenerated to direct product"); - ncl:=[]; - for j in cl do - for k in clF do - # modify the representative with a kernel elm. to project - # correctly on the second component - elm:=j[1]*PreImagesRepresentative(FMhom, - LeftQuotient(Image(Fhom,j[1]),k[1])); - zentr:=Intersection(j[2],PreImage(Fhom,k[2])); - Assert(3,ForAll(GeneratorsOfGroup(zentr), - i->Comm(i,elm) in N)); - Add(ncl,[elm,zentr]); - od; - od; + Info(InfoHomClass,1,"forming subdirect products"); - cl:=ncl; + FM:=Image(Fhom,lastM); + FMhom:=RestrictedMapping(Fhom,lastM); + if Index(F,FM)=1 then + Info(InfoHomClass,1,"degenerated to direct product"); + ncl:=[]; + for j in cl do + for k in clF do + # modify the representative with a kernel elm. to project + # correctly on the second component + elm:=j[1]*PreImagesRepresentativeNC(FMhom, + LeftQuotient(Image(Fhom,j[1]),k[1])); + zentr:=Intersection(j[2],PreImage(Fhom,k[2])); + Assert(3,ForAll(GeneratorsOfGroup(zentr), + i->Comm(i,elm) in N)); + Add(ncl,[elm,zentr]); + od; + od; + + cl:=ncl; + + else + # first we add the centralizer closures and sort by them + # (this allows to reduce the number of double coset calculations) + ncl:=[]; + for j in cl do + Cim:=Image(Fhom,j[2]); + CimCl:=Cim; + #CimCl:=ClosureGroup(FM,Cim); # should be unnecessary, as we took + # the full preimage + p:=PositionProperty(ncl,i->i[1]=CimCl); + if p=fail then + Add(ncl,[CimCl,[j]]); else + Add(ncl[p][2],j); + fi; + od; - # first we add the centralizer closures and sort by them - # (this allows to reduce the number of double coset calculations) - ncl:=[]; - for j in cl do - Cim:=Image(Fhom,j[2]); - CimCl:=Cim; - #CimCl:=ClosureGroup(FM,Cim); # should be unnecessary, as we took - # the full preimage - p:=PositionProperty(ncl,i->i[1]=CimCl); - if p=fail then - Add(ncl,[CimCl,[j]]); - else - Add(ncl[p][2],j); - fi; - od; + Qhom:=NaturalHomomorphismByNormalSubgroupNC(F,FM); + Q:=Image(Qhom); + FQhom:=Fhom*Qhom; - Qhom:=NaturalHomomorphismByNormalSubgroupNC(F,FM); - Q:=Image(Qhom); - FQhom:=Fhom*Qhom; + # now construct the sdp's + cl:=[]; + for j in ncl do + lj:=List(j[2],i->Image(FQhom,i[1])); + for k in clF do + # test whether the classes are potential mates + elm:=Image(Qhom,k[1]); + if not ForAll(lj,i->RepresentativeAction(Q,i,elm)=fail) then - # now construct the sdp's - cl:=[]; - for j in ncl do - lj:=List(j[2],i->Image(FQhom,i[1])); - for k in clF do - # test whether the classes are potential mates - elm:=Image(Qhom,k[1]); - if not ForAll(lj,i->RepresentativeAction(Q,i,elm)=fail) then + #l:=Image(Fhom,j[1]); - #l:=Image(Fhom,j[1]); + if Index(F,j[1])=1 then + dc:=[()]; + else + dc:=List(DoubleCosetRepsAndSizes(F,k[2],j[1]),i->i[1]); + fi; + good:=0; + bad:=0; + for l in j[2] do + jim:=Image(FQhom,l[1]); + for l1 in dc do + elm:=k[1]^l1; + if Image(Qhom,elm)=jim then + # modify the representative with a kernel elm. to project + # correctly on the second component + elm:=l[1]*PreImagesRepresentativeNC(FMhom, + LeftQuotient(Image(Fhom,l[1]),elm)); + zentr:=PreImage(Fhom,k[2]^l1); + zentr:=Intersection(zentr,l[2]); - if Index(F,j[1])=1 then - dc:=[()]; - else - dc:=List(DoubleCosetRepsAndSizes(F,k[2],j[1]),i->i[1]); - fi; - good:=0; - bad:=0; - for l in j[2] do - jim:=Image(FQhom,l[1]); - for l1 in dc do - elm:=k[1]^l1; - if Image(Qhom,elm)=jim then - # modify the representative with a kernel elm. to project - # correctly on the second component - elm:=l[1]*PreImagesRepresentative(FMhom, - LeftQuotient(Image(Fhom,l[1]),elm)); - zentr:=PreImage(Fhom,k[2]^l1); - zentr:=Intersection(zentr,l[2]); - - Assert(3,ForAll(GeneratorsOfGroup(zentr), - i->Comm(i,elm) in N)); - - Info(InfoHomClass,4,"new class, order ",Order(elm), - ", size=",Index(G,zentr)); - Add(cl,[elm,zentr]); - good:=good+1; - else - Info(InfoHomClass,5,"not in"); - bad:=bad+1; - fi; - od; - od; - Info(InfoHomClass,4,good," good, ",bad," bad of ",Length(dc)); - fi; - od; + Assert(3,ForAll(GeneratorsOfGroup(zentr), + i->Comm(i,elm) in N)); + + Info(InfoHomClass,4,"new class, order ",Order(elm), + ", size=",Index(G,zentr)); + Add(cl,[elm,zentr]); + good:=good+1; + else + Info(InfoHomClass,5,"not in"); + bad:=bad+1; + fi; od; + od; + Info(InfoHomClass,4,good," good, ",bad," bad of ",Length(dc)); + fi; + od; + od; fi; # real subdirect product fi; # else Fhom not faithful on factor @@ -2022,7 +2021,7 @@ BindGlobal("LiftClassesEATrivRep", nsfgens:=NormalIntersection(fants[usent],Group(cl[4])); fasize:=Size(nsfgens); nsfgens:=SmallGeneratingSet(nsfgens); - nsgens:=List(nsfgens,x->PreImagesRepresentative(hom,x)); + nsgens:=List(nsfgens,x->PreImagesRepresentativeNC(hom,x)); nsimgs:=List(Concatenation(pcgs,nsgens),npcgsact); mo:=GModuleByMats(nsimgs,field); if not MTX.IsIrreducible(mo) then @@ -2338,7 +2337,7 @@ local r, #radical if IsPermGroup(Range(hom)) and not IsPermGroup(Source(hom)) then f:=Image(hom,G); cl:=ConjugacyClassesFittingFreeGroup(f:onlysizes:=false); - cl:=List(cl,x->[PreImagesRepresentative(hom,x[1]), + cl:=List(cl,x->[PreImagesRepresentativeNC(hom,x[1]), PreImage(hom,x[2])]); else cl:=ConjugacyClassesFittingFreeGroup(G:onlysizes:=false); @@ -2398,12 +2397,12 @@ local r, #radical if ntrihom then ncl:=[]; for i in cl do - new:=[PreImagesRepresentative(hom,i[1])]; - if not IsInt(i[2]) then - Add(new,[]); # no generators in radical yet - gens:=SmallGeneratingSet(i[2]); - Add(new, - List(gens,x->PreImagesRepresentative(hom,x))); + new:=[PreImagesRepresentativeNC(hom,i[1])]; + if not IsInt(i[2]) then + Add(new,[]); # no generators in radical yet + gens:=SmallGeneratingSet(i[2]); + Add(new, + List(gens,x->PreImagesRepresentativeNC(hom,x))); Add(new,gens); #TODO: PreImage groups? #Add(new,PreImage(hom,i[2])); @@ -2886,10 +2885,10 @@ local r, #radical fi; prereps:=f!.classpreimgs; if not IsBound(prereps[j]) then - prereps[j]:=PreImagesRepresentative(hom,Representative(cl[j])); + prereps[j]:=PreImagesRepresentativeNC(hom,Representative(cl[j])); fi; - r:=PreImagesRepresentative(hom,conj); + r:=PreImagesRepresentativeNC(hom,conj); d:=GeneratorsOfGroup(Centralizer(cl[j])); # Format for cl is: @@ -2897,8 +2896,8 @@ local r, #radical # in factor, 4:conjugator, 5:cenpcgs, # 6:cenfac, 7:cenfacimgs, 8:censize, 9:cenfacsize Add(nreps,[i,i^r,prereps[j],r,[], - List(d,x->PreImagesRepresentative(hom,x)),d, - radsize*Size(Centralizer(cl[j])), Size(Centralizer(cl[j]))]); + List(d,x->PreImagesRepresentativeNC(hom,x)),d, + radsize*Size(Centralizer(cl[j])), Size(Centralizer(cl[j]))]); od; reps:=nreps; diff --git a/lib/csetgrp.gi b/lib/csetgrp.gi index 9c5955a8f3..ea7c552195 100644 --- a/lib/csetgrp.gi +++ b/lib/csetgrp.gi @@ -199,7 +199,7 @@ local cla,clb,i,j,k,bd,r,rep,b2,dc, r:=SmallerDegreePermutationRepresentation(b:cheap); k:=Image(r,b); gens:=MorFindGeneratingSystem(k,MorMaxFusClasses(MorRatClasses(k))); - gens:=List(gens,x->PreImagesRepresentative(r,x)); + gens:=List(gens,x->PreImagesRepresentativeNC(r,x)); else gens:=MorFindGeneratingSystem(b,MorMaxFusClasses(MorRatClasses(b))); fi; diff --git a/lib/ctblfuns.gi b/lib/ctblfuns.gi index c648c9401f..eec04e92e4 100644 --- a/lib/ctblfuns.gi +++ b/lib/ctblfuns.gi @@ -2049,8 +2049,8 @@ InstallMethod( InertiaSubgroup, if stab = permgrp then return G; else - return PreImagesSet( GroupHomomorphismByImages( G, permgrp, - GeneratorsOfGroup( G ), perms ), + return PreImagesSetNC( GroupHomomorphismByImages( G, permgrp, + GeneratorsOfGroup( G ), perms ), stab ); fi; end ); diff --git a/lib/ctblgrp.gi b/lib/ctblgrp.gi index 3b41dbb5be..914845923f 100644 --- a/lib/ctblgrp.gi +++ b/lib/ctblgrp.gi @@ -1606,7 +1606,7 @@ local tm,tme,piso,gpcgs,gals,ord,l,l2,f,fgens,rws,pow,pos,i,j,k,gen, # not easily transfer to mod p. k:=Image(piso,TrivialSubgroup(D.galMorphisms)); gpcgs:=Pcgs(k); - gals:=List(gpcgs,i->PreImagesRepresentative(piso,i)); + gals:=List(gpcgs,i->PreImagesRepresentativeNC(piso,i)); ord:=List(gpcgs,i->RelativeOrderOfPcElement(gpcgs,i)); l:=Length(gpcgs); @@ -1827,7 +1827,7 @@ local often,trans,e,neu,i,inv,cent,l,s,s1,x,dom; if dom=fail then x:=D.classreps[inv]; - l:=List(s,i->[x^PreImagesRepresentative(e, + l:=List(s,i->[x^PreImagesRepresentativeNC(e, RepresentativeAction(Image(e),1,i[1])),Size(cent)*Length(i)]); else l:=List(s,i->[dom[i[1]],Size(cent)*Length(i)]); diff --git a/lib/ctblsolv.gi b/lib/ctblsolv.gi index d18f10f6d7..13a762c9b5 100644 --- a/lib/ctblsolv.gi +++ b/lib/ctblsolv.gi @@ -176,7 +176,7 @@ InstallGlobalFunction( ProjectiveCharDeg, function( G, z, q ) # `N' is a normal subgroup such that `N/' is a chief factor of `G' # of order `i' which is a power of `p'. - N:= PreImagesSet( h, N ); + N:= PreImagesSetNC( h, N ); i:= Size( N ) / oz; p:= Factors( i )[1]; @@ -184,7 +184,7 @@ InstallGlobalFunction( ProjectiveCharDeg, function( G, z, q ) # `c' is a list of complement classes of `N' modulo `z' c:= List( ComplementClassesRepresentatives( ImagesSource( h ), ImagesSet( h, N ) ), - x -> PreImagesSet( h, x ) ); + x -> PreImagesSetNC( h, x ) ); r:= Centralizer( G, N ); for L in c do if IsSubset( L, r ) then @@ -563,7 +563,7 @@ InstallGlobalFunction( CoveringTriplesCharacters, function( G, z ) N:= ChiefSeriesUnderAction( img, N ); N:= N[ Length( N ) - 1 ]; fi; - N:= PreImagesSet( h, N ); + N:= PreImagesSetNC( h, N ); if not IsAbelian( N ) then Info( InfoCharacterTable, 2, @@ -584,7 +584,7 @@ InstallGlobalFunction( CoveringTriplesCharacters, function( G, z ) ImageElm( h, z ) ), x -> [ PreImagesSet( h, x[1] ), PreImagesSet( h, x[2] ), - PreImagesRepresentative( h, x[3] ) ] ); + PreImagesRepresentativeNC( h, x[3] ) ] ); if p = i then @@ -624,7 +624,7 @@ InstallGlobalFunction( CoveringTriplesCharacters, function( G, z ) Append( r, List( CoveringTriplesCharacters( c, zn ), x -> [ PreImagesSet( h, x[1] ), PreImagesSet( h, x[2] ), - PreImagesRepresentative( h, x[3] ) ] ) ); + PreImagesRepresentativeNC( h, x[3] ) ] ) ); od; return r; @@ -665,7 +665,7 @@ InstallGlobalFunction( CoveringTriplesCharacters, function( G, z ) List( CoveringTriplesCharacters( img, ImageElm( h, z ) ), x -> [ PreImagesSet( h, x[1] ), PreImagesSet( h, x[2] ), - PreImagesRepresentative( h, x[3] ) ] ) ); + PreImagesRepresentativeNC( h, x[3] ) ] ) ); fi; od; return r; @@ -1067,7 +1067,7 @@ InstallMethod( BaumClausenInfo, for i in [ 2 .. Length( ssr.ds ) ] do j:= NaturalHomomorphismByNormalSubgroupNC( ssr.ds[ i-1 ], ssr.ds[i] ); Append( pcgs, List( SpecialPcgs( ImagesSource( j ) ), - x -> PreImagesRepresentative( j, x ) ) ); + x -> PreImagesRepresentativeNC( j, x ) ) ); od; Append( pcgs, SpecialPcgs( Last(ssr.ds) ) ); G:= ImagesSource( hom ); @@ -1911,8 +1911,7 @@ InstallMethod( BaumClausenInfo, k:= Pcgs( kernel ); pcgs:= PcgsByPcSequence( ElementsFamily( FamilyObj( kernel ) ), Concatenation( List( pcgs, - x -> PreImagesRepresentative( hom, x ) ), - k ) ); + x -> PreImagesRepresentativeNC( hom, x ) ), k ) ); k:= ListWithIdenticalEntries( Length( k ), 0 ); linear:= List( linear, rep -> Concatenation( rep, k ) ); diff --git a/lib/field.gi b/lib/field.gi index f5eadb8ede..70b282ca83 100644 --- a/lib/field.gi +++ b/lib/field.gi @@ -1315,15 +1315,15 @@ InstallMethod( ImagesSet, ############################################################################# ## -#M PreImagesElm( , ) . . . . . . . . . . . . preimage of an elm +#M PreImagesElmNC( , ) . . . . . . . . . . . preimage of an elm ## -InstallMethod( PreImagesElm, +InstallMethod( PreImagesElmNC, "for field homomorphism and element", FamRangeEqFamElm, [ IsFieldHomomorphism, IsObject ], function ( hom, elm ) if IsInjective( hom ) = 1 then - return [ PreImagesRepresentative( hom, elm ) ]; + return [ PreImagesRepresentativeNC( hom, elm ) ]; elif IsZero( elm ) then return Source( hom ); else @@ -1334,15 +1334,15 @@ InstallMethod( PreImagesElm, ############################################################################# ## -#M PreImagesSet( , ) . . . . . . . . . . . . . preimage of a set +#M PreImagesSetNC( , ) . . . . . . . . . . . . preimage of a set ## -InstallMethod( PreImagesSet, +InstallMethod( PreImagesSetNC, "for field homomorphism and field", CollFamRangeEqFamElms, [ IsFieldHomomorphism, IsField ], function ( hom, elms ) elms:= FieldByGenerators( List( GeneratorsOfField( elms ), - gen -> PreImagesRepresentative( hom, gen ) ) ); + gen -> PreImagesRepresentativeNC( hom, gen ) ) ); UseSubsetRelation( Source( hom ), elms ); return elms; end ); diff --git a/lib/fitfree.gi b/lib/fitfree.gi index d68681ea93..5090f8a7b2 100644 --- a/lib/fitfree.gi +++ b/lib/fitfree.gi @@ -81,7 +81,7 @@ local ffs,pcisom,rest,kpc,k,x,ker,r,pool,i,xx,pregens,iso; else iso:=IsomorphismFpGroup(Image(rest,U)); pregens:=List(GeneratorsOfGroup(Range(iso)),x-> - PreImagesRepresentative(rest,PreImagesRepresentative(iso,x))); + PreImagesRepresentativeNC(rest,PreImagesRepresentativeNC(iso,x))); # evaluate relators pool:=List(RelatorsOfFpGroup(Range(iso)), x->MappedWord(x,FreeGeneratorsOfFpGroup(Range(iso)),pregens)); @@ -91,7 +91,7 @@ local ffs,pcisom,rest,kpc,k,x,ker,r,pool,i,xx,pregens,iso; iso:=IsomorphismFpGroup(Image(rest,U)); pregens:=List(GeneratorsOfGroup(Range(iso)),x-> - PreImagesRepresentative(rest,PreImagesRepresentative(iso,x))); + PreImagesRepresentativeNC(rest,PreImagesRepresentativeNC(iso,x))); # evaluate relators pool:=List(RelatorsOfFpGroup(Range(iso)), x->MappedWord(x,FreeGeneratorsOfFpGroup(Range(iso)),pregens)); @@ -135,7 +135,7 @@ local ffs,pcisom,rest,kpc,k,x,ker,r,pool,i,xx,pregens,iso; # od; SetSize(U,Size(Image(rest))*Size(kpc)); k:=InducedPcgs(FamilyPcgs(Image(pcisom)),kpc); - k:=List(k,x->PreImagesRepresentative(pcisom,x)); + k:=List(k,x->PreImagesRepresentativeNC(pcisom,x)); k:=InducedPcgsByPcSequenceNC(ffs.pcgs,k); ker:=SubgroupNC(G,k); SetSize(ker,Size(kpc)); @@ -257,7 +257,7 @@ local ffs,hom,U,rest,ker,r,p,l,i,depths,pcisom,subsz,pcimgs; pcimgs:=List(ipcgs,x->ImagesRepresentative(ffs.pcisom,x)); ker:=SubgroupNC(G,List(MinimalGeneratingSet(Group(pcimgs,One(Range(ffs.pcisom)))), - x->PreImagesRepresentative(ffs.pcisom,x))); + x->PreImagesRepresentativeNC(ffs.pcisom,x))); SetPcgs(ker,ipcgs); if Length(ipcgs)=0 then SetSize(ker,1); @@ -916,8 +916,9 @@ local ser,hom,s,fphom,sf,sg,sp,fp,d,head,mran,nran,mpcgs,ocr,len,pcgs,gens; s:=SylowSubgroup(Image(hom),prime); fphom:=IsomorphismFpGroup(s); fp:=Image(fphom); - sf:=List(GeneratorsOfGroup(Image(fphom)),x->PreImagesRepresentative(fphom,x)); - sg:=List(sf,x->PreImagesRepresentative(hom,x)); + sf:=List(GeneratorsOfGroup(Image(fphom)), + x->PreImagesRepresentativeNC(fphom,x)); + sg:=List(sf,x->PreImagesRepresentativeNC(hom,x)); sp:=[]; RUN_IN_GGMBI:=true; # hack to skip Nice treatment fphom:=GroupGeneralMappingByImagesNC(Group(sg,One(G)),fp,sg, @@ -1194,9 +1195,9 @@ local s,d,c,act,o,i,j,h,p,hf,img,n,k,ns,all,hl,hcomp, norm:=n); for j in [2..Length(i)] do c[i[j]]:=rec(orbit:=i,orbitpos:=j, - rep:=PreImagesRepresentative(act, - RepresentativeAction(Image(act),i[1],i[j])), - component:=d[i[j]],hall:=h, norm:=n); + rep:=PreImagesRepresentativeNC(act, + RepresentativeAction(Image(act),i[1],i[j])), + component:=d[i[j]],hall:=h, norm:=n); od; od; @@ -1232,7 +1233,7 @@ local s,d,c,act,o,i,j,h,p,hf,img,n,k,ns,all,hl,hcomp, fp:=Range(fphom); gens:=MappingGeneratorsImages(fphom); imgs:=gens[2];gens:=gens[1]; - gens:=List(gens,x->PreImagesRepresentative(act,x)); + gens:=List(gens,x->PreImagesRepresentativeNC(act,x)); # adapt to normalize B gens:=List(gens,x->x/RepresentativeAction(t,b^x,b)); @@ -1280,7 +1281,7 @@ local s,d,c,act,o,i,j,h,p,hf,img,n,k,ns,all,hl,hcomp, fp:=Image(fphom); gens:=MappingGeneratorsImages(fphom); imgs:=gens[2];gens:=gens[1]; - gens:=List(gens,x->PreImagesRepresentative(hom,x)); + gens:=List(gens,x->PreImagesRepresentativeNC(hom,x)); fi; # now run through the candidates for Hall in S @@ -1408,8 +1409,9 @@ local ser,hom,s,fphom,sf,sg,sp,fp,d,head,mran,nran,mpcgs,ocr,len,pcgs, for s in HallsFittingFree(Image(hom),pi) do fphom:=IsomorphismFpGroup(s); fp:=Image(fphom); - sf:=List(GeneratorsOfGroup(Image(fphom)),x->PreImagesRepresentative(fphom,x)); - sg:=List(sf,x->PreImagesRepresentative(hom,x)); + sf:=List(GeneratorsOfGroup(Image(fphom)), + x->PreImagesRepresentativeNC(fphom,x)); + sg:=List(sf,x->PreImagesRepresentativeNC(hom,x)); sp:=[]; RUN_IN_GGMBI:=true; # hack to skip Nice treatment fphom:=GroupGeneralMappingByImagesNC(Group(sg,One(G)),fp,sg, diff --git a/lib/fldabnum.gi b/lib/fldabnum.gi index 5902772c5e..41d6adb98e 100644 --- a/lib/fldabnum.gi +++ b/lib/fldabnum.gi @@ -1918,9 +1918,9 @@ InstallMethod( PreImageElm, ############################################################################# ## -#M PreImagesElm( , ) . . . . . . for autom. of ab. number fields +#M PreImagesElmNC( , ) . . . . . for autom. of ab. number fields ## -InstallMethod( PreImagesElm, +InstallMethod( PreImagesElmNC, "for ANF automorphism and scalar", FamRangeEqFamElm, [ IsFieldHomomorphism and IsANFAutomorphismRep, IsScalar ], @@ -1932,9 +1932,9 @@ InstallMethod( PreImagesElm, ############################################################################# ## -#M PreImagesSet( , ) . . . . . for autom. of ab. number fields +#M PreImagesSetNC( , ) . . . . for autom. of ab. number fields ## -InstallMethod( PreImagesSet, +InstallMethod( PreImagesSetNC, "for ANF automorphism and scalar", CollFamRangeEqFamElms, [ IsFieldHomomorphism and IsANFAutomorphismRep, IsField ], @@ -1945,9 +1945,9 @@ InstallMethod( PreImagesSet, ############################################################################# ## -#M PreImagesRepresentative( , ) . for autom. of ab. number fields +#M PreImagesRepresentativeNC( , ) for autom. of ab. number fields ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for ANF automorphism and scalar", FamRangeEqFamElm, [ IsFieldHomomorphism and IsANFAutomorphismRep, IsScalar ], diff --git a/lib/ghom.gi b/lib/ghom.gi index bc217f1e32..38dc1e17ab 100644 --- a/lib/ghom.gi +++ b/lib/ghom.gi @@ -253,9 +253,9 @@ end ); ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . . . . . . . via images +#M PreImagesRepresentativeNC( , ) . . . . . . . . . . via images ## -InstallMethod( PreImagesRepresentative, "for PBG-Hom", FamRangeEqFamElm, +InstallMethod( PreImagesRepresentativeNC, "for PBG-Hom", FamRangeEqFamElm, [ IsPreimagesByAsGroupGeneralMappingByImages, IsMultiplicativeElementWithInverse ], 0, function( hom, elm ) @@ -264,7 +264,7 @@ function( hom, elm ) # group return ImagesRepresentative( RestrictedInverseGeneralMapping( hom ), elm ); else - return PreImagesRepresentative( AsGroupGeneralMappingByImages( hom ), elm ); + return PreImagesRepresentativeNC( AsGroupGeneralMappingByImages( hom ), elm ); fi; end ); @@ -875,19 +875,17 @@ InstallMethod( ImagesRepresentative, ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . . . . . . . . for GHBI +#M PreImagesRepresentativeNC( , ) . . . . . . . . . . . for GHBI ## -InstallMethod( PreImagesRepresentative, - "for GHBI and mult.-elm.-with-inverse", - FamRangeEqFamElm, - [ IsGroupGeneralMappingByImages, - IsMultiplicativeElementWithInverse ], 0, - function( hom, elm ) - if IsBound( hom!.images ) and elm in hom!.images then - return hom!.elements[ Position( hom!.images, elm ) ]; - else - return ImagesRepresentative( RestrictedInverseGeneralMapping( hom ), elm ); - fi; +InstallMethod( PreImagesRepresentativeNC, + "for GHBI and mult.-elm.-with-inverse", FamRangeEqFamElm, + [ IsGroupGeneralMappingByImages, IsMultiplicativeElementWithInverse ], 0, +function( hom, elm ) + if IsBound( hom!.images ) and elm in hom!.images then + return hom!.elements[ Position( hom!.images, elm ) ]; + else + return ImagesRepresentative( RestrictedInverseGeneralMapping( hom ), elm ); + fi; end ); @@ -1225,9 +1223,9 @@ InstallMethod( ImagesSet, ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . for conjugator isomorphism +#M PreImagesRepresentativeNC( , ) . . . for conjugator isomorphism ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for conjugator isomorphism", FamRangeEqFamElm, [ IsConjugatorIsomorphism, IsMultiplicativeElementWithInverse ], 0, @@ -1238,9 +1236,9 @@ InstallMethod( PreImagesRepresentative, ############################################################################# ## -#M PreImagesSet( , ) . . . . . . . . . for conjugator isomorphism +#M PreImagesSetNC( , ) . . . . . . . . for conjugator isomorphism ## -InstallMethod( PreImagesSet, +InstallMethod( PreImagesSetNC, "for conjugator isomorphism, and group", CollFamRangeEqFamElms, [ IsConjugatorIsomorphism, IsGroup ], 0, diff --git a/lib/ghomfp.gi b/lib/ghomfp.gi index fcc83630d9..0a1b2b5448 100644 --- a/lib/ghomfp.gi +++ b/lib/ghomfp.gi @@ -441,7 +441,7 @@ local q,r,tg,dtg,pemb,ugens,g,gi,d,o,gens,genims,i,gr,img,l,mapi; #better: orbit algo #r:=ShallowCopy(RightTransversal(q,qu)); #Sort(r,function(a,b) return 1^a<1^b;end); - #r:=List(r,i->PreImagesRepresentative(beta,i)); + #r:=List(r,i-> Representative(beta,i)); # compute transversal with short words from orbit algorithm on points o:=[1]; @@ -527,9 +527,9 @@ end); ############################################################################# ## -#M PreImagesSet( , ) +#M PreImagesSetNC( , ) ## -InstallMethod( PreImagesSet, "map from (sub)group of fp group", +InstallMethod( PreImagesSetNC, "map from (sub)group of fp group", CollFamRangeEqFamElms, [ IsFromFpGroupHomomorphism,IsGroup ],0, function(hom,u) @@ -718,9 +718,9 @@ end); ############################################################################# ## -#M PreImagesRepresentative +#M PreImagesRepresentativeNC ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "hom. to standard generators of fp group, using 'MappedWord'", FamRangeEqFamElm, [IsToFpGroupHomomorphismByImages,IsMultiplicativeElementWithInverse], @@ -1282,7 +1282,7 @@ local v,aiu,aiv,G,primes,irrel,ma,mau,a,k,gens,imgs,q,dec,deco,piv,co; fi; gens:=SmallGeneratingSet(a); - imgs:=List(gens,x->Image(mau,Image(hom,PreImagesRepresentative(ma,x)))); + imgs:=List(gens,x->Image(mau,Image(hom,PreImagesRepresentativeNC(ma,x)))); q:=GroupHomomorphismByImages(a,Image(mau),gens,imgs); k:=KernelOfMultiplicativeGeneralMapping(q); @@ -1293,7 +1293,7 @@ local v,aiu,aiv,G,primes,irrel,ma,mau,a,k,gens,imgs,q,dec,deco,piv,co; dec:=EpimorphismFromFreeGroup(Group(gens)); deco:=function(x) local i; - x:=ExponentSums(PreImagesRepresentative(dec,x)); + x:=ExponentSums(PreImagesRepresentativeNC(dec,x)); for i in [1..Length(aiv)] do x[i]:=x[i] mod aiv[i]; od; @@ -1330,7 +1330,7 @@ local hom,pcgs,impcgs; impcgs:=FamilyPcgs(Image(hom,M)); pcgs:=PcgsByPcSequenceCons(IsPcgsDefaultRep,IsModuloPcgsFpGroupRep, ElementsFamily(FamilyObj(M)), - List(impcgs,i->PreImagesRepresentative(hom,i)), + List(impcgs,i->PreImagesRepresentativeNC(hom,i)), [] ); pcgs!.hom:=hom; diff --git a/lib/ghompcgs.gi b/lib/ghompcgs.gi index f17db8b36c..78ba75b339 100644 --- a/lib/ghompcgs.gi +++ b/lib/ghompcgs.gi @@ -503,9 +503,9 @@ end); ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . . . . . . . via images +#M PreImagesRepresentativeNC( , ) . . . . . . . . . . via images ## -InstallMethod( PreImagesRepresentative, "method for pcgs hom", +InstallMethod( PreImagesRepresentativeNC, "method for pcgs hom", FamRangeEqFamElm, [ IsToPcGroupHomomorphismByImages,IsMultiplicativeElementWithInverse ], 0, function( hom, elm ) @@ -627,9 +627,9 @@ end ); ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . . . . . . via depth map +#M PreImagesRepresentativeNC( , ) . . . . . . . . . via depth map ## -InstallMethod( PreImagesRepresentative, FamRangeEqFamElm, +InstallMethod( PreImagesRepresentativeNC, FamRangeEqFamElm, [ IsPcgsToPcgsHomomorphism,IsMultiplicativeElementWithInverse ], 0, function( hom, elm ) local exp; diff --git a/lib/ghomperm.gi b/lib/ghomperm.gi index 2f103a6a37..38e811426d 100644 --- a/lib/ghomperm.gi +++ b/lib/ghomperm.gi @@ -11,9 +11,9 @@ ############################################################################# ## -#M PreImagesSet( , ) . for s.p. gen. mapping resp. mult. & inv. +#M PreImagesSetNC( , ) for s.p. gen. mapping resp. mult. & inv. ## -InstallMethod( PreImagesSet, +InstallMethod( PreImagesSetNC, "method for permgroup homs", CollFamRangeEqFamElms, [ IsPermGroupHomomorphism, IsGroup ], @@ -22,7 +22,7 @@ local genpreimages, pre,kg,sz,ol,orb,pos,dom,one; genpreimages:=GeneratorsOfMagmaWithInverses( elms ); genpreimages:= List(genpreimages, - gen -> PreImagesRepresentative( map, gen ) ); + gen -> PreImagesRepresentativeNC( map, gen ) ); if fail in genpreimages then TryNextMethod(); fi; @@ -1152,7 +1152,7 @@ local r, fgens, gens, kg; fi; fgens:=ShallowCopy(GeneratorsOfGroup(r)); gens:=List(fgens, - i->PreImagesRepresentative(hom2,PreImagesRepresentative(hom1,i))); + i->PreImagesRepresentativeNC(hom2,PreImagesRepresentativeNC(hom1,i))); kg:=GeneratorsOfGroup(KernelOfMultiplicativeGeneralMapping(hom2)); Append(gens,kg); Append(fgens,List(kg,i->One(r))); @@ -1162,13 +1162,13 @@ end); ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . . for perm group range +#M PreImagesRepresentativeNC( , ) . . . . . for perm group range ## -InstallMethod( PreImagesRepresentative, FamRangeEqFamElm, +InstallMethod( PreImagesRepresentativeNC, FamRangeEqFamElm, [ IsToPermGroupGeneralMappingByImages, IsMultiplicativeElementWithInverse ], 0, - function( hom, elm ) - return ImagesRepresentative( RestrictedInverseGeneralMapping( hom ), elm ); +function( hom, elm ) + return ImagesRepresentative( RestrictedInverseGeneralMapping( hom ), elm ); end ); ############################################################################# @@ -1562,10 +1562,10 @@ InstallMethod( ImagesSource,"constituent homomorphism",true, ############################################################################# ## -#M PreImagesRepresentative( , ) +#M PreImagesRepresentativeNC( , ) ## -InstallMethod( PreImagesRepresentative,"constituent homomorphism", - FamRangeEqFamElm,[IsConstituentHomomorphism,IsPerm], 0, +InstallMethod( PreImagesRepresentativeNC, "constituent homomorphism", + FamRangeEqFamElm, [IsConstituentHomomorphism,IsPerm], 0, function( hom, elm ) local D,DP; if not HasStabChainMutable(Source(hom)) then @@ -1579,9 +1579,9 @@ end); ############################################################################# ## -#M PreImagesSet( , ) . . . . . . . . . . . . . . . . for const hom +#M PreImagesSetNC( , ) . . . . . . . . . . . . . . . . for const hom ## -InstallMethod( PreImagesSet, "constituent homomorphism",CollFamRangeEqFamElms, +InstallMethod( PreImagesSetNC, "constituent homomorphism",CollFamRangeEqFamElms, [ IsConstituentHomomorphism, IsPermGroup ], 0, function( hom, I ) local H, # preimage of , result @@ -1594,7 +1594,7 @@ InstallMethod( PreImagesSet, "constituent homomorphism",CollFamRangeEqFamElms, # create the preimage group H := EmptyStabChain( [ ], One( Source( hom ) ) ); S := ConjugateStabChain( StabChainMutable( I ), H, x -> - PreImagesRepresentative( hom, x ), hom!.conperm ^ -1 ); + PreImagesRepresentativeNC( hom, x ), hom!.conperm ^ -1 ); T := H; while IsBound( T.stabilizer ) do AddGeneratorsExtendSchreierTree( T, GeneratorsOfGroup( K ) ); @@ -1817,9 +1817,9 @@ end ); ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . . . . . for blocks hom +#M PreImagesRepresentativeNC( , ) . . . . . . . . for blocks hom ## -InstallMethod( PreImagesRepresentative, "blocks homomorphism", +InstallMethod( PreImagesRepresentativeNC, "blocks homomorphism", FamRangeEqFamElm, [ IsBlocksHomomorphism, IsMultiplicativeElementWithInverse ], 0, function( hom, elm ) @@ -1869,9 +1869,9 @@ end) ; ############################################################################# ## -#M PreImagesSet( , ) . . . . . . . . . . . . . . . for blocks hom +#M PreImagesSetNC( , ) . . . . . . . . . . . . . . for blocks hom ## -InstallMethod( PreImagesSet, CollFamRangeEqFamElms, +InstallMethod( PreImagesSetNC, CollFamRangeEqFamElms, [ IsBlocksHomomorphism, IsPermGroup ], 0, function( hom, I ) local H; # preimage of under , result @@ -1905,7 +1905,7 @@ InstallGlobalFunction( PreImageSetStabBlocksHomomorphism, function( hom, I ) H := PreImageSetStabBlocksHomomorphism( hom, I.stabilizer ); ChangeStabChain( H, [ pnt ], false ); for gen in I.generators do - pre := PreImagesRepresentative( hom, gen ); + pre := PreImagesRepresentativeNC( hom, gen ); if not IsBound( H.translabels[ pnt ^ pre ] ) then AddGeneratorsExtendSchreierTree( H, [ pre ] ); fi; diff --git a/lib/gpfpiso.gi b/lib/gpfpiso.gi index 202d9419a7..491744f28f 100644 --- a/lib/gpfpiso.gi +++ b/lib/gpfpiso.gi @@ -90,10 +90,10 @@ local l,iso,fp,stbc,gens; if iso<>fail then fp:=IsomorphismFpGroup(l); iso:=GroupHomomorphismByImagesNC(G,Range(fp), - List(MappingGeneratorsImages(fp)[1], - i->PreImagesRepresentative(iso,i)), - MappingGeneratorsImages(fp)[2]); - SetIsBijective(iso,true); + List(MappingGeneratorsImages(fp)[1], + i->PreImagesRepresentativeNC(iso,i)), + MappingGeneratorsImages(fp)[2]); + SetIsBijective(iso,true); return iso; fi; od; @@ -166,13 +166,13 @@ function( G, str ) # gensH := Filtered( gensH, x -> x <> One(H) ); # fi; - # compute presentation of H - IsNonabelianSimpleGroup(H); - IsNaturalAlternatingGroup(H); - new:=IsomorphismFpGroup(H,"@"); - gensH:=List(GeneratorsOfGroup(Image(new)), - i->PreImagesRepresentative(new,i)); - preiH := List( gensH, x -> PreImagesRepresentative( hom, x ) ); + # compute presentation of H + IsNonabelianSimpleGroup(H); + IsNaturalAlternatingGroup(H); + new:=IsomorphismFpGroup(H,"@"); + gensH:=List(GeneratorsOfGroup(Image(new)), + i->PreImagesRepresentativeNC(new,i)); + preiH := List( gensH, x -> PreImagesRepresentativeNC( hom, x ) ); c := Length( gensH ); @@ -190,7 +190,7 @@ function( G, str ) w := MappedWord( rel, gensT, gensE{[1..c]} ); t := MappedWord( rel, gensT, imgsE{[1..c]} ); if not t = One( G ) then - t := PreImagesRepresentative( free, t ); + t := PreImagesRepresentativeNC( free, t ); t := MappedWord( t, gensF, gensE{[c+1..n+c]} ); else t := One( E ); @@ -204,7 +204,7 @@ function( G, str ) w := Comm( gensE[c+j], gensE[i] ); t := Comm( imgsE[c+j], imgsE[i] ); if not t = One( G ) then - t := PreImagesRepresentative( free, t ); + t := PreImagesRepresentativeNC( free, t ); t := MappedWord( t, gensF, gensE{[c+1..n+c]} ); else t := One( E ); @@ -293,7 +293,7 @@ function(g,str,N) gens:=Union(gens,Union(List(ser,SmallGeneratingSet))); fi; if f<>g then - gens:=List(gens,x->PreImagesRepresentative(hom,x)); + gens:=List(gens,x->PreImagesRepresentativeNC(hom,x)); ser:=List(ser,x->PreImage(hom,x)); fi; # change generators to make split @@ -396,8 +396,8 @@ function(g,str,N) # calculate automorphisms of f induced by G fgens:=GeneratorsOfGroup(f); auts:=List(GeneratorsOfGroup(g),i-> - GroupHomomorphismByImagesNC(f,f,fgens, - List(fgens,j->Image(hom,PreImagesRepresentative(hom,j)^i)):noassert)); + GroupHomomorphismByImagesNC(f,f,fgens, + List(fgens,j->Image(hom,PreImagesRepresentativeNC(hom,j)^i)):noassert)); for j in auts do SetIsBijective(j,true); od; @@ -426,7 +426,7 @@ function(g,str,N) else a:=IsomorphismFpGroup(sf:noassert); fi; - ad:=List(GeneratorsOfGroup(Range(a)),i->PreImagesRepresentative(a,i)); + ad:=List(GeneratorsOfGroup(Range(a)),i->PreImagesRepresentativeNC(a,i)); lad:=Length(ad); n:=Length(orb); @@ -461,7 +461,7 @@ function(g,str,N) fp:=fg/rels; a:=GroupHomomorphismByImagesNC(f,fp,fgens,GeneratorsOfGroup(fp):noassert); fi; - Append(gens,List(fgens,i->PreImagesRepresentative(hom,i))); + Append(gens,List(fgens,i->PreImagesRepresentativeNC(hom,i))); # here we really want a composed homomorphism, to avoid extra work for # a new stabilizer chain @@ -640,7 +640,7 @@ local fpq, qgens, qreps, fpqg, rels, pcgs, p, f, qimg, idx, nimg, decomp, ngen, fp, hom2, di, source, dih, dec, i, j; fpq:=Range(hom); qgens:=GeneratorsOfGroup(fpq); - qreps:=List(qgens,i->PreImagesRepresentative(hom,i)); + qreps:=List(qgens,i->PreImagesRepresentativeNC(hom,i)); fpqg:=FreeGeneratorsOfFpGroup(fpq); rels:=[]; if IsModuloPcgs(mnsf) then @@ -694,7 +694,7 @@ local fpq, qgens, qreps, fpqg, rels, pcgs, p, f, qimg, idx, nimg, decomp, ngen:=FreeGeneratorsOfFpGroup(p); # This is not really a pcgs, but treated as layer generators the same # way, thus use the same variable name - pcgs:=List(GeneratorsOfGroup(p),i->PreImagesRepresentative(mnsf,i)); + pcgs:=List(GeneratorsOfGroup(p),i->PreImagesRepresentativeNC(mnsf,i)); f:=FreeGroup(Length(fpqg)+Length(pcgs)); qimg:=GeneratorsOfGroup(f){[1..Length(fpqg)]}; idx:=[Length(fpqg)+1..Length(fpqg)+Length(pcgs)]; @@ -966,7 +966,7 @@ function( G, series, str ) gensH := GeneratorsOfGroup( H ); gensH := Filtered( gensH, x -> x <> One(H) ); - preiH := List( gensH, x -> PreImagesRepresentative( hom, x ) ); + preiH := List( gensH, x -> PreImagesRepresentativeNC( hom, x ) ); c := Length( gensH ); # compute presentation of H @@ -989,7 +989,7 @@ function( G, series, str ) w := MappedWord( rel, gensT, gensE{[1..c]} ); t := MappedWord( rel, gensT, imgsE{[1..c]} ); if not t = One( G ) then - t := PreImagesRepresentative( free, t ); + t := PreImagesRepresentativeNC( free, t ); t := MappedWord( t, gensF, gensE{[c+1..n+c]} ); else t := One( E ); @@ -1003,7 +1003,7 @@ function( G, series, str ) w := Comm( gensE[c+j], gensE[i] ); t := Comm( imgsE[c+j], imgsE[i] ); if not t = One( G ) then - t := PreImagesRepresentative( free, t ); + t := PreImagesRepresentativeNC( free, t ); t := MappedWord( t, gensF, gensE{[c+1..n+c]} ); else t := One( E ); @@ -1228,8 +1228,8 @@ local iso,fp,dec,homs,mos,i,j,ffp,imo,m,k,gens,fm,mgens,rules, for r in Rules(k) do left:=MappedWord(r[1],FreeGeneratorsOfFpMonoid(m),monreps); right:=MappedWord(r[2],FreeGeneratorsOfFpMonoid(m),monreps); - diff:=LeftQuotient(PreImagesRepresentative(iso,right), - PreImagesRepresentative(iso,left)); + diff:=LeftQuotient(PreImagesRepresentativeNC(iso,right), + PreImagesRepresentativeNC(iso,left)); diff:=ImagesRepresentative(iso,diff); left:=MappedWord(r[1],FreeGeneratorsOfFpMonoid(m),monreal); @@ -1248,7 +1248,7 @@ local iso,fp,dec,homs,mos,i,j,ffp,imo,m,k,gens,fm,mgens,rules, if reduce(mgens[k])=mgens[k] then right:=fmgens[j]^-1*fmgens[k]*fmgens[j]; #collect - right:=ImagesRepresentative(iso,PreImagesRepresentative(iso,right)); + right:=ImagesRepresentative(iso,PreImagesRepresentativeNC(iso,right)); right:=Product(List(LetterRepAssocWord(UnderlyingElement(right)), x->mgens[Position(nums,x)])); right:=reduce(mgens[j]*right); @@ -1320,7 +1320,7 @@ local pcgs,iso,fp,i,j,gens,numi,ord,fm,fam,mword,k,r,addrule,a,e,m; pcgs:=Pcgs(G); iso:=IsomorphismFpGroup(G); fp:=Range(iso); - if List(GeneratorsOfGroup(fp),x->PreImagesRepresentative(iso,x))<>pcgs then + if List(GeneratorsOfGroup(fp),x->PreImagesRepresentativeNC(iso,x))<>pcgs then Error("pcgs"); fi; gens:=[]; @@ -1520,7 +1520,7 @@ local iso,n,fn,sz,bigcount,tryweyl; iso:=IsomorphismGroups(G,P); if iso<>fail then P:=List(GeneratorsOfGroup(H), - x->PreImagesRepresentative(iso,ImagesRepresentative(isp,x))); + x->PreImagesRepresentativeNC(iso,ImagesRepresentative(isp,x))); iso:=GroupHomomorphismByImagesNC(G,H,P,GeneratorsOfGroup(H)); fi; return iso; @@ -1728,13 +1728,13 @@ local isob,isos,iso,gens,a,rels,l,i,j,bgens,cb,cs,b,f,k,w,monoid, # force going to pc group, as this will give better ordering isob:=GroupHomomorphismByFunction(borel,Range(cb.fphom), x->ImagesRepresentative(cb.fphom,ImagesRepresentative(pciso,x)), - x->PreImagesRepresentative(pciso,PreImagesRepresentative(cb.fphom,x))); + x->PreImagesRepresentativeNC(pciso,PreImagesRepresentativeNC(cb.fphom,x))); b:=Range(isob); wgens:=GeneratorsOfGroup(weyl); - bgens:=List(GeneratorsOfGroup(b),x->PreImagesRepresentative(isob,x)); + bgens:=List(GeneratorsOfGroup(b),x->PreImagesRepresentativeNC(isob,x)); if newstyle and bgens<>GeneratorsOfGroup(borel) then Error("gens");fi; bpairs:=Concatenation(List(bgens,x->[x,x^-1])); @@ -1879,7 +1879,7 @@ local isob,isos,iso,gens,a,rels,l,i,j,bgens,cb,cs,b,f,k,w,monoid, x:=UnderlyingElement(ImagesRepresentative(cb.monhom,x)); x:=reduce(x,RelationsOfFpMonoid(monoid),mdag,fail); x:=ElementOfFpMonoid(FamilyObj(One(monoid)),x); - return PreImagesRepresentative(cb.monhom,x); + return PreImagesRepresentativeNC(cb.monhom,x); end; mdag:=EmptyKBDAG(Union(List(FreeGeneratorsOfFpMonoid(monoid), @@ -1924,7 +1924,7 @@ local isob,isos,iso,gens,a,rels,l,i,j,bgens,cb,cs,b,f,k,w,monoid, x:=UnderlyingElement(ImagesRepresentative(cs.monhom,x)); x:=reduce(x,RelationsOfFpMonoid(Range(cs.monhom)),wdag,fail); x:=ElementOfFpMonoid(FamilyObj(One(Range(cs.monhom))),x); - return PreImagesRepresentative(cs.monhom,x); + return PreImagesRepresentativeNC(cs.monhom,x); end; wdag:=EmptyKBDAG(Union(List(FreeGeneratorsOfFpMonoid(Range(cs.monhom)), @@ -2014,7 +2014,7 @@ local isob,isos,iso,gens,a,rels,l,i,j,bgens,cb,cs,b,f,k,w,monoid, a:=PositionCanonical(rt,elm); b:=rti[a]; rep:=RepresentativeAction(Image(bhom),a,dcnums[b][1]); - rep:=PreImagesRepresentative(bhom,rep); + rep:=PreImagesRepresentativeNC(bhom,rep); if single then a:=[CanonicalRightCosetElement(ac[1],rt[dcnums[b][1]]),rep]; else @@ -2053,13 +2053,16 @@ local isob,isos,iso,gens,a,rels,l,i,j,bgens,cb,cs,b,f,k,w,monoid, relab:=true; decomp:=function(elm) - local rep,a; + local rep,pos; if elm in borel then return [elm,One(borel),One(borel)];fi; - - a:=dcr(elm); - rep:=a[2]; - - rep:=[elm*rep/a[1],a[1],rep^-1]; + #pos:=PositionProperty(dc,y->elm in y); + pos:=rti[PositionCanonical(rt,elm)]; + #rep:=RepresentativeAction(borel,PositionCanonical(rt,elm), + # PositionCanonical(rt,dcreps[pos]),bgens,borela,OnPoints); + rep:=PreImagesRepresentativeNC(bhom, + RepresentativeAction(Range(bhom),PositionCanonical(rt,elm), + PositionCanonical(rt,dcreps[pos]))); + rep:=[elm*rep/dcreps[pos],dcreps[pos],rep^-1]; Assert(0,rep[1] in borel); return rep; end; @@ -2441,7 +2444,7 @@ if rule[1]=rule[2] then return;fi; else # BN-style reductions - pcgs:=List(GeneratorsOfGroup(b),x->PreImagesRepresentative(isob,x)); + pcgs:=List(GeneratorsOfGroup(b),x->PreImagesRepresentativeNC(isob,x)); # remove powers pcgs:=pcgs{ Filtered([1..Length(pcgs)],i->not ForAny([1..i-1], @@ -2455,7 +2458,7 @@ if rule[1]=rule[2] then return;fi; # which elements b*i can we write as i*\tilde b. Then b^i=\tilde b, that # is b\in B\cvap B^(i^-1) - pri:=PreImagesRepresentative(isos,i); + pri:=PreImagesRepresentativeNC(isos,i); stb:=Intersection(borel,borel^(pri^-1)); Info(InfoFpGroup,2,i," ",Size(stb)); @@ -2511,14 +2514,14 @@ if rule[1]=rule[2] then return;fi; Info(InfoFpGroup,3,"borelrun ",Position(wo,i)," of ",Length(wo)); # rewrite i*b*j as \tilde b*k*\hat b. - pri:=PreImagesRepresentative(isos,i); + pri:=PreImagesRepresentativeNC(isos,i); stb:=Intersection(borel^pri,borel); for j in wo do Info(InfoFpGroup,2,"DC:",i,", ",j," from ",Length(rels)); for k in borelelm do #RightTransversal(borel,stb) do - a:=PreImagesRepresentative(isos,i)*k* - PreImagesRepresentative(isos,j); + a:=PreImagesRepresentativeNC(isos,i)*k* + PreImagesRepresentativeNC(isos,j); a:=decomp(a); a:=[nofob(ImagesRepresentative(isob,a[1])), nofow(ImagesRepresentative(isos,a[2])), @@ -2684,7 +2687,7 @@ end); # if List(mg,x->LetterRepAssocWord(UnderlyingElement(x)))<> # List([1..Length(mg)],x->[x]) then Error("gens!"); fi; # pre:=List(mg,x->LetterRepAssocWord(UnderlyingElement( -# PreImagesRepresentative(miso,x)))); +# PreImagesRepresentativeNC(miso,x)))); # if ForAny(pre,x->Length(x)<>1) then Error("double");fi; # Add(l,Concatenation(pre)); # if IsBound(m!.rewritingSystem) then @@ -2896,7 +2899,7 @@ local d,f,group,act,g,sy,b,c,borel,weyl,a,i,iso,ucs,gens,gl; fi; c:=c[1]; a:=SubgroupNC(group,List(GeneratorsOfGroup(weyl), - x->PreImagesRepresentative(c,x))); + x->PreImagesRepresentativeNC(c,x))); Size(a); a!.epiweyl:=weyl; weyl:=a; diff --git a/lib/gpprmsya.gi b/lib/gpprmsya.gi index a88508a2bb..d0af65692e 100644 --- a/lib/gpprmsya.gi +++ b/lib/gpprmsya.gi @@ -1265,7 +1265,7 @@ syll, act, typ, sel, bas, wdom, comp, lperm, other, away, i, j,b0,opg,bp; w:=AutomorphismGroup(b); opg:=NaturalHomomorphismByNormalSubgroupNC(w, InnerAutomorphismsAutomorphismGroup(w)); - ll:=List(AsSSortedList(Image(opg)),x->PreImagesRepresentative(opg,x)); + ll:=List(AsSSortedList(Image(opg)),x->PreImagesRepresentativeNC(opg,x)); ll:=Filtered(ll,IsConjugatorAutomorphism); ll:=List(ll,ConjugatorInnerAutomorphism); pg:=b; diff --git a/lib/gprd.gi b/lib/gprd.gi index e32bf13af7..0623e77ac6 100644 --- a/lib/gprd.gi +++ b/lib/gprd.gi @@ -715,7 +715,7 @@ InstallGlobalFunction(InnerSubdirectProducts2,function( D, U, V ) # and obtain double coset reps reps := List( DoubleCosets( P, autU, autV ), Representative ); - reps := List( reps, x -> PreImagesRepresentative( gamma, x ) ); + reps := List( reps, x -> PreImagesRepresentativeNC( gamma, x ) ); # loop over automorphisms for rep in reps do @@ -724,9 +724,9 @@ InstallGlobalFunction(InnerSubdirectProducts2,function( D, U, V ) gens := Concatenation( GeneratorsOfGroup( N ), GeneratorsOfGroup( M ) ); for r in GeneratorsOfGroup( UN ) do - g := PreImagesRepresentative( pair[1], r ); + g := PreImagesRepresentativeNC( pair[1], r ); h := Image( iso, Image( rep, r ) ); - h := PreImagesRepresentative( pair[2], h ); + h := PreImagesRepresentativeNC( pair[2], h ); Add( gens, g * h ); od; S := SubgroupNC( D, gens ); @@ -1091,13 +1091,13 @@ local info,map,U,mapfun,P; U:=SubgroupNC(G,info.hgens); fi; map:=GroupHomomorphismByFunction(P,U,mapfun, - function(elm) - elm:=elm![n]; - if n>info.degI then - elm:=PreImagesRepresentative(info.alpha,elm); - fi; - return elm; - end); + function(elm) + elm:=elm![n]; + if n>info.degI then + elm:=PreImagesRepresentativeNC(info.alpha,elm); + fi; + return elm; + end); info.embeddings[n]:=map; fi; return info.embeddings[n]; @@ -1118,7 +1118,7 @@ local info,map,np; map:=GroupHomomorphismByFunction(G,info.groups[2], function(elm) - return PreImagesRepresentative(info.alpha,elm![np]); + return PreImagesRepresentativeNC(info.alpha,elm![np]); end, false, # not bijective function(elm) @@ -1179,7 +1179,7 @@ local giso,niso,P,gens,a,Go,No,i; N:=Image(niso,N); gens:=[]; for i in GeneratorsOfGroup(G) do - i:=Image(aut,PreImagesRepresentative(giso,i)); + i:=Image(aut,PreImagesRepresentativeNC(giso,i)); i:=InducedAutomorphism(niso,i); Add(gens,i); od; @@ -1220,9 +1220,9 @@ local Go,No,giso,niso,FG,GP,FN,NP,F,GI,NI,rels,i,j,P; N:=Image(niso,N); FG:=FreeGeneratorsOfFpGroup(G); - GP:=List(GeneratorsOfGroup(G),x->PreImagesRepresentative(giso,x)); + GP:=List(GeneratorsOfGroup(G),x->PreImagesRepresentativeNC(giso,x)); FN:=FreeGeneratorsOfFpGroup(N); - NP:=List(GeneratorsOfGroup(N),x->PreImagesRepresentative(niso,x)); + NP:=List(GeneratorsOfGroup(N),x->PreImagesRepresentativeNC(niso,x)); F:=FreeGroup(List(Concatenation(FG,FN),String)); GI:=GeneratorsOfGroup(F){[1..Length(FG)]}; diff --git a/lib/gprdmat.gi b/lib/gprdmat.gi index 2480d861d1..7c64886cf1 100644 --- a/lib/gprdmat.gi +++ b/lib/gprdmat.gi @@ -143,9 +143,9 @@ end); ############################################################################# ## -#M PreImagesRepresentative(,) . . . . . . . . . . . of embedding +#M PreImagesRepresentativeNC(,) . . . . . . . . . . . of embedding ## -InstallMethod(PreImagesRepresentative,"matrix direct product embedding", +InstallMethod(PreImagesRepresentativeNC,"matrix direct product embedding", FamRangeEqFamElm, [ IsEmbeddingDirectProductMatrixGroup, IsMultiplicativeElementWithInverse ], @@ -206,9 +206,9 @@ end); ############################################################################# ## -#M PreImagesRepresentative(,) . . . . . . . . . . . of projection +#M PreImagesRepresentativeNC(,) . . . . . . . . . . . of projection ## -InstallMethod(PreImagesRepresentative,"matrix direct product projection", +InstallMethod(PreImagesRepresentativeNC,"matrix direct product projection", FamRangeEqFamElm, [ IsProjectionDirectProductMatrixGroup, IsMultiplicativeElementWithInverse ],0, @@ -382,9 +382,9 @@ end); ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . . . . . . . of embedding +#M PreImagesRepresentativeNC( , ) . . . . . . . . . . of embedding ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "imprim matrix wreath product embedding", FamRangeEqFamElm, [ IsEmbeddingImprimitiveWreathProductMatrixGroup, IsMultiplicativeElementWithInverse ], 0, diff --git a/lib/gprdpc.gi b/lib/gprdpc.gi index 6994897c39..a17e46436a 100644 --- a/lib/gprdpc.gi +++ b/lib/gprdpc.gi @@ -421,7 +421,7 @@ local pg,ph,kg,kh,ig,ih,mg,mh,S,info; ig:=InducedPcgs(pg,kg); ih:=InducedPcgs(ph,kh); mg:=pg mod ig; - mh:=List(mg,i->PreImagesRepresentative(hh,Image(gh,i))); + mh:=List(mg,i->PreImagesRepresentativeNC(hh,Image(gh,i))); pg:=Concatenation(mg,ig,List(ih,i->One(G))); ph:=Concatenation(mh,List(ig,i->One(H)),ih); S:=SubdirProdPcGroups(G,pg,H,ph); diff --git a/lib/gprdperm.gi b/lib/gprdperm.gi index 327f812adc..bb21e9b388 100644 --- a/lib/gprdperm.gi +++ b/lib/gprdperm.gi @@ -169,9 +169,9 @@ end ); ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . . . . . . . of embedding +#M PreImagesRepresentativeNC( , ) . . . . . . . . . . of embedding ## -InstallMethod( PreImagesRepresentative, "perm direct product embedding", +InstallMethod( PreImagesRepresentativeNC, "perm direct product embedding", FamRangeEqFamElm, [ IsEmbeddingDirectProductPermGroup, IsMultiplicativeElementWithInverse ], @@ -292,9 +292,9 @@ end ); ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . . . . . . . of projection +#M PreImagesRepresentativeNC( , ) . . . . . . . . . . of projection ## -InstallMethod( PreImagesRepresentative,"perm direct product projection", +InstallMethod( PreImagesRepresentativeNC,"perm direct product projection", FamRangeEqFamElm, [ IsProjectionDirectProductPermGroup, IsMultiplicativeElementWithInverse ], 0, @@ -388,7 +388,7 @@ InstallMethod( SubdirectProductOp,"permgroup", true, # over the generators of the kernel of $phi_2$. gens := []; for gen in GeneratorsOfGroup( G1 ) do - Add( gens, gen^emb1 * PreImagesRepresentative(phi2,gen^phi1)^emb2 ); + Add( gens, gen^emb1*PreImagesRepresentativeNC(phi2,gen^phi1)^emb2 ); od; for gen in GeneratorsOfGroup( KernelOfMultiplicativeGeneralMapping( phi2 ) ) do @@ -466,9 +466,9 @@ end ); ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . . . . . . . of projection +#M PreImagesRepresentativeNC( , ) . . . . . . . . . . of projection ## -InstallMethod( PreImagesRepresentative,"perm subdirect product projection", +InstallMethod( PreImagesRepresentativeNC,"perm subdirect product projection", FamRangeEqFamElm, [ IsProjectionSubdirectProductPermGroup, IsMultiplicativeElementWithInverse ], 0, @@ -487,11 +487,11 @@ InstallMethod( PreImagesRepresentative,"perm subdirect product projection", # compute the preimage if 1 = prj!.component then - elm := img ^ info.perms[1] - * PreImagesRepresentative(phi2,img^phi1) ^ info.perms[2]; + elm := img ^ info.perms[1] + * PreImagesRepresentativeNC(phi2,img^phi1) ^ info.perms[2]; else - elm := img ^ info.perms[2] - * PreImagesRepresentative(phi1,img^phi2) ^ info.perms[1]; + elm := img ^ info.perms[2] + * PreImagesRepresentativeNC(phi1,img^phi2) ^ info.perms[1]; fi; # return the preimage @@ -799,9 +799,9 @@ end ); ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . . . . . . . of embedding +#M PreImagesRepresentativeNC( , ) . . . . . . . . . . of embedding ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "imprim perm wreath product embedding", FamRangeEqFamElm, [ IsEmbeddingImprimitiveWreathProductPermGroup, IsMultiplicativeElementWithInverse ], 0, diff --git a/lib/grp.gi b/lib/grp.gi index e46a66da6f..27f3644271 100644 --- a/lib/grp.gi +++ b/lib/grp.gi @@ -515,12 +515,12 @@ local p, hom, reps, as, a, b, ap, bp, ab, ap_bp, ab_p, g, h, H, N; reps := ConjugacyClasses(Image(hom)); reps := List(reps, Representative); reps := Filtered(reps, g -> not IsOne(g)); - reps := List(reps, g -> PreImagesRepresentative(hom, g)); + reps := List(reps, g -> PreImagesRepresentativeNC(hom, g)); as := List(reps, a -> [a,a^p]); for b in Image(hom) do - b := PreImagesRepresentative(hom, b); + b := PreImagesRepresentativeNC(hom, b); bp := b^p; for a in as do ap := a[2]; a := a[1]; @@ -1793,7 +1793,7 @@ local hom,gens; fi; hom:=IsomorphismPermGroup(G); gens:=IndependentGeneratorsOfAbelianGroup(Image(hom,G)); - return List(gens,i->PreImagesRepresentative(hom,i)); + return List(gens,i->PreImagesRepresentativeNC(hom,i)); end); @@ -2090,8 +2090,8 @@ InstallGlobalFunction( SupersolvableResiduumDefault, function( G ) # dual space of the module, w.r.t. `pcgs'. mg:= List( gs, x -> TransposedMat( List( pcgs, y -> one * ExponentsOfPcElement( pcgs, Image( ph, - Image( dh, PreImagesRepresentative( - dh, PreImagesRepresentative(ph,y) )^x ) ) )))^-1); + Image( dh, PreImagesRepresentativeNC( + dh, PreImagesRepresentativeNC(ph,y) )^x ) ) )))^-1); #T inverting is not necessary, or? mg:= Filtered( mg, x -> x <> idm ); @@ -2141,11 +2141,11 @@ InstallGlobalFunction( SupersolvableResiduumDefault, function( G ) # Construct a group element corresponding to # the basis element of the submodule. - Add( tmp2, PreImagesRepresentative( ph, + Add( tmp2, PreImagesRepresentativeNC( ph, PcElementByExponentsNC( pcgs, v ) ) ); od; - Add( ds, PreImagesSet( dh, + Add( ds, PreImagesSetNC( dh, SubgroupNC( df, Concatenation( tmp2, gen ) ) ) ); od; Append( gen, tmp2 ); @@ -2154,14 +2154,14 @@ InstallGlobalFunction( SupersolvableResiduumDefault, function( G ) else # cyclic case - Add( ds, PreImagesSet( dh, + Add( ds, PreImagesSetNC( dh, SubgroupNC( df, AsSSortedList( gen ) ) ) ); fi; od; # Generate the new candidate. - ssr:= PreImagesSet( dh, SubgroupNC( df, AsSSortedList( gen ) ) ); + ssr:= PreImagesSetNC( dh, SubgroupNC( df, AsSSortedList( gen ) ) ); fi; @@ -2392,7 +2392,7 @@ InstallMethod( UpperCentralSeriesOfGroup, Add( S, C ); Info( InfoGroup, 2, "UpperCentralSeriesOfGroup: step ", Length(S) ); hom := NaturalHomomorphismByNormalSubgroupNC( G, C ); - C := PreImages( hom, Centre( Image( hom ) ) ); + C := PreImagesNC( hom, Centre( Image( hom ) ) ); od; if Last(S) = G then @@ -3598,7 +3598,7 @@ InstallMethod( HallSubgroupOp, iso := IsomorphismPermGroup( G ); H := HallSubgroup( ImagesSource( iso ), pi ); - return PreImagesSet(iso, H); + return PreImagesSetNC(iso, H); end ); @@ -5337,7 +5337,7 @@ InstallMethod (MinimalNormalSubgroups, local hom; hom := NiceMonomorphism (grp); return List (MinimalNormalSubgroups (NiceObject (grp)), - N -> PreImagesSet (hom, N)); + N -> PreImagesSetNC(hom, N)); end); diff --git a/lib/grpcompl.gi b/lib/grpcompl.gi index 9adf68a175..81e845295e 100644 --- a/lib/grpcompl.gi +++ b/lib/grpcompl.gi @@ -99,12 +99,12 @@ local G,N,K,s, h, q, fpi, factorpres, com, comgens, cen, ocrels, fpcgs, ncom, Length(MappingGeneratorsImages(fpi)[2])," generators"); factorpres:=[FreeGeneratorsOfFpGroup(Range(fpi)), RelatorsOfFpGroup(Range(fpi)), - List(GeneratorsOfGroup(Range(fpi)), - i->PreImagesRepresentative(fpi,i))]; - Assert(1,ForAll(factorpres[3],i->Image(h,PreImagesRepresentative(h,i))=i)); + List(GeneratorsOfGroup(Range(fpi)), + i->PreImagesRepresentativeNC(fpi,i))]; + Assert(1,ForAll(factorpres[3],i->Image(h,PreImagesRepresentativeNC(h,i))=i)); # initialize com:=[G]; - comgens:=[List(factorpres[3],i->PreImagesRepresentative(h,i))]; + comgens:=[List(factorpres[3],i->PreImagesRepresentativeNC(h,i))]; cen:=[s[1]]; ocrels:=false; diff --git a/lib/grpfp.gi b/lib/grpfp.gi index 8f9d97983b..cc73d6474d 100644 --- a/lib/grpfp.gi +++ b/lib/grpfp.gi @@ -319,7 +319,7 @@ local fam,hom; if hom=fail then TryNextMethod(); fi; - return PreImagesRepresentative(hom,Random(rs, Image(hom,gp))); + return PreImagesRepresentativeNC(hom,Random(rs, Image(hom,gp))); end ); ############################################################################# @@ -2031,11 +2031,11 @@ local d,A,B,e1,e2,Ag,Bg,s,sg,u,v,map,sz; # instead of intersecting both preimages with s we only intersect the # intersection - u:=PreImagesSet(Projection(d,1),G!.sub); + u:=PreImagesSetNC(Projection(d,1),G!.sub); if HasSize(B) then SetSize(u,Size(G!.sub)*Size(B)); fi; - v:=PreImagesSet(Projection(d,2),H!.sub); + v:=PreImagesSetNC(Projection(d,2),H!.sub); if HasSize(A) then SetSize(v,Size(H!.sub)*Size(A)); fi; @@ -3167,7 +3167,7 @@ InstallMethod( LowIndexSubgroupsFpGroupIterator, local u, v; u:= NextIterator( iter!.fullIterator ); - v:= PreImagesSet( fpi, u ); + v:= PreImagesSetNC( fpi, u ); SetIndexInWholeGroup( v, IndexInWholeGroup( G ) * IndexInWholeGroup( u ) ); return v; @@ -3236,7 +3236,7 @@ local fpi,u,l,i,a; l:=[]; for i in u do - a:=PreImagesSet(fpi,i); + a:=PreImagesSetNC(fpi,i); SetIndexInWholeGroup(a,IndexInWholeGroup(G)*IndexInWholeGroup(i)); Add(l,a); od; @@ -3379,8 +3379,8 @@ local d,A,B,e1,e2,Ag,Bg,s,sg,u,v; # get both subgroups in the direct product via the projections # instead of intersecting both preimages with s we only intersect the # intersection - u:=PreImagesSet(Projection(d,1),G!.sub); - v:=PreImagesSet(Projection(d,2),H!.sub); + u:=PreImagesSetNC(Projection(d,1),G!.sub); + v:=PreImagesSetNC(Projection(d,2),H!.sub); u:=Intersection(u,s); v:=Intersection(v,s); @@ -5494,10 +5494,10 @@ local G,T,gens,g,reps,ng,index,i,j,ndef,n,iso; IsRightTransversalFpGroupRep and IsList and IsDuplicateFreeList and IsAttributeStoringRep ), rec( group := OG, - subgroup := U, - iso:=iso, - table:=T, - reps:=List(reps,i->PreImagesRepresentative(iso,i)))); + subgroup := U, + iso:=iso, + table:=T, + reps:=List(reps,i->PreImagesRepresentativeNC(iso,i)))); fi; ndef := 1; @@ -5509,16 +5509,16 @@ local G,T,gens,g,reps,ng,index,i,j,ndef,n,iso; #This assumes that reps[j] is already defined - but #this is true because T is 'standardized' ndef := ndef+1; - if ndef=index then - return Objectify( NewType( FamilyObj( OG ), - IsRightTransversalFpGroupRep and IsList and - IsDuplicateFreeList and IsAttributeStoringRep ), - rec( group := OG, - subgroup := U, - iso:=iso, - table:=T, - reps:=List(reps,i->PreImagesRepresentative(iso,i)))); - fi; + if ndef=index then + return Objectify( NewType( FamilyObj( OG ), + IsRightTransversalFpGroupRep and IsList and + IsDuplicateFreeList and IsAttributeStoringRep ), + rec( group := OG, + subgroup := U, + iso:=iso, + table:=T, + reps:=List(reps,i->PreImagesRepresentativeNC(iso,i)))); + fi; fi; od; od; diff --git a/lib/grplatt.gi b/lib/grplatt.gi index 5563219bf7..ab02af4280 100644 --- a/lib/grplatt.gi +++ b/lib/grplatt.gi @@ -955,7 +955,8 @@ InstallGlobalFunction(LatticeViaRadical,function(arg) #k:=PreImage(hom,a); # make generators of homomorphism fit nicely to presentation gf:=IsomorphismFpGroup(a); - e:=List(MappingGeneratorsImages(gf)[1],x->PreImagesRepresentative(hom,x)); + e:=List(MappingGeneratorsImages(gf)[1], + x->PreImagesRepresentativeNC(hom,x)); # we cannot guarantee that the parent contains e, so no # ClosureSubgroup. k:=ClosureGroup(KernelOfMultiplicativeGeneralMapping(hom),e); @@ -2779,7 +2780,7 @@ local fgi,inducedfactorautos,projs,psubs,info,n,l,nl,emb,u,pos, auts:=[]; for i in GeneratorsOfGroup(n) do aut:=GroupHomomorphismByImages(f,f,gens,List(gens,x-> - Image(hom,PreImagesRepresentative(hom,x)^i))); + Image(hom,PreImagesRepresentativeNC(hom,x)^i))); SetIsBijective(aut,true); Add(auts,aut); od; @@ -2842,24 +2843,24 @@ local fgi,inducedfactorautos,projs,psubs,info,n,l,nl,emb,u,pos, for s in subs do for t in s[3] do # look over normals of subgroup #Print(t,"\n"); - if t{[3,4]}=myid then - if false and myid=[1,1] then - #Print("direct\n"); - g:=Subgroup(D,Concatenation(GeneratorsOfGroup(j[1]),List(GeneratorsOfGroup(s[1]),x->Image(emb,x)))); - Add(nl,[g,Normalizer(D,g)]); - else - iso:=IsomorphismGroups(f,t[6]); - if iso<>fail then - #Found isomorphic factor groups - iso:=hom*iso; - ind:=Subgroup(t[7],inducedfactorautos(k.normalizer,t[6],iso)); - for dc in DoubleCosetRepsAndSizes(t[7],ind,t[8]) do - # form the subdirect product - g:=List(GeneratorsOfGroup(j[1]), - x->x*Image(emb,PreImagesRepresentative(t[5], - Image(dc[1],Image(iso,x))) )); - Append(g,List(GeneratorsOfGroup(t[1]),x->Image(emb,x))); - g:=Subgroup(D,g); + if t{[3,4]}=myid then + if false and myid=[1,1] then + #Print("direct\n"); + g:=Subgroup(D,Concatenation(GeneratorsOfGroup(j[1]),List(GeneratorsOfGroup(s[1]),x->Image(emb,x)))); + Add(nl,[g,Normalizer(D,g)]); + else + iso:=IsomorphismGroups(f,t[6]); + if iso<>fail then + #Found isomorphic factor groups + iso:=hom*iso; + ind:=Subgroup(t[7],inducedfactorautos(k.normalizer,t[6],iso)); + for dc in DoubleCosetRepsAndSizes(t[7],ind,t[8]) do + # form the subdirect product + g:=List(GeneratorsOfGroup(j[1]), + x->x*Image(emb,PreImagesRepresentativeNC(t[5], + Image(dc[1],Image(iso,x))) )); + Append(g,List(GeneratorsOfGroup(t[1]),x->Image(emb,x))); + g:=Subgroup(D,g); if Size(g)<>Size(j[1])*Size(s[1])/Size(f) then Error("sudi\n");fi; Add(nl,[g,Normalizer(D,g)]); od; diff --git a/lib/grpmat.gi b/lib/grpmat.gi index 5766951a76..f34dfde8c5 100644 --- a/lib/grpmat.gi +++ b/lib/grpmat.gi @@ -623,7 +623,7 @@ local gens,s,dom,mon,no; # call the recursive function to do the work gens:= SCMinSmaGens( no, s, [], One( no ), true ).gens; SetMinimalStabChain(G,s); - return List(gens,i->PreImagesRepresentative(mon,i)); + return List(gens,i->PreImagesRepresentativeNC(mon,i)); end); ############################################################################# @@ -660,7 +660,7 @@ local s,dom,mon, img; i->Position(HomeEnumerator(dom),i)))); # call the recursive function to do the work s:= LargestElementStabChain( s, One( img ) ); - return PreImagesRepresentative(mon,s); + return PreImagesRepresentativeNC(mon,s); end); ############################################################################# @@ -699,7 +699,7 @@ local mon,dom,S,o,oimgs,p,i,g; od; # change by corresponding matrix element - e:=PreImagesRepresentative(mon,g)*e; + e:=PreImagesRepresentativeNC(mon,g)*e; S:=S.stabilizer; od; @@ -1202,9 +1202,9 @@ InstallMethod( ImagesRepresentative, ############################################################################# ## -#M PreImagesRepresentative( , ) . . . for a blow up isomorphism +#M PreImagesRepresentativeNC( , ) . . for a blow up isomorphism ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for a blow up isomorphism, and a matrix in the range", FamRangeEqFamElm, [ IsBlowUpIsomorphism, IsMatrix ], diff --git a/lib/grpnames.gi b/lib/grpnames.gi index 8220d79e88..11dcafd25e 100644 --- a/lib/grpnames.gi +++ b/lib/grpnames.gi @@ -173,7 +173,7 @@ InstallMethod( NormalComplementNC, i:=0; for gF in IndependentGeneratorsOfAbelianGroup(F) do i := i+1; - g := PreImagesRepresentative(nat, gF); + g := PreImagesRepresentativeNC(nat, gF); R := RightCoset(N, g); # DirectFactorsOfGroup already computed Center and RationalClasses # when calling NormalComplement diff --git a/lib/grpnice.gd b/lib/grpnice.gd index 5a9480fd86..b1e10bbbb9 100644 --- a/lib/grpnice.gd +++ b/lib/grpnice.gd @@ -363,7 +363,7 @@ BindGlobal( "AttributeMethodByNiceMonomorphismList", function( oper, par ) local nice; nice:= NiceMonomorphism( obj ); return List( oper( NiceObject( obj ) ), - x -> PreImagesRepresentative( nice, x ) ); + x -> PreImagesRepresentativeNC( nice, x ) ); end ); end ); @@ -398,7 +398,7 @@ BindGlobal( "AttributeMethodByNiceMonomorphismCollElm", function( oper, par ) img := ImagesRepresentative( nice, obj2 : actioncanfail:= true ); if img = fail or not ( img in ImagesSource( nice ) and - PreImagesRepresentative( nice, img ) = obj2 ) then + PreImagesRepresentativeNC( nice, img ) = obj2 ) then TryNextMethod(); fi; return oper( NiceObject( obj1 ), img ); @@ -441,7 +441,7 @@ BindGlobal( "AttributeMethodByNiceMonomorphismElmColl", img := ImagesRepresentative( nice, obj1 : actioncanfail:= true ); if img = fail or not (img in ImagesSource( nice ) and - PreImagesRepresentative( nice, img ) = obj1) then + PreImagesRepresentativeNC( nice, img ) = obj1) then TryNextMethod(); fi; return oper( img, NiceObject( obj2 ) ); @@ -525,7 +525,7 @@ BindGlobal( "GroupMethodByNiceMonomorphismCollElm", img := ImagesRepresentative( nice, obj2 : actioncanfail:= true ); if img = fail or not (img in ImagesSource( nice ) and - PreImagesRepresentative( nice, img ) = obj2) then + PreImagesRepresentativeNC( nice, img ) = obj2) then TryNextMethod(); fi; img1 := oper( NiceObject( obj1 ), img ); @@ -613,7 +613,7 @@ BindGlobal( "SubgroupMethodByNiceMonomorphismCollColl", function( oper, par ) img:=ImagesSet( nice, obj2 ); if img = fail or not ( IsSubset( ImagesSource( nice ), img ) and - PreImagesSet( nice, img ) = obj2 ) then + PreImagesSetNC( nice, img ) = obj2 ) then TryNextMethod(); fi; img := oper( NiceObject( obj1 ), img ); @@ -637,7 +637,7 @@ BindGlobal( "SubgroupMethodByNiceMonomorphismCollElm", function( oper, par ) img := ImagesRepresentative( nice, obj2 : actioncanfail:= true ); if img = fail or not ( img in ImagesSource( nice ) and - PreImagesRepresentative (nice , img ) = obj2 ) then + PreImagesRepresentativeNC(nice , img ) = obj2 ) then TryNextMethod(); fi; img1 := oper( NiceObject( obj1 ), img ); @@ -764,7 +764,7 @@ BindGlobal( "GroupSeriesMethodByNiceMonomorphismCollElm", img := ImagesRepresentative( nice, obj2 : actioncanfail:= true ); if img = fail or not ( img in ImagesSource( nice ) and - PreImagesRepresentative( nice, img ) = obj2 ) then + PreImagesRepresentativeNC( nice, img ) = obj2 ) then TryNextMethod(); fi; list := ShallowCopy( oper( NiceObject( obj1 ), img ) ); diff --git a/lib/grpnice.gi b/lib/grpnice.gi index f72d348e81..6e3db2bd6f 100644 --- a/lib/grpnice.gi +++ b/lib/grpnice.gi @@ -212,7 +212,7 @@ function( elm, G ) nice := NiceMonomorphism( G ); img := ImagesRepresentative( nice, elm:actioncanfail:=true ); return img<>fail and img in NiceObject( G ) - and PreImagesRepresentative( nice, img ) = elm; + and PreImagesRepresentativeNC( nice, img ) = elm; end ); @@ -284,7 +284,7 @@ function( obj1, obj2 ) img := ImagesRepresentative( nice, obj2:actioncanfail:=true ); if img = fail or not (img in ImagesSource(nice) and - PreImagesRepresentative(nice,img)=obj2) then + PreImagesRepresentativeNC(nice,img)=obj2) then TryNextMethod(); fi; no:=NiceObject(obj1); @@ -344,10 +344,10 @@ local mon,cl,clg,c,i; cl:=ConjugacyClasses(NiceObject(g)); clg:=[]; for i in cl do - c:=ConjugacyClass(g,PreImagesRepresentative(mon,Representative(i))); + c:=ConjugacyClass(g,PreImagesRepresentativeNC(mon,Representative(i))); c!.niceClass:=i; if HasStabilizerOfExternalSet(i) then - SetStabilizerOfExternalSet(c,PreImages(mon,StabilizerOfExternalSet(i))); + SetStabilizerOfExternalSet(c,PreImagesNC(mon,StabilizerOfExternalSet(i))); fi; Add(clg,c); od; @@ -767,7 +767,7 @@ SubgroupMethodByNiceMonomorphism( SolvableRadical, InstallMethodWithRandomSource( Random, "for a random source and a group handled by nice monomorphism", [ IsRandomSource, IsGroup and IsHandledByNiceMonomorphism ], 0, - {rs, G} -> PreImagesRepresentative( NiceMonomorphism( G ), + {rs, G} -> PreImagesRepresentativeNC( NiceMonomorphism( G ), Random( rs, NiceObject( G ) ) ) ); @@ -783,9 +783,9 @@ local mon,cl,clg,c,i; cl:=RationalClasses(NiceObject(g)); clg:=[]; for i in cl do - c:=RationalClass(g,PreImagesRepresentative(mon,Representative(i))); + c:=RationalClass(g,PreImagesRepresentativeNC(mon,Representative(i))); if HasStabilizerOfExternalSet(i) then - SetStabilizerOfExternalSet(c,PreImages(mon,StabilizerOfExternalSet(i))); + SetStabilizerOfExternalSet(c,PreImagesNC(mon,StabilizerOfExternalSet(i))); fi; if HasGaloisGroup(i) then SetGaloisGroup(c,GaloisGroup(i)); @@ -806,7 +806,7 @@ function(g,u) local mon,rt; mon:=NiceMonomorphism(g); rt:=RightTransversal(ImagesSet(mon,g),ImagesSet(mon,u)); - rt:=List(rt,i->RightCoset(u,PreImagesRepresentative(mon,i))); + rt:=List(rt,i->RightCoset(u,PreImagesRepresentativeNC(mon,i))); return rt; end); @@ -878,7 +878,7 @@ local hom,rep; rep:= RepresentativeAction( NiceObject( G ), ImageElm( hom, a ), ImageElm( hom, b ), OnPoints ); if rep<>fail then - rep:=PreImagesRepresentative(hom,rep); + rep:=PreImagesRepresentativeNC(hom,rep); fi; return rep; end); @@ -972,9 +972,9 @@ end); ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . . . . . . . via images +#M PreImagesRepresentativeNC( , ) . . . . . . . . . . via images ## -InstallMethod( PreImagesRepresentative, "for PBG-Niceo", +InstallMethod( PreImagesRepresentativeNC, "for PBG-Niceo", FamRangeEqFamElm, [ IsPreimagesByAsGroupGeneralMappingByImages and IsNiceMonomorphism, IsMultiplicativeElementWithInverse ], 0, @@ -983,7 +983,7 @@ local p, tmp; # avoid the double dispatch for `AsGroupGeneralMappingByImages' tmp := RUN_IN_GGMBI; RUN_IN_GGMBI:=true; - p:=PreImagesRepresentative( AsGroupGeneralMappingByImages( hom ), elm ); + p:=PreImagesRepresentativeNC( AsGroupGeneralMappingByImages( hom ), elm ); RUN_IN_GGMBI:=tmp; return p; end ); @@ -1078,7 +1078,7 @@ InstallMethod( \[\],"enum-by-niceo", true, function( enum, pos ) local img; img:=enum!.niceEnumerator[pos]; - return PreImagesRepresentative(enum!.morphism,img); + return PreImagesRepresentativeNC(enum!.morphism,img); end); diff --git a/lib/grppc.gi b/lib/grppc.gi index f01a7af92d..9233d045e2 100644 --- a/lib/grppc.gi +++ b/lib/grppc.gi @@ -2147,7 +2147,7 @@ local e, # EAS if iso<>false then V:=PreImage(iso,V); no:=PreImage(iso,no); - ce:=PreImagesRepresentative(iso,ce); + ce:=PreImagesRepresentativeNC(iso,ce); fi; return [V,no,ce]; end ); @@ -2568,7 +2568,7 @@ local q, pcgs, sub, hom, f, ex, C; ex:=ExponentOfPGroupAndElm(f,q); while ex[1]>q do # take the element of highest order in f and take power of its preimage - ex:=PreImagesRepresentative(hom,ex[2]^q); + ex:=PreImagesRepresentativeNC(hom,ex[2]^q); sub:=NormalClosure(G,ClosureSubgroupNC(sub,ex)); hom:=NaturalHomomorphismByNormalSubgroup(G,sub); f:=Range(hom); @@ -2646,7 +2646,7 @@ function(G,p,e) local f; f:=MaximalAbelianQuotient(G); IsAbelian(Image(f)); - return SubgroupByPcgs(G,Pcgs(PreImagesSet(f,Omega(Image(f),p,e)))); + return SubgroupByPcgs(G,Pcgs(PreImagesSetNC(f,Omega(Image(f),p,e)))); end); # Efficiency notes: @@ -2679,7 +2679,7 @@ local z,f; f:=NaturalHomomorphismByNormalSubgroup(G,Subgroup(G,[z])); IsAbelian(Image(f)); # Probably is not, but quick to check - return SubgroupByPcgs(G,Pcgs(PreImagesSet(f,Omega(Image(f),p,e)))); + return SubgroupByPcgs(G,Pcgs(PreImagesSetNC(f,Omega(Image(f),p,e)))); end); # Efficiency Points: @@ -2820,7 +2820,7 @@ InstallMethod (HallSubgroupOp, "via IsomoprhismPcGroup", true, function (grp, pi) local iso; iso := IsomorphismPcGroup (grp); - return PreImagesSet (iso, HallSubgroup (ImagesSource (iso), pi)); + return PreImagesSetNC(iso, HallSubgroup (ImagesSource (iso), pi)); end); @@ -2841,7 +2841,7 @@ InstallMethod (SylowComplementOp, "via IsomoprhismPcGroup", true, function (grp, p) local iso; iso := IsomorphismPcGroup (grp); - return PreImagesSet (iso, SylowComplement (ImagesSource (iso), p)); + return PreImagesSetNC(iso, SylowComplement (ImagesSource (iso), p)); end); diff --git a/lib/grppcaut.gi b/lib/grppcaut.gi index 2840694725..0f3ca0cadc 100644 --- a/lib/grppcaut.gi +++ b/lib/grppcaut.gi @@ -437,7 +437,7 @@ local spec,s,n,M, if d = 1 then hom := IsomorphismPermGroup( B ); pcgs := Pcgs( Image( hom ) ); - pcs := List( pcgs, x -> PreImagesRepresentative( hom, x ) ); + pcs := List( pcgs, x -> PreImagesRepresentativeNC( hom, x ) ); TransferPcgsInfo( B, pcs, RelativeOrders( pcgs ) ); return B; fi; @@ -509,12 +509,12 @@ local spec,s,n,M, Info( InfoOverGr, 1, "computed normalizer of size ", Size(L)); # go back to mat group - B := List( GeneratorsOfGroup(L), x -> PreImagesRepresentative(hom,x) ); + B := List( GeneratorsOfGroup(L), x -> PreImagesRepresentativeNC(hom,x) ); w := PrimitiveRoot(field)* Immutable( IdentityMat( d, field ) ); B := SubgroupNC( S, Concatenation( B, [w] ) ); if IsSolvableGroup( L ) then - pcgs := List( Pcgs(L), x -> PreImagesRepresentative( hom, x ) ); + pcgs := List( Pcgs(L), x -> PreImagesRepresentativeNC( hom, x ) ); Add( pcgs, w ); rels := ShallowCopy( RelativeOrders( Pcgs(L) ) ); Add( rels, p-1 ); @@ -536,7 +536,7 @@ BindGlobal( "CocycleSQ", function( epi, field ) H := Source( epi ); F := Image( epi ); N := KernelOfMultiplicativeGeneralMapping( epi ); - pcsH := List( Pcgs( F ), x -> PreImagesRepresentative( epi, x ) ); + pcsH := List( Pcgs( F ), x -> PreImagesRepresentativeNC( epi, x ) ); pcsN := Pcgs( N ); pcgsH := PcgsByPcSequence( ElementsFamily( FamilyObj( H ) ), Concatenation( pcsH, pcsN ) ); @@ -646,7 +646,7 @@ BindGlobal( "LiftInduciblePair", function( epi, ind, M, weight ) pcgsF := Pcgs( F ); - pcsH := List( pcgsF, x -> PreImagesRepresentative( epi, x ) ); + pcsH := List( pcgsF, x -> PreImagesRepresentativeNC( epi, x ) ); pcsN := Pcgs( N ); pcgsH := PcgsByPcSequence( ElementsFamily( FamilyObj( H ) ), Concatenation( pcsH, pcsN ) ); @@ -656,7 +656,7 @@ BindGlobal( "LiftInduciblePair", function( epi, ind, M, weight ) # use automorphism of F imgsF := List( pcgsF, x -> Image( ind[1], x ) ); opmats := List( imgsF, x -> MappedPcElement( x, pcgsF, M.generators ) ); - imgsF := List( imgsF, x -> PreImagesRepresentative( epi, x ) ); + imgsF := List( imgsF, x -> PreImagesRepresentativeNC( epi, x ) ); # use automorphism of N imgsN := List( pcsN, x -> ExponentsOfPcElement( pcsN, x ) ); @@ -1418,11 +1418,13 @@ InstallGlobalFunction(AutomorphismGroupSolvableGroup,function( G ) hom := ActionHomomorphism( xset, "surjective"); P := Image( hom ); if IsSolvableGroup( P ) then - pcsA := List( Pcgs(P), x -> PreImagesRepresentative( hom, x )); + pcsA := List( Pcgs(P), + x -> PreImagesRepresentativeNC( hom, x )); TransferPcgsInfo( A, pcsA, RelativeOrders( Pcgs(P) ) ); else imgs := SmallGeneratingSet( P ); - gens := List( imgs, x -> PreImagesRepresentative( hom, x ) ); + gens := List( imgs, + x -> PreImagesRepresentativeNC( hom, x ) ); tmp := Size( A ); A := GroupByGenerators( gens, One( A ) ); SetSize( A, tmp ); @@ -1543,10 +1545,10 @@ InstallGlobalFunction(AutomorphismGroupFrattFreeGroup,function( G ) imgs := []; for i in [1..Length(gensK)] do m := gensU[i]^n; - a := PreImagesRepresentative( hom, m ); + a := PreImagesRepresentativeNC( hom, m ); Add( imgs, a ); od; - l := PreImagesRepresentative( iso, n ); + l := PreImagesRepresentativeNC( iso, n ); Append( imgs, List( gensF, x -> Image( l, x ) ) ); new := GroupHomomorphismByImagesNC( G, G, gensG, imgs ); SetIsBijective( new, true ); diff --git a/lib/grppccom.gi b/lib/grppccom.gi index 2dc5682575..96a746a6cb 100644 --- a/lib/grppccom.gi +++ b/lib/grppccom.gi @@ -19,7 +19,7 @@ local r,img,i,gens,img2; gens:=GeneratorsOfGroup(img); img2:=Image(h[i],G); r[i]:=GroupHomomorphismByImagesNC(img,img2,gens,List(gens,j-> - Image(h[i],PreImagesRepresentative(h[i+1],j)))); + Image(h[i],PreImagesRepresentativeNC(h[i+1],j)))); SetKernelOfMultiplicativeGeneralMapping(r[i], Image(h[i+1],KernelOfMultiplicativeGeneralMapping(h[i]))); img:=img2; diff --git a/lib/grppcext.gi b/lib/grppcext.gi index 4cfb4063a1..bcc5e554a9 100644 --- a/lib/grppcext.gi +++ b/lib/grppcext.gi @@ -378,11 +378,11 @@ local ag, p1iso, agp, p2iso, DP, p1, p2, gens, genimgs, triso,s,i,u,opt, genimgs:=List(gens, i->ImagesRepresentative(Embedding(D,1), - PreImagesRepresentative(p1iso, - PreImagesRepresentative(pc1,ImagesRepresentative(p1,i)))) + PreImagesRepresentativeNC(p1iso, + PreImagesRepresentativeNC(pc1,ImagesRepresentative(p1,i)))) *ImagesRepresentative(Embedding(D,2), - PreImagesRepresentative(p2iso, - PreImagesRepresentative(pc2,ImagesRepresentative(p2,i)))) ); + PreImagesRepresentativeNC(p2iso, + PreImagesRepresentativeNC(pc2,ImagesRepresentative(p2,i)))) ); else opt:=rec(limit:=s,random:=1); @@ -426,9 +426,9 @@ local ag, p1iso, agp, p2iso, DP, p1, p2, gens, genimgs, triso,s,i,u,opt, genimgs:=List(gens, i->ImagesRepresentative(Embedding(D,1), - PreImagesRepresentative(p1iso,ImagesRepresentative(p1,i))) + PreImagesRepresentativeNC(p1iso,ImagesRepresentative(p1,i))) *ImagesRepresentative(Embedding(D,2), - PreImagesRepresentative(p2iso,ImagesRepresentative(p2,i))) ); + PreImagesRepresentativeNC(p2iso,ImagesRepresentative(p2,i))) ); fi; triso:=GroupHomomorphismByImagesNC(DP,D,gens,genimgs); @@ -528,7 +528,7 @@ local G, M, Mgrp, oper, A, B, D, translate, gens, genimgs, triso, K, K1, gens,M.generators); test:=function(perm) local aut,imgs,mat; - aut:=PreImagesRepresentative(triso,perm); + aut:=PreImagesRepresentativeNC(triso,perm); imgs:=List(gens,x->ImagesRepresentative(aut,x)); imgs:=List(imgs,x->ImagesRepresentative(modulehom,x)); mat:=MTX.IsomorphismModules(M,GModuleByMats(imgs,M.field)); @@ -696,9 +696,9 @@ local G, M, Mgrp, oper, A, B, D, translate, gens, genimgs, triso, K, K1, basicact:=function( tup, elm ) local gens; - #gens := List( tup[1], x -> PreImagesRepresentative( elm[1], x ) ); + #gens := List( tup[1], x -> PreImagesRepresentativeNC( elm[1], x ) ); #gens := List( gens, x -> MappedPcElement( x, tup[1], tup[2] ) ); - gens := List( Ggens, x -> PreImagesRepresentative( elm[1], x ) ); + gens := List( Ggens, x -> PreImagesRepresentativeNC( elm[1], x ) ); gens := List( gens, x -> MappedPcElement( x, Ggens, tup ) ); gens := List( gens, x -> x ^ elm[2] ); return gens; @@ -711,10 +711,10 @@ local G, M, Mgrp, oper, A, B, D, translate, gens, genimgs, triso, K, K1, Assert(1,MappingGeneratorsImages(epi)[2]=Ggens); f:=function( tup, elm ) local gens; - #gens := List( tup[1], x -> PreImagesRepresentative( elm[1], x ) ); + #gens := List( tup[1], x -> PreImagesRepresentativeNC( elm[1], x ) ); #gens := List( gens, x -> MappedPcElement( x, tup[1], tup[2] ) ); - gens := List( Ggens, x -> PreImagesRepresentative( elm[1], x ) ); - gens := List( gens, x -> MappedWord( PreImagesRepresentative(epi,x), + gens := List( Ggens, x -> PreImagesRepresentativeNC( elm[1], x ) ); + gens := List( gens, x -> MappedWord( PreImagesRepresentativeNC(epi,x), GeneratorsOfGroup(Source(epi)), tup ) ); gens := List( gens, x -> x ^ elm[2] ); return gens; @@ -730,13 +730,13 @@ local G, M, Mgrp, oper, A, B, D, translate, gens, genimgs, triso, K, K1, elmlist:=[]; tmp:=List(genimgs,x->x[1]); - preimlist:=List(tmp,x->[x,List(Ggens,y->PreImagesRepresentative(x,y))]); + preimlist:=List(tmp,x->[x,List(Ggens,y->PreImagesRepresentativeNC(x,y))]); f:=function( tup, elm ) local gens,p; p:=PositionProperty(preimlist,x->IsIdenticalObj(x[1],elm[1])); if p=fail then - gens := List( Ggens, x -> PreImagesRepresentative( elm[1], x ) ); + gens := List( Ggens, x -> PreImagesRepresentativeNC( elm[1], x ) ); else gens:=preimlist[p][2]; fi; @@ -781,7 +781,7 @@ local G, M, Mgrp, oper, A, B, D, translate, gens, genimgs, triso, K, K1, if elmlist<>fail then tmp:=List(genimgs,x->x[1]); - preimlist:=List(tmp,x->[x,List(Ggens,y->PreImagesRepresentative(x,y))]); + preimlist:=List(tmp,x->[x,List(Ggens,y->PreImagesRepresentativeNC(x,y))]); # ensure we also account for action u:=Group(tup); @@ -911,7 +911,7 @@ BindGlobal( "MatrixOperationOfCPGroup", function( cc, gens ) mats := List( gens, x -> [] ); base := Basis( Image( cc.cohom ) ); - prei := List( base, x -> PreImagesRepresentative( cc.cohom, x ) ); + prei := List( base, x -> PreImagesRepresentativeNC( cc.cohom, x ) ); pcgs := Pcgs( cc.group ); ords := RelativeOrders( pcgs ); @@ -1008,7 +1008,7 @@ function( G, M, C ) return [ExtensionSQ( cc.collector, G, M, 0 )]; elif Dimension( Image(cc.cohom)) = 1 then c := Basis(Image(cc.cohom))[1]; - c := PreImagesRepresentative(cc.cohom, c); + c := PreImagesRepresentativeNC(cc.cohom, c); return [ExtensionSQ( cc.collector, G, M, 0 ), ExtensionSQ( cc.collector, G, M, c )]; fi; @@ -1018,7 +1018,7 @@ function( G, M, C ) # compute orbit of mats on H^2( G, M ) Mgrp := GroupByGenerators( mats ); orbs := OrbitsDomain( Mgrp, Image(cc.cohom), OnRight ); - orbs := List( orbs, x -> PreImagesRepresentative( cc.cohom, x[1] ) ); + orbs := List( orbs, x -> PreImagesRepresentativeNC( cc.cohom, x[1] ) ); ext := List( orbs, x -> ExtensionSQ( cc.collector, G, M, x ) ); return ext; end); @@ -1113,7 +1113,7 @@ BindGlobal( "NonSplitExtensions", function( arg ) red := true; elif Dimension( Image(cc.cohom ) ) = 1 then - c := PreImagesRepresentative(cc.cohom, Basis(Image(cc.cohom))[1]); + c := PreImagesRepresentativeNC(cc.cohom, Basis(Image(cc.cohom))[1]); all := [ExtensionSQ( C, G, M, c)]; red := true; @@ -1121,7 +1121,7 @@ BindGlobal( "NonSplitExtensions", function( arg ) elif IsBound( arg[3] ) and not arg[3] then all := NormedRowVectors( Image(cc.cohom) ); all := List( all, x -> ExtensionSQ(cohom.collector, G, M, - PreImagesRepresentative(cc.cohom,x ))); + PreImagesRepresentativeNC(cc.cohom,x ))); red := false; # sometimes we do not want to reduce @@ -1132,7 +1132,7 @@ BindGlobal( "NonSplitExtensions", function( arg ) then all := NormedRowVectors( Image(cc.cohom) ); all := List( all, x -> ExtensionSQ(cc.collector, G, M, - PreImagesRepresentative(cc.cohom, x ))); + PreImagesRepresentativeNC(cc.cohom, x ))); red := false; # then we want to reduce @@ -1151,7 +1151,7 @@ BindGlobal( "NonSplitExtensions", function( arg ) # create extensions and add info all := List( all, x -> ExtensionSQ(cc.collector, G, M, - PreImagesRepresentative(cc.cohom, x ))); + PreImagesRepresentativeNC(cc.cohom, x ))); fi; if red then diff --git a/lib/grppclat.gi b/lib/grppclat.gi index 4b8113783e..42785b7f3e 100644 --- a/lib/grppclat.gi +++ b/lib/grppclat.gi @@ -85,8 +85,8 @@ local f; Image( epi, ConjugatorOfConjugatorIsomorphism( aut ) ) ); else aut:= GroupHomomorphismByImagesNC(f,f,GeneratorsOfGroup(f), - List(GeneratorsOfGroup(f), - i->Image(epi,Image(aut,PreImagesRepresentative(epi,i))))); + List(GeneratorsOfGroup(f), + i->Image(epi,Image(aut,PreImagesRepresentativeNC(epi,i))))); SetIsInjective(aut,true); SetIsSurjective(aut,true); fi; @@ -672,7 +672,7 @@ local g, # group # hom:=[]; # for i in func do # hom2:=GroupHomomorphismByImagesNC(g,g,g.generators,List(g.generators, -# j->Image(isom,Image(i,PreImagesRepresentative(isom,j))))); +# j->Image(isom,Image(i,PreImagesRepresentative(isom,j))))); # hom2.isMapping:=true; # Add(hom,hom2); # od; @@ -788,7 +788,7 @@ local g, # group hom:= GroupHomomorphismByImagesNC(f,fa,GeneratorsOfGroup(f), List(GeneratorsOfGroup(f),i-> - Image(hom,PreImagesRepresentative(epi,i)))); + Image(hom,PreImagesRepresentativeNC(epi,i)))); Assert(2,KernelOfMultiplicativeGeneralMapping(hom)=n); # lift the known groups diff --git a/lib/grpperm.gi b/lib/grpperm.gi index 020398dfe5..08f7805298 100644 --- a/lib/grpperm.gi +++ b/lib/grpperm.gi @@ -1592,7 +1592,7 @@ InstallGlobalFunction( SylowSubgroupPermGroup, function( G, p ) O := Orbit( S, D[1] ); f := ActionHomomorphism( S, O,"surjective" ); T := SylowSubgroupPermGroup( Range( f ), p ); - S := PreImagesSet( f, T ); + S := PreImagesSetNC( f, T ); SubtractSet( D, O ); od; return S; @@ -1605,7 +1605,7 @@ InstallGlobalFunction( SylowSubgroupPermGroup, function( G, p ) f := ActionHomomorphism( G, B, OnSets,"surjective" ); T := SylowSubgroupPermGroup( Range( f ), p ); if Size( T ) < Size( Range( f ) ) then - T := PreImagesSet( f, T ); + T := PreImagesSetNC( f, T ); S := SylowSubgroupPermGroup( T , p) ; return S; fi; @@ -1630,7 +1630,7 @@ InstallGlobalFunction( SylowSubgroupPermGroup, function( G, p ) Info(InfoGroup,1,"PermSylow: cycleaction"); f := ActionHomomorphism( C, B, OnSets,"surjective" ); T := SylowSubgroupPermGroup( Range( f ), p ); - S := PreImagesSet( f, T ); + S := PreImagesSetNC( f, T ); return S; end ); diff --git a/lib/grpprmcs.gi b/lib/grpprmcs.gi index c8a8a1166a..8ba3001d28 100644 --- a/lib/grpprmcs.gi +++ b/lib/grpprmcs.gi @@ -1173,7 +1173,7 @@ InstallGlobalFunction( PullbackKernelCSPG, fi; for g in gens do for j in [1..i-1] do - g := PreImagesRepresentative(homlist[i-j],g); + g := PreImagesRepresentativeNC(homlist[i-j],g); od; Add(normals[index],g); Add(factors[index],()); @@ -1193,7 +1193,7 @@ InstallGlobalFunction( PullbackCSPG, function(p,homlist) # compute a preimage of the permutation p in the input group lenhomlist := Length(homlist); for i in [1..lenhomlist] do - p := PreImagesRepresentative(homlist[lenhomlist+1-i],p); + p := PreImagesRepresentativeNC(homlist[lenhomlist+1-i],p); od; return p; end ); @@ -1522,7 +1522,7 @@ InstallMethod( PCoreOp, for g in GeneratorsOfGroup( KernelOfMultiplicativeGeneralMapping( homlist[i] ) ) do for j in [1..i-1] do - g := PreImagesRepresentative(homlist[i-j],g); + g := PreImagesRepresentativeNC(homlist[i-j],g); od; Add(pgenlist,g); od; @@ -1747,7 +1747,7 @@ InstallMethod( SolvableRadical, for g in GeneratorsOfGroup( KernelOfMultiplicativeGeneralMapping( homlist[i] ) ) do for j in [1..i-1] do - g := PreImagesRepresentative(homlist[i-j],g); + g := PreImagesRepresentativeNC(homlist[i-j],g); od; Add(solvable,g); od; @@ -1873,7 +1873,7 @@ InstallMethod( Centre, else order := Size( centr ); cent := IntersectionNormalClosurePermGroup(GG,centr,order*Size(GG)); - cent:= PreImages(tchom,cent); + cent:= PreImagesNC(tchom,cent); Assert( 1, IsAbelian( cent ) ); SetIsAbelian( cent, true ); return cent; @@ -1917,7 +1917,7 @@ InstallMethod( Centre, cent := IntersectionNormalClosurePermGroup ( GG, GroupByGenerators(hgens,()), order*Size(GG) ); if n <> len then - cent:= PreImages( tchom, cent ); + cent:= PreImagesNC( tchom, cent ); fi; Assert( 1, IsAbelian( cent ) ); SetIsAbelian( cent, true ); @@ -2012,7 +2012,7 @@ InstallGlobalFunction( CentralizerNormalCSPG, function(G,N) # handle case of transitive GG directly if Length(significant) = 1 then centrnorm := CentralizerNormalTransCSPG(GG,NN); - return PreImages(tchom,centrnorm); + return PreImagesNC(tchom,centrnorm); fi; # case of intransitive GG @@ -2054,7 +2054,7 @@ InstallGlobalFunction( CentralizerNormalCSPG, function(G,N) if n = len then return central; else - return PreImages(tchom,central); + return PreImagesNC(tchom,central); fi; end ); diff --git a/lib/liefam.gi b/lib/liefam.gi index 6122a753b0..ca6c3161c6 100644 --- a/lib/liefam.gi +++ b/lib/liefam.gi @@ -447,7 +447,7 @@ InstallMethod( ImagesElm, return [ LieObject( elm ) ]; end ); -InstallMethod( PreImagesElm, +InstallMethod( PreImagesElmNC, "for Lie embedding and Lie object in default representation", FamRangeEqFamElm, [ IsGeneralMapping and IsLieEmbeddingRep, diff --git a/lib/mapphomo.gi b/lib/mapphomo.gi index 3e396945ff..49e8666f05 100644 --- a/lib/mapphomo.gi +++ b/lib/mapphomo.gi @@ -330,9 +330,9 @@ InstallMethod( ImagesSet, ############################################################################# ## -#M PreImagesElm( , ) . for s.p. gen. mapping resp. mult. & inv. +#M PreImagesElmNC( , ) . for s.p. gen. mapping resp. mult. & inv. ## -InstallMethod( PreImagesElm, +InstallMethod( PreImagesElmNC, "method for s.p. general mapping respecting mult. & inv., and element", FamRangeEqFamElm, [ IsSPGeneralMapping and RespectsMultiplication and RespectsInverses, @@ -340,7 +340,7 @@ InstallMethod( PreImagesElm, function( map, elm ) local pre; - pre:= PreImagesRepresentative( map, elm ); + pre:= PreImagesRepresentativeNC( map, elm ); if pre = fail then return []; else @@ -351,9 +351,9 @@ InstallMethod( PreImagesElm, ############################################################################# ## -#M PreImagesSet( , ) . for s.p. gen. mapping resp. mult. & inv. +#M PreImagesSetNC( , ) for s.p. gen. mapping resp. mult. & inv. ## -InstallMethod( PreImagesSet, +InstallMethod( PreImagesSetNC, "method for s.p. general mapping respecting mult. & inv., and group", CollFamRangeEqFamElms, [ IsSPGeneralMapping and RespectsMultiplication and RespectsInverses, @@ -367,7 +367,7 @@ InstallMethod( PreImagesSet, fi; genpreimages:= List(genpreimages, - gen -> PreImagesRepresentative( map, gen ) ); + gen -> PreImagesRepresentativeNC( map, gen ) ); if fail in genpreimages then TryNextMethod(); fi; @@ -384,7 +384,7 @@ InstallMethod( PreImagesSet, return pre; end ); -InstallMethod( PreImagesSet, +InstallMethod( PreImagesSetNC, "method for injective s.p. mapping respecting mult. & inv., and group", CollFamRangeEqFamElms, [ IsSPGeneralMapping and IsMapping and IsInjective and @@ -395,7 +395,7 @@ InstallMethod( PreImagesSet, pre := SubgroupNC( Source( map ), List( GeneratorsOfMagmaWithInverses( elms ), - gen -> PreImagesRepresentative( map, gen ) ) ); + gen -> PreImagesRepresentativeNC( map, gen ) ) ); UseIsomorphismRelation( elms, pre ); return pre; end ); @@ -684,9 +684,9 @@ InstallMethod( ImagesSet, ############################################################################# ## -#M PreImagesElm( , ) for s.p. gen. mapping resp. add. & add.inv. +#M PreImagesElmNC( , ) for s.p. gen. mapping resp. add. & add.inv. ## -InstallMethod( PreImagesElm, +InstallMethod( PreImagesElmNC, "method for s.p. gen. mapping respecting add. & add.inv., and element", FamRangeEqFamElm, [ IsSPGeneralMapping and RespectsAddition and RespectsAdditiveInverses, @@ -694,7 +694,7 @@ InstallMethod( PreImagesElm, function( map, elm ) local pre; - pre:= PreImagesRepresentative( map, elm ); + pre:= PreImagesRepresentativeNC( map, elm ); if pre = fail then return []; else @@ -705,9 +705,9 @@ InstallMethod( PreImagesElm, ############################################################################# ## -#M PreImagesSet( , ) for s.p. gen. mapping resp. add. & add.inv. +#M PreImagesSetNC( , ) for s.p. gen. mapping resp. add. & add.inv. ## -InstallMethod( PreImagesSet, +InstallMethod( PreImagesSetNC, "method for s.p. gen. mapping resp. add. & add.inv., and add. group", CollFamRangeEqFamElms, [ IsSPGeneralMapping and RespectsAddition and RespectsAdditiveInverses, @@ -715,7 +715,7 @@ InstallMethod( PreImagesSet, function( map, elms ) local genpreimages; genpreimages:= List( GeneratorsOfAdditiveGroup( elms ), - gen -> PreImagesRepresentative( map, gen ) ); + gen -> PreImagesRepresentativeNC( map, gen ) ); if fail in genpreimages then TryNextMethod(); fi; @@ -890,9 +890,9 @@ InstallMethod( ImagesSet, ############################################################################# ## -#M PreImagesSet( , ) . . . . for linear mapping and left module +#M PreImagesSetNC( , ) . . . for linear mapping and left module ## -InstallMethod( PreImagesSet, +InstallMethod( PreImagesSetNC, "method for linear mapping and left module", CollFamRangeEqFamElms, [ IsSPGeneralMapping and RespectsAddition and RespectsAdditiveInverses @@ -901,7 +901,7 @@ InstallMethod( PreImagesSet, function( map, elms ) local genpreimages; genpreimages:= List( GeneratorsOfLeftModule( elms ), - gen -> PreImagesRepresentative( map, gen ) ); + gen -> PreImagesRepresentativeNC( map, gen ) ); if fail in genpreimages then TryNextMethod(); fi; @@ -984,9 +984,9 @@ InstallMethod( ImagesSet, ############################################################################# ## -#M PreImagesSet( , ) . . . . . . . . for algebra hom. and FLMLOR +#M PreImagesSetNC( , ) . . . . . . . for algebra hom. and FLMLOR ## -InstallMethod( PreImagesSet, +InstallMethod( PreImagesSetNC, "method for algebra hom. and FLMLOR", CollFamRangeEqFamElms, [ IsSPGeneralMapping and RespectsAddition and RespectsAdditiveInverses @@ -995,7 +995,7 @@ InstallMethod( PreImagesSet, function( map, elms ) local genpreimages; genpreimages:= List( GeneratorsOfLeftOperatorRing( elms ), - gen -> PreImagesRepresentative( map, gen ) ); + gen -> PreImagesRepresentativeNC( map, gen ) ); if fail in genpreimages then TryNextMethod(); fi; @@ -1010,9 +1010,9 @@ InstallMethod( PreImagesSet, ############################################################################# ## -#M PreImagesSet( , ) for alg.-with-one hom. and FLMLOR-with-one +#M PreImagesSetNC( , ) for alg.-with-one hom. and FLMLOR-with-one ## -InstallMethod( PreImagesSet, +InstallMethod( PreImagesSetNC, "method for algebra-with-one hom. and FLMLOR-with-one", CollFamRangeEqFamElms, [ IsSPGeneralMapping and RespectsAddition and RespectsAdditiveInverses @@ -1022,7 +1022,7 @@ InstallMethod( PreImagesSet, function( map, elms ) local genpreimages; genpreimages:= List( GeneratorsOfLeftOperatorRingWithOne( elms ), - gen -> PreImagesRepresentative( map, gen ) ); + gen -> PreImagesRepresentativeNC( map, gen ) ); if fail in genpreimages then TryNextMethod(); fi; diff --git a/lib/mapping.gd b/lib/mapping.gd index 12d2ff39dc..12fa690506 100644 --- a/lib/mapping.gd +++ b/lib/mapping.gd @@ -751,7 +751,7 @@ DeclareAttribute( "ImagesSource", IsGeneralMapping ); ## ## is the set of preimages of the range of the general mapping map. ##

-## delegates to , +## delegates to , ## it is introduced only to store the preimage of map as attribute ## value. ## @@ -968,23 +968,42 @@ DeclareGlobalFunction( "Images" ); ############################################################################# ## -#O PreImagesElm( , ) . all preimages of elm under a gen. mapping +#O PreImagesElm( , ) . . . . . . . . . . . . all preimages of elm +#O PreImagesElmNC( , ) . . . . . . . . . . . under a gen. mapping ## ## <#GAPDoc Label="PreImagesElm"> ## ## +## ## ## ## If elm is an element of the range of the general mapping -## map then returns the set of all +## map then returns the set of all ## preimages of elm under map. ##

## Anything may happen if elm is not an element of the range of ## map. +##

+## In order to improve this state of affairs, +## PreImagesElm has been renamed PreImagesElmNC +## throughout the library, and +## PreImagesElm has been declared a synonym for PreImagesElmNC. +##

+## In future versions of &GAP; PreImagesElm +## will perform additional checks and reject invalid inputs. +## These additional checks will slow the computation so, +## when the inputs are known to be valid by construction, +## users are recommended to use PreImagesElmNC. +##

+## Package authors are asked to convert their methods for +## PreImagesElm to methods for PreImagesElmNC. +## Only when this has happened will the additional checks be implemented. ## ## ## <#/GAPDoc> ## +DeclareOperation( "PreImagesElmNC", [ IsGeneralMapping, IsObject ] ); +## DeclareSynonym( "PreImagesElm", PreImagesElmNC ); DeclareOperation( "PreImagesElm", [ IsGeneralMapping, IsObject ] ); @@ -1014,49 +1033,88 @@ DeclareOperation( "PreImageElm", ############################################################################# ## -#O PreImagesRepresentative( , ) . . . one preimage of an element -## under a gen. mapping +#O PreImagesRepresentative( , ) . . . one preimage of an element +#O PreImagesRepresentativeNC( , ) . . . under a general mapping ## ## <#GAPDoc Label="PreImagesRepresentative"> ## ## +## ## ## ## If elm is an element of the range of the general mapping -## map then returns either a -## representative of the set of preimages of elm under map or -## fail, the latter if and only if elm -## has no preimages under map. +## map then these operations return either a representative +## of the set of preimages of elm under map or fail, +## the latter if and only if elm has no preimages under map. ##

## Anything may happen if elm is not an element of the range of ## map. +##

+## In order to improve this state of affairs, +## PreImagesRepresentative has been renamed +## PreImagesRepresentativeNC throughout the library, +## and PreImagesRepresentative has been declared a synonym for +## PreImagesRepresentativeNC. +##

+## In future versions of &GAP; PreImagesRepresentative +## will perform additional checks and reject invalid inputs. +## These additional checks will slow the computation so, +## when the inputs are known to be valid by construction, +## users are recommended to use PreImagesRepresentativeNC. +##

+## Package authors are asked to convert their methods for +## PreImagesRepresentative to methods for +## PreImagesRepresentativeNC. +## Only when this has happened will the additional checks be implemented. ## ## ## <#/GAPDoc> ## + +DeclareOperation( "PreImagesRepresentativeNC", + [ IsGeneralMapping, IsObject ] ); +## DeclareSynonym( "PreImagesRepresentative", PreImagesRepresentativeNC ); DeclareOperation( "PreImagesRepresentative", [ IsGeneralMapping, IsObject ] ); - ############################################################################# ## #O PreImagesSet( , ) +#O PreImagesSetNC( , ) ## ## <#GAPDoc Label="PreImagesSet"> ## ## +## ## ## ## If elms is a subset of the range of the general mapping map -## then returns the set of all preimages of +## then returns the set of all preimages of ## elms under map. ##

## Anything may happen if elms is not a subset of the range of ## map. +##

+## In order to improve this state of affairs, +## PreImagesSet has been renamed PreImagesSetNC +## throughout the library, and +## PreImagesSet has been declared a synonym for PreImagesSetNC. +##

+## In future versions of &GAP; PreImagesSet +## will perform additional checks and reject invalid inputs. +## These additional checks will slow the computation so, +## when the inputs are known to be valid by construction, +## users are recommended to use PreImagesSetNC. +##

+## Package authors are asked to convert their methods for +## PreImagesSet to methods for PreImagesSetNC. +## Only when this has happened will the additional checks be implemented. ## ## ## <#/GAPDoc> ## +DeclareOperation( "PreImagesSetNC", [ IsGeneralMapping, IsListOrCollection ] ); +## DeclareSynonym( "PreImagesSet", PreImagesSetNC ); DeclareOperation( "PreImagesSet", [ IsGeneralMapping, IsListOrCollection ] ); @@ -1101,10 +1159,10 @@ DeclareOperation( "PreImagesSet", [ IsGeneralMapping, IsListOrCollection ] ); ## (If coll and the result are lists then the positions of ## entries do in general not correspond.) ##

-## -## delegates to when -## called with one argument, -## and to resp. when +## +## delegates to when called with one argument, +## and to resp. when ## called with two arguments. ##

## If the second argument is not an element or a subset of the range of @@ -1118,31 +1176,40 @@ DeclareGlobalFunction( "PreImage" ); ############################################################################# ## -#F PreImages( ) . . . set of preimages of the range of a gen. mapping -#F PreImages(,) . set of preimages of an elm under a gen. mapping -#F PreImages(,) set of preimages of a coll. under a gen. mapping +#F PreImages() +#F PreImagesNC() . . . set of preimages of the range of a gen. mapping +#F PreImages(,) +#F PreImagesNC(,) set of preimages of an elm under a gen. mapping +#F PreImages(,) +#F PreImagesNC(,) set of preimages of a coll. under a gen. mapping ## ## <#GAPDoc Label="PreImages"> ## ## PreImages ## +## ## +## ## +## ## ## -## PreImages( map ) is the preimage of the general mapping +## PreImages[NC]( map ) is the preimage of the general mapping ## map, i.e., the subset of elements of the source of map -## that have actually values under map. +## that actually have values under map. ##

-## PreImages( map, elm ) is the set of preimages of the -## element elm of the range of the general mapping map under +## PreImages[NC]( map, elm ) is the set of preimages of +## the element elm of the range of the general mapping map under ## map, i.e., the set of elements of the source which map maps ## to elm. ##

-## PreImages( map, coll ) is the set of images of the +## PreImages[NC]( map, coll ) is the set of images of the ## subset coll of the range of the general mapping map under ## map, i.e., the subset of the source which map maps to ## elements of coll. @@ -1151,18 +1218,36 @@ DeclareGlobalFunction( "PreImage" ); ## (If coll and the result are lists then the positions of ## entries do in general not correspond.) ##

-## +## ## delegates to when ## called with one argument, ## and to resp. when ## called with two arguments. +## The corresponding PreImagesNC delegates to PreImagesRange +## and PreImagesSetNC. ##

## If the second argument is not an element or a subset of the range of -## the first argument, an error is signalled. +## the first argument, incorrect results may be returned. +## In order to improve this state of affairs, +## PreImages has been renamed PreImagesNC throughout the library, +## and PreImages has been declared a synonym for PreImagesNC. +##

+## In future versions of &GAP; PreImages +## will perform additional checks and reject invalid inputs. +## These additional checks will slow the computation so, +## when the inputs are known to be valid by construction, +## users are recommended to use PreImagesNC. +##

+## Package authors are asked to convert their methods for +## PreImages to methods for PreImagesNC. +## Only when this has happened will the additional checks be implemented. ## ## ## <#/GAPDoc> ## +DeclareGlobalFunction( "PreImagesNC" ); +## DeclareSynonym( "PreImages", PreImagesNC ); DeclareGlobalFunction( "PreImages" ); diff --git a/lib/mapping.gi b/lib/mapping.gi index 7ae902e971..75ef3daf93 100644 --- a/lib/mapping.gi +++ b/lib/mapping.gi @@ -273,9 +273,9 @@ InstallGlobalFunction( PreImage, function ( arg ) fi; if IsDomain( img ) or IsSSortedList( img ) then - return PreImagesSet( map, img ); + return PreImagesSetNC( map, img ); elif IsHomogeneousList( img ) then - return PreImagesSet( map, Set( img ) ); + return PreImagesSetNC( map, Set( img ) ); fi; # preimage of the empty list @@ -297,10 +297,68 @@ end ); ############################################################################# ## -#F PreImages( ) . . . set of preimages of the range of a gen. mapping -#F PreImages(,) . set of preimages of an elm under a gen. mapping -#F PreImages(,) set of preimages of a coll. under a gen. mapping +#F PreImages() +#F PreImagesNC() . . . set of preimages of the range of a gen. mapping +#F PreImages(,) +#F PreImagesNC(,) set of preimages of an elm under a gen. mapping +#F PreImages(,) +#F PreImagesNC(,) set of preimages of a coll. under a gen. mapping ## +InstallGlobalFunction( PreImagesNC, function ( arg ) + + local map, # mapping , first argument + img; # element , second argument + + # preimage of the range under + if Length( arg ) = 1 then + + return PreImagesRange( arg[1] ); + + elif Length( arg ) = 2 then + + map := arg[1]; + img := arg[2]; + + if not IsGeneralMapping( map ) then + ErrorNoReturn( " must be a general mapping" ); + fi; + + # preimage of a single element under + if FamRangeEqFamElm( FamilyObj( map ), FamilyObj( img ) ) then + if not img in Range( map ) then + ErrorNoReturn( " must be an element of Range()" ); + fi; + return PreImagesElmNC( map, img ); + + # preimage of a collection of elements under + elif CollFamRangeEqFamElms( FamilyObj( map ), FamilyObj( img ) ) then + if not IsSubset( Range( map ), img ) then + ErrorNoReturn( "the collection must be contained in ", + "Range()" ); + fi; + + if IsDomain( img ) or IsSSortedList( img ) then + return PreImagesSetNC( map, img ); + elif IsHomogeneousList( img ) then + return PreImagesSetNC( map, Set( img ) ); + fi; + + # preimage of the empty list + elif IsList( img ) and IsEmpty( img ) then + + return []; + + else + ErrorNoReturn( "the families of the element or collection ", + "and Range() don't match, ", + "maybe is not contained in Range() or ", + "is not a homogeneous list or collection" ); + fi; + fi; + ErrorNoReturn( "usage: PreImagesNC(), PreImagesNC(,), ", + "PreImagesNC(,)" ); +end ); + InstallGlobalFunction( PreImages, function ( arg ) local map, # mapping , first argument @@ -356,7 +414,6 @@ InstallGlobalFunction( PreImages, function ( arg ) "PreImages(,)" ); end ); - ############################################################################# ## #F CompositionMapping(,, ... ) . . . . . composition of mappings @@ -1067,16 +1124,17 @@ InstallMethod( PreImageElm, "for inj. & surj. general mapping, and element", FamRangeEqFamElm, [ IsGeneralMapping and IsInjective and IsSurjective, IsObject ], 0, - PreImagesRepresentative ); + PreImagesRepresentativeNC ); ############################################################################# ## +#M PreImagesElmNC( , ) . . . . . for general mapping and element #M PreImagesElm( , ) . . . . . . for general mapping and element ## ## more or less delegate to `ImagesElm' ## -InstallMethod( PreImagesElm, +InstallMethod( PreImagesElmNC, "for general mapping with finite source, and element", FamRangeEqFamElm, [ IsGeneralMapping, IsObject ], 0, @@ -1093,12 +1151,26 @@ InstallMethod( PreImagesElm, fi; end ); +InstallMethod( PreImagesElm, + "for general mapping with finite source, and element", + FamRangeEqFamElm, + [ IsGeneralMapping, IsObject ], 0, + function ( map, elm ) + + if not ( elm in Image( map ) ) then + return fail; + else + return PreImagesElmNC( map, elm ); + fi; + end ); + ############################################################################# ## -#M PreImagesElm( , ) for const. time access gen. map., and elm. +#M PreImagesElmNC( , ) for const. time access gen. map., and elm. +#M PreImagesElm( , ) . for const. time access gen. map., and elm. ## -InstallMethod( PreImagesElm, +InstallMethod( PreImagesElmNC, "for constant time access general mapping, and element", FamRangeEqFamElm, [ IsGeneralMapping and IsConstantTimeAccessGeneralMapping, IsObject ], 0, @@ -1113,25 +1185,60 @@ InstallMethod( PreImagesElm, return preimgs; end ); +InstallMethod( PreImagesElm, + "for constant time access general mapping, and element", + FamRangeEqFamElm, + [ IsGeneralMapping and IsConstantTimeAccessGeneralMapping, IsObject ], 0, + function( map, elm ) + if not ( elm in Image( map ) ) then + return fail; + else + return PreImagesElmNC( map, elm ); + fi; + end ); + ############################################################################# ## -#M PreImagesSet( , ) . for general mapping and finite collection +#M PreImagesSetNC( , ) for general mapping and finite collection ## -InstallMethod( PreImagesSet, +InstallMethod( PreImagesSetNC, "for general mapping, and finite collection", CollFamRangeEqFamElms, [ IsGeneralMapping, IsCollection ], 0, function( map, elms ) local primgs, elm; + primgs:= []; + for elm in Enumerator( elms ) do + UniteSet( primgs, AsList( PreImagesElmNC( map, elm ) ) ); + od; + return primgs; + end ); + +InstallMethod( PreImagesSet, + "for general mapping, and finite collection", + CollFamRangeEqFamElms, + [ IsGeneralMapping, IsCollection ], 0, + function( map, elms ) + local im, elm; if not IsFinite( elms ) then TryNextMethod(); fi; - primgs:= []; + im:= Image( map ); for elm in Enumerator( elms ) do - UniteSet( primgs, AsList( PreImagesElm( map, elm ) ) ); + if not (elm in im ) then + return fail; + fi; od; - return primgs; + return PreImagesSetNC( map, elms ); + end ); + +InstallMethod( PreImagesSetNC, + "for general mapping, and empty list", + true, + [ IsGeneralMapping, IsList and IsEmpty ], 0, + function( map, elms ) + return []; end ); InstallMethod( PreImagesSet, @@ -1139,7 +1246,7 @@ InstallMethod( PreImagesSet, true, [ IsGeneralMapping, IsList and IsEmpty ], 0, function( map, elms ) - return []; + return []; end ); @@ -1151,7 +1258,7 @@ InstallMethod( PreImagesRange, "for general mapping", true, [ IsGeneralMapping ], 0, - map -> PreImagesSet( map, Range( map ) ) ); + map -> PreImagesSetNC( map, Range( map ) ) ); ############################################################################# @@ -1168,9 +1275,21 @@ InstallMethod( PreImagesRange, ############################################################################# ## -#M PreImagesRepresentative( , ) . . for s.p. gen. mapping & elm +#M PreImagesRepresentative( , ) . . . for s.p. gen. mapping & elm +#M PreImagesRepresentativeNC( , ) . . for s.p. gen. mapping & elm ## InstallMethod( PreImagesRepresentative, + "for s.p. general mapping, and element", + FamRangeEqFamElm, + [ IsSPGeneralMapping, IsObject ], 0, + function( map, elm ) + if not elm in Image( map ) then + return fail; + fi; + return PreImagesRepresentativeNC( map, elm ); + end ); + +InstallMethod( PreImagesRepresentativeNC, "for s.p. general mapping, and element", FamRangeEqFamElm, [ IsSPGeneralMapping, IsObject ], 0, @@ -1182,16 +1301,28 @@ InstallMethod( PreImagesRepresentative, ############################################################################# ## #M PreImagesRepresentative( , ) -## +#M PreImagesRepresentativeNC( , ) + InstallMethod( PreImagesRepresentative, "for total non-s.p. general mapping, and element", FamRangeEqFamElm, [ IsNonSPGeneralMapping, IsObject ], 0, - function ( map, elm ) + function( map, elm ) + if not elm in Image( map ) then + return fail; + fi; + return PreImagesRepresentativeNC( map, elm ); + end ); + +InstallMethod( PreImagesRepresentativeNC, + "for total non-s.p. general mapping, and element", + FamRangeEqFamElm, + [ IsNonSPGeneralMapping, IsObject ], 0, + function( map, elm ) local pres; # all preimages of under # get all preimages of under - pres := PreImagesElm( map, elm ); + pres := PreImagesElmNC( map, elm ); # check that has at least one preimage under if IsEmpty( pres ) then @@ -1459,7 +1590,7 @@ InstallMethod( Enumerator, return enum; elif IsFinite( R ) then for elm in Enumerator( R ) do - imgs:= PreImagesElm( map, elm ); + imgs:= PreImagesElmNC( map, elm ); if IsFinite( imgs ) then UniteSet( enum, List( imgs, im -> DirectProductElement( [ im, elm ] ) ) ); else diff --git a/lib/mapprep.gi b/lib/mapprep.gi index 96bf008e8b..b118d11ff7 100644 --- a/lib/mapprep.gi +++ b/lib/mapprep.gi @@ -302,17 +302,17 @@ InstallMethod( ImagesRepresentative, ############################################################################# ## -#M PreImagesElm( , ) . . . . . . . . . . for composition mapping +#M PreImagesElmNC( , ) . . . . . . . . . for composition mapping ## -InstallMethod( PreImagesElm, +InstallMethod( PreImagesElmNC, "for a composition mapping, and an element", FamRangeEqFamElm, [ IsCompositionMappingRep, IsObject ], 0, function( com, elm ) local im; - im:= PreImagesElm( com!.map2, elm ); + im:= PreImagesElmNC( com!.map2, elm ); if not IsEmpty( im ) then - return PreImagesSet( com!.map1, im ); + return PreImagesSetNC( com!.map1, im ); else return []; fi; @@ -321,17 +321,17 @@ InstallMethod( PreImagesElm, ############################################################################# ## -#M PreImagesSet( , ) . . . . . . . . . . for composition mapping +#M PreImagesSetNC( , ) . . . . . . . . . for composition mapping ## -InstallMethod( PreImagesSet, +InstallMethod( PreImagesSetNC, "for a composition mapping, and a collection", CollFamRangeEqFamElms, [ IsCompositionMappingRep, IsCollection ], 0, function( com, elms ) local im; - im:= PreImagesSet( com!.map2, elms ); + im:= PreImagesSetNC( com!.map2, elms ); if not IsEmpty( im ) then - return PreImagesSet( com!.map1, im ); + return PreImagesSetNC( com!.map1, im ); else return []; fi; @@ -340,27 +340,27 @@ InstallMethod( PreImagesSet, ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . for composition mapping +#M PreImagesRepresentativeNC( , ) . . . . for composition mapping ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for a composition mapping, and an element", FamRangeEqFamElm, [ IsCompositionMappingRep, IsObject ], 0, function( com, elm ) local im, rep; - im:= PreImagesRepresentative( com!.map2, elm ); + im:= PreImagesRepresentativeNC( com!.map2, elm ); if im = fail then # 'elm' has no preimages under 'com!.map2', so it has none under 'com'. return fail; else - im:= PreImagesRepresentative( com!.map1, im ); + im:= PreImagesRepresentativeNC( com!.map1, im ); if im <> fail then return im; fi; # It may happen that only the chosen representative has no preimages. - for im in Enumerator( PreImagesElm( com!.map2, elm ) ) do - rep:= PreImagesRepresentative( com!.map1, im ); + for im in Enumerator( PreImagesElmNC( com!.map2, elm ) ) do + rep:= PreImagesRepresentativeNC( com!.map1, im ); if rep <> fail then return rep; fi; @@ -383,7 +383,7 @@ InstallMethod( KernelOfAdditiveGeneralMapping, if IsInjective( com!.map2 ) then return KernelOfAdditiveGeneralMapping( com!.map1 ); else - return PreImagesSet( com!.map1, + return PreImagesSetNC( com!.map1, KernelOfAdditiveGeneralMapping( com!.map2 ) ); fi; end ); @@ -421,7 +421,7 @@ InstallMethod( KernelOfMultiplicativeGeneralMapping, if IsInjective( com!.map2 ) then return KernelOfMultiplicativeGeneralMapping( com!.map1 ); else - return PreImagesSet( com!.map1, + return PreImagesSetNC( com!.map1, KernelOfMultiplicativeGeneralMapping( com!.map2 ) ); fi; end ); @@ -629,9 +629,9 @@ end ); ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . for mapping by function +#M PreImagesRepresentativeNC( , ) . . . . for mapping by function ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for mapping by function", FamRangeEqFamElm, [ IsMappingByFunctionRep, IsObject ], 0, @@ -659,9 +659,9 @@ InstallMethod( PreImageElm, ############################################################################# ## -#M PreImagesElm( , ) . . . . . . . . . . for mapping by function +#M PreImagesElmNC( , ) . . . . . . . . . for mapping by function ## -InstallMethod( PreImagesElm, +InstallMethod( PreImagesElmNC, "for mapping by function", FamRangeEqFamElm, [ IsMappingByFunctionWithInverseRep, IsObject ], 0, @@ -671,9 +671,9 @@ InstallMethod( PreImagesElm, ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . for mapping by function +#M PreImagesRepresentativeNC( , ) . . . . for mapping by function ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for mapping by function with inverse", FamRangeEqFamElm, [ IsMappingByFunctionWithInverseRep, IsObject ], 0, @@ -1008,7 +1008,7 @@ InstallMethod( ImagesElm, FamSourceEqFamElm, [ IsGeneralMapping and IsInverseGeneralMappingRep, IsObject ], 0, function ( inv, elm ) - return PreImagesElm( InverseGeneralMapping( inv ), elm ); + return PreImagesElmNC( InverseGeneralMapping( inv ), elm ); end ); @@ -1021,7 +1021,7 @@ InstallMethod( ImagesSet, CollFamSourceEqFamElms, [ IsGeneralMapping and IsInverseGeneralMappingRep, IsCollection ], 0, function ( inv, elms ) - return PreImagesSet( InverseGeneralMapping( inv ), elms ); + return PreImagesSetNC( InverseGeneralMapping( inv ), elms ); end ); @@ -1034,7 +1034,7 @@ InstallMethod( ImagesRepresentative, FamSourceEqFamElm, [ IsGeneralMapping and IsInverseGeneralMappingRep, IsObject ], 0, function ( inv, elm ) - return PreImagesRepresentative( InverseGeneralMapping( inv ), elm ); + return PreImagesRepresentativeNC( InverseGeneralMapping( inv ), elm ); end ); @@ -1054,9 +1054,9 @@ InstallMethod( PreImageElm, ############################################################################# ## -#M PreImagesElm( , ) . . . . . for inverse mapping and element +#M PreImagesElmNC( , ) . . . . for inverse mapping and element ## -InstallMethod( PreImagesElm, +InstallMethod( PreImagesElmNC, "for an inverse mapping and an element", FamRangeEqFamElm, [ IsGeneralMapping and IsInverseGeneralMappingRep, IsObject ], 0, @@ -1067,9 +1067,9 @@ InstallMethod( PreImagesElm, ############################################################################# ## -#M PreImagesSet( , ) . . for inverse mapping and collection +#M PreImagesSetNC( , ) . . for inverse mapping and collection ## -InstallMethod( PreImagesSet, +InstallMethod( PreImagesSetNC, "for an inverse mapping and a collection", CollFamRangeEqFamElms, [ IsGeneralMapping and IsInverseGeneralMappingRep, IsCollection ], 0, @@ -1080,9 +1080,9 @@ InstallMethod( PreImagesSet, ############################################################################# ## -#M PreImagesRepresentative( , ) . . for inv. mapping and elm. +#M PreImagesRepresentativeNC( , ) . for inv. mapping and elm. ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for an inverse mapping and an element", FamRangeEqFamElm, [ IsInverseGeneralMappingRep, IsObject ], 0, @@ -1293,9 +1293,9 @@ InstallMethod( PreImageElm, ############################################################################# ## -#M PreImagesElm( , ) . . . . for identity mapping and element +#M PreImagesElmNC( , ) . . . . for identity mapping and element ## -InstallMethod( PreImagesElm, +InstallMethod( PreImagesElmNC, "for identity mapping and object", FamRangeEqFamElm, [ IsGeneralMapping and IsOne, IsObject ], @@ -1307,9 +1307,9 @@ InstallMethod( PreImagesElm, ############################################################################# ## -#M PreImagesSet( , ) . . . for identity mapping and collection +#M PreImagesSetNC( , ) . . for identity mapping and collection ## -InstallMethod( PreImagesSet, +InstallMethod( PreImagesSetNC, "for identity mapping and collection", CollFamRangeEqFamElms, [ IsGeneralMapping and IsOne, IsCollection ], @@ -1321,9 +1321,9 @@ InstallMethod( PreImagesSet, ############################################################################# ## -#M PreImagesRepresentative( , ) +#M PreImagesRepresentativeNC( , ) ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for identity mapping and object", FamRangeEqFamElm, [ IsGeneralMapping and IsOne, IsObject ], @@ -1581,9 +1581,9 @@ InstallMethod( ImagesRepresentative, ############################################################################# ## -#M PreImagesElm( , ) . . . . . for zero mapping and element +#M PreImagesElmNC( , ) . . . . . for zero mapping and element ## -InstallMethod( PreImagesElm, +InstallMethod( PreImagesElmNC, "for zero mapping and object", FamRangeEqFamElm, [ IsGeneralMapping and IsZero, IsObject ], SUM_FLAGS, @@ -1598,9 +1598,9 @@ InstallMethod( PreImagesElm, ############################################################################# ## -#M PreImagesSet( , ) . . . . for zero mapping and collection +#M PreImagesSetNC( , ) . . . for zero mapping and collection ## -InstallMethod( PreImagesSet, +InstallMethod( PreImagesSetNC, "for zero mapping and collection", CollFamRangeEqFamElms, [ IsGeneralMapping and IsZero, IsCollection ], SUM_FLAGS, @@ -1615,9 +1615,9 @@ InstallMethod( PreImagesSet, ############################################################################# ## -#M PreImagesRepresentative( , ) +#M PreImagesRepresentativeNC( , ) ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for zero mapping and object", FamRangeEqFamElm, [ IsGeneralMapping and IsZero, IsObject ], SUM_FLAGS, @@ -1817,15 +1817,15 @@ end ); ############################################################################# ## -#M PreImagesElm( , ) . . . . . . . . . . for restricted mapping +#M PreImagesElmNC( , ) . . . . . . . . . for restricted mapping ## -InstallMethod( PreImagesElm, +InstallMethod( PreImagesElmNC, "for a restricted mapping, and an element", FamRangeEqFamElm, [ IsGeneralRestrictedMappingRep, IsObject ], 0, function( res, elm ) local preim; - preim:= PreImagesElm( res!.map, elm ); + preim:= PreImagesElmNC( res!.map, elm ); if not ( (HasIsInjective(res) and IsInjective(res)) or (HasIsInjective(res!.map) and IsInjective(res!.map)) ) then preim:=Intersection(Source(res),preim); @@ -1836,15 +1836,15 @@ end ); ############################################################################# ## -#M PreImagesSet( , ) . . . . . . . . . . for restricted mapping +#M PreImagesSetNC( , ) . . . . . . . . . for restricted mapping ## -InstallMethod( PreImagesSet, +InstallMethod( PreImagesSetNC, "for a restricted mapping, and a collection", CollFamRangeEqFamElms, [ IsGeneralRestrictedMappingRep, IsCollection ], 0, function( res, elms ) local preim; - preim:= PreImagesSet( res!.map, elms ); + preim:= PreImagesSetNC( res!.map, elms ); if not ( (HasIsInjective(res) and IsInjective(res)) or (HasIsInjective(res!.map) and IsInjective(res!.map)) ) then preim:=Intersection(Source(res),preim); @@ -1855,15 +1855,15 @@ InstallMethod( PreImagesSet, ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . for restricted mapping +#M PreImagesRepresentativeNC( , ) . . . . for restricted mapping ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for a restricted mapping, and an element", FamRangeEqFamElm, [ IsGeneralRestrictedMappingRep, IsObject ], 0, function( res, elm ) local preim; - preim:= PreImagesRepresentative( res!.map, elm ); + preim:= PreImagesRepresentativeNC( res!.map, elm ); if preim = fail then # 'elm' has no preimages under 'res!.map', so it has none under 'res'. return fail; @@ -1872,7 +1872,7 @@ InstallMethod( PreImagesRepresentative, elif HasIsInjective(res!.map) and IsInjective(res!.map) then return fail; # no other choice else - preim:= PreImages( res!.map, elm ); + preim:= PreImagesNC( res!.map, elm ); return First(preim,x->x in Source(res)); fi; end ); diff --git a/lib/maxsub.gi b/lib/maxsub.gi index e04c94eaa5..c4b01c0cda 100644 --- a/lib/maxsub.gi +++ b/lib/maxsub.gi @@ -182,7 +182,7 @@ BindGlobal("MaximalSubgroupClassesSol",function(G) sel:=Filtered([1..Length(mgi[2])],x->not IsOne(mgi[2][x])); if 4^Length(sel)>Size(Range(ff.factorhom)) then f:=SmallGeneratingSet(Image(ff.factorhom)); - mgi:=[List(f,x->PreImagesRepresentative(ff.factorhom,x)),f]; + mgi:=[List(f,x->PreImagesRepresentativeNC(ff.factorhom,x)),f]; sel:=[1..Length(mgi[1])]; fi; gensG:=mgi[1]{sel}; @@ -195,8 +195,8 @@ BindGlobal("MaximalSubgroupClassesSol",function(G) fam:=FamilyObj(One(Range(fphom))); # just in case the stored group generators differ... wordfpgens:=List(wordgens,x->ElementOfFpGroup(fam,x)); - wordpre:=List(wordfpgens,x->PreImagesRepresentative(ff.factorhom, - PreImagesRepresentative(fphom,x))); + wordpre:=List(wordfpgens,x->PreImagesRepresentativeNC(ff.factorhom, + PreImagesRepresentativeNC(fphom,x))); fphom:=ff.factorhom*fphom; # no assertion as this is not a proper homomorphism, but an inverse # multiplicative map @@ -513,7 +513,7 @@ local hom,embs,s,k,agens,ad,i,j,perm,dia,ggens,e,tgens,d,m,reco,emba,outs,id; m:=[]; d:=SubgroupNC(w,d); for i in e do - j:=PreImagesRepresentative(hom,i^-1); + j:=PreImagesRepresentativeNC(hom,i^-1); Info(InfoLattice,2,"Orders:",Order(i),",",Order(j)); j:=d^j; if donorm then @@ -633,9 +633,9 @@ local dom, o, t1, a1, t1d, proj, reps, ts, ta, tb, s1, i, fix, wnew, max, s, p1, # get the ts corresponding to points proj:=Projection(w); projG:=RestrictedMapping(proj,G); - reps:=List([1..n],i->PreImagesRepresentative(projG,RepresentativeAction(Image(projG),1,i))); + reps:=List([1..n],i->PreImagesRepresentativeNC(projG,RepresentativeAction(Image(projG),1,i))); reps[n+1]:= - PreImagesRepresentative(proj,RepresentativeAction(Image(proj),[1..n],[n+1..2*n],OnSets)); + PreImagesRepresentativeNC(proj,RepresentativeAction(Image(proj),[1..n],[n+1..2*n],OnSets)); for i in [2..n] do j:=reps[i]*reps[n+1]; reps[1^Image(proj,j)]:=j; @@ -665,8 +665,8 @@ local dom, o, t1, a1, t1d, proj, reps, ts, ta, tb, s1, i, fix, wnew, max, s, p1, en1:=Embedding(wnew,1); en2:=Embedding(wnew,2); emb:=List(GeneratorsOfGroup(s),i-> - Image(en1,PreImagesRepresentative(p1,RestrictedPerm(i,ts[1]))) - *Image(en2,PreImagesRepresentative(p2,RestrictedPerm(i,ts[f]))) ); + Image(en1,PreImagesRepresentativeNC(p1,RestrictedPerm(i,ts[1]))) + *Image(en2,PreImagesRepresentativeNC(p2,RestrictedPerm(i,ts[f]))) ); emb:=GroupHomomorphismByImages(s,wnew,GeneratorsOfGroup(s),emb); ma:=MaxesType3(wnew,Image(emb,s),a1,t1,2,false); for i in ma do @@ -699,7 +699,7 @@ local m, fact, fg, reps, ma, idx, nm, embs, proj, kproj, k, ag, agl, ug, # type 4c reps:=List([1..n], - i->PreImagesRepresentative(fact,RepresentativeAction(fg,1,i))); + i->PreImagesRepresentativeNC(fact,RepresentativeAction(fg,1,i))); # get the maximal subgroups of A, intersect with t to get the socle part diff --git a/lib/mgmring.gi b/lib/mgmring.gi index 077f27c153..f7a4688a36 100644 --- a/lib/mgmring.gi +++ b/lib/mgmring.gi @@ -1220,7 +1220,7 @@ InstallMethod( ImagesRepresentative, end ); -InstallMethod( PreImagesElm, +InstallMethod( PreImagesElmNC, "for embedding of ring into magma ring, and free magma ring element", FamRangeEqFamElm, [ IsEmbeddingRingMagmaRing, IsElementOfFreeMagmaRing ], @@ -1236,7 +1236,7 @@ InstallMethod( PreImagesElm, fi; end ); -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for embedding of ring into magma ring, and free magma ring element", FamRangeEqFamElm, [ IsEmbeddingRingMagmaRing, IsElementOfFreeMagmaRing ], @@ -1324,7 +1324,7 @@ InstallMethod( ImagesRepresentative, end ); -InstallMethod( PreImagesElm, +InstallMethod( PreImagesElmNC, "for embedding of magma into magma ring, and free magma ring element", FamRangeEqFamElm, [ IsEmbeddingMagmaMagmaRing, IsElementOfFreeMagmaRing ], @@ -1340,7 +1340,7 @@ InstallMethod( PreImagesElm, fi; end ); -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for embedding of magma into magma ring, and free magma ring element", FamRangeEqFamElm, [ IsEmbeddingMagmaMagmaRing, IsElementOfFreeMagmaRing ], diff --git a/lib/morpheus.gi b/lib/morpheus.gi index 0e92772399..8aba4da1d9 100644 --- a/lib/morpheus.gi +++ b/lib/morpheus.gi @@ -748,10 +748,10 @@ local hom, gens, c, ran, r, cen, img, u, orbs, function(perm) if perm in store[1] then return ConjugatorAutomorphismNC(g, - PreImagesRepresentative(img[2],perm)); + PreImagesRepresentativeNC(img[2],perm)); fi; return GroupHomomorphismByImagesNC(g,g,GeneratorsOfGroup(g), - List(store[2],i->PreImagesRepresentative(img[2],i^perm))); + List(store[2],i->PreImagesRepresentativeNC(img[2],i^perm))); end); if bestdegPreImagesRepresentative(store[3],i^perm))); + List(store[4],i->PreImagesRepresentativeNC(store[3],i^perm))); end); if bestdegPreImagesRepresentative(gens,i)); + i->PreImagesRepresentativeNC(gens,i)); Ggc:=List(gens,i->First(Gcl,j->ForAny(j,j->ForAny(j.classes,k->i in k)))); combi:=List(Ggc,i->Concatenation(List(i,i->i.classes))); bcl:=ShallowCopy(combi); @@ -2106,7 +2106,7 @@ local d,id,H,iso,aut,auts,i,all,hom,field,dim,P,diag,mats,gens,gal; fi; aut:=GroupGeneralMappingByImages(G,G,gens, List(gens, - x->PreImagesRepresentative(iso,Image(iso,x)^(1,2)))); + x->PreImagesRepresentativeNC(iso,Image(iso,x)^(1,2)))); auts:=[aut]; all:=true; fi; @@ -2167,7 +2167,7 @@ local d,id,H,iso,aut,auts,i,all,hom,field,dim,P,diag,mats,gens,gal; fi; auts:=Concatenation(auts, List(mats,s->GroupGeneralMappingByImages(G,G,gens,List(gens,x-> - Image(hom,PreImagesRepresentative(hom,x)^s))))); + Image(hom,PreImagesRepresentativeNC(hom,x)^s))))); else gal:=Group(()); # to force trivial @@ -2179,13 +2179,13 @@ local d,id,H,iso,aut,auts,i,all,hom,field,dim,P,diag,mats,gens,gal; List(MinimalGeneratingSet(gal), s->GroupGeneralMappingByImages(G,G,gens,List(gens,x-> Image(hom, - List(PreImagesRepresentative(hom,x),r->List(r,y->Image(s,y)))))))); + List(PreImagesRepresentativeNC(hom,x),r->List(r,y->Image(s,y)))))))); fi; # graph if id.series="L" and id.parameter[1]>2 then Add(auts, GroupGeneralMappingByImages(G,G,gens,List(gens,x-> - Image(hom,Inverse(TransposedMat(PreImagesRepresentative(hom,x))))))); +Image(hom,Inverse(TransposedMat(PreImagesRepresentativeNC(hom,x))))))); all:=true; elif id.series="L" and id.parameter[1]=2 then # note no graph @@ -2350,7 +2350,7 @@ InstallGlobalFunction(AutomorphismGroupFittingFree,function(g) thom:=i[j][2]; thom:=GroupHomomorphismByImagesNC(t,t,GeneratorsOfGroup(t), List(GeneratorsOfGroup(t), - j->Image(thom,PreImagesRepresentative(thom,j)^gen))); + j->Image(thom,PreImagesRepresentativeNC(thom,j)^gen))); thom:=Image(auph,thom); Add(genimgs,thom); od; @@ -2408,7 +2408,7 @@ InstallGlobalFunction(AutomorphismGroupFittingFree,function(g) for i in gens do au:=GroupHomomorphismByImages(g,g,GeneratorsOfGroup(g), List(GeneratorsOfGroup(g), - j->PreImagesRepresentative(emb,Image(emb,j)^i))); + j->PreImagesRepresentativeNC(emb,Image(emb,j)^i))); Add(a,au); od; au:=Group(a); @@ -2449,7 +2449,7 @@ InstallGlobalFunction(AutomorphismGroupFittingFree,function(g) bi:=[]; for i in newbas do s:=List(stbs[i], - x->Image(emb,Image(autom,PreImagesRepresentative(emb,x)))); + x->Image(emb,Image(autom,PreImagesRepresentativeNC(emb,x)))); s:=First(orb[orpo[i]],x->ForAll(s,j->x^j=x)); Add(bi,s); od; diff --git a/lib/norad.gi b/lib/norad.gi index 7457f035e8..6323d1070d 100644 --- a/lib/norad.gi +++ b/lib/norad.gi @@ -173,7 +173,7 @@ local d,orb,len,S,depths,rel,stb,img,pos,i,j,k,ii,po,rep,sg,sf,sfs,fr,first, if r<>fail then Add(good,r);fi; return r<>fail; end); - good:=List(good,x->PreImagesRepresentative(pacthom,x)); + good:=List(good,x->PreImagesRepresentativeNC(pacthom,x)); good:=Filtered(good,x->not IsOne(x[2])); @@ -418,7 +418,7 @@ local sus,ser,len,factorhom,uf,n,d,up,mran,nran,mpcgs,pcgs,pcisom,nf,ng,np,sub, glact:=ActionHomomorphism(glperm,lvecs, GeneratorsOfGroup(glperm), List(GeneratorsOfGroup(glperm), - x->PreImagesRepresentative(glhom,x)), + x->PreImagesRepresentativeNC(glhom,x)), OnLines,"surjective"); stb:=Image(glact); for clu in localclust do @@ -478,7 +478,7 @@ local sus,ser,len,factorhom,uf,n,d,up,mran,nran,mpcgs,pcgs,pcisom,nf,ng,np,sub, Info(InfoFitFree,1,"Radsize= ",Size(ufr)," index ",Index(uf,ufr)); uff:=SmallGeneratingSet(uf); - ufg:=List(uff,x->PreImagesRepresentative(sus.rest,x)); + ufg:=List(uff,x->PreImagesRepresentativeNC(sus.rest,x)); n:=Normalizer(Image(factorhom),uf); @@ -503,7 +503,7 @@ local sus,ser,len,factorhom,uf,n,d,up,mran,nran,mpcgs,pcgs,pcisom,nf,ng,np,sub, nf:=SmallGeneratingSet(n); fi; - ng:=List(nf,x->PreImagesRepresentative(factorhom,x)); + ng:=List(nf,x->PreImagesRepresentativeNC(factorhom,x)); np:=pcgs; up:=sus.pcgs; diff --git a/lib/onecohom.gi b/lib/onecohom.gi index c2b6d29723..9f9b131f60 100644 --- a/lib/onecohom.gi +++ b/lib/onecohom.gi @@ -128,7 +128,7 @@ local hom,fg,fpi,fpg,nt,fam; fpg:=FreeGeneratorsOfFpGroup(Range(hom)); ocr.factorpres:=[fpg,RelatorsOfFpGroup(Range(hom))]; ocr.generators:=List(GeneratorsOfGroup(Range(hom)), - i->PreImagesRepresentative(hom,i)); + i->PreImagesRepresentativeNC(hom,i)); else if (Index(ocr.group,nt)>Size(nt)^3 @@ -159,9 +159,9 @@ local hom,fg,fpi,fpg,nt,fam; fpg:=FreeGeneratorsOfFpGroup(Range(fpi)); ocr.factorpres:=[fpg,RelatorsOfFpGroup(Range(fpi)), List(GeneratorsOfGroup(Range(fpi)), - i->PreImagesRepresentative(fpi,i))]; + i->PreImagesRepresentativeNC(fpi,i))]; if not IsBound(ocr.generators) then - ocr.generators:=List(ocr.factorpres[3],i->PreImagesRepresentative(hom,i)); + ocr.generators:=List(ocr.factorpres[3],i->PreImagesRepresentativeNC(hom,i)); fi; @@ -191,7 +191,7 @@ local hom,fg,fpi,fpg,nt,fam; fpi:=IsomorphismFpGroupByChiefSeriesFactor(ocr.group,"f",nt); fam:=FamilyObj(One(Range(fpi))); fpg:=FreeGeneratorsOfFpGroup(Range(fpi)); - ocr.generators:=List(fpg,i->PreImagesRepresentative(fpi, + ocr.generators:=List(fpg,i->PreImagesRepresentativeNC(fpi, ElementOfFpGroup(fam,i))); ocr.factorpres:=[fpg,RelatorsOfFpGroup(Range(fpi)),ocr.generators]; fi; diff --git a/lib/oprt.gi b/lib/oprt.gi index 9710eac495..9b653e6529 100644 --- a/lib/oprt.gi +++ b/lib/oprt.gi @@ -2920,7 +2920,7 @@ local G, D, d, e, gens, acts, act, xset, hom, p, rep; rep := RepresentativeActionOp( ImagesSource( hom ), d, e, OnPoints ); if rep <> fail then - rep := PreImagesRepresentative( hom, rep ); + rep := PreImagesRepresentativeNC( hom, rep ); fi; return rep; elif IsBound( D ) then @@ -3374,9 +3374,9 @@ end ); ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . . . . . . build matrix +#M PreImagesRepresentativeNC( , ) . . . . . . . . . build matrix ## -InstallMethod( PreImagesRepresentative,"IsLinearActionHomomorphism", +InstallMethod( PreImagesRepresentativeNC,"IsLinearActionHomomorphism", FamRangeEqFamElm, [ IsLinearActionHomomorphism, IsPerm ], 0, function( hom, elm ) local V, G, Grep, xset,lab,f; @@ -3388,7 +3388,7 @@ function( hom, elm ) TryNextMethod(); fi; - # PreImagesRepresentative does not test membership + # PreImagesRepresentativeNC does not test membership #if not elm in Image( hom ) then return fail; fi; xset:=UnderlyingExternalSet(hom); V := HomeEnumerator(xset); @@ -3413,7 +3413,26 @@ end ); ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . . . . . . build matrix +#M PreImagesRepresentativeNC( , ) . . . . . . . . . build matrix +## +## The idea is as follows. +## We have an $F$-basis $(v_1, \ldots, v_n)$. +## The matrix $M \in GL(n, F)$ acts first by right multiplication, +## let $w_i = v_i M$. +## Due to the projective action, we know only the normed vectors $c_i w_i$, +## where $c_i \in F \setminus \{ 0 \}$. +## The data computed by 'LinearActionBasis' (if its result is not 'fail') +## provide a vector $v = \sum_i a_i v_i$ such that all $a_i \not= 0$, +## and we know the normed vector $c w$ where $w = v M$ and $c \in F$. +## +## We can compute the decomposition $c w = \sum_i b_i (c_i w_i)$, +## and get $\sum_i b_i (c_i w_i) = c v M = c \sum_i a_i w_i$, +## which means $c_i = c a_i/b_i$ for all $i$. +## Thus we can reconstruct the matrix $M$ up to the scalar factor $c$. +## +## In the cases that are supported, either $c$ is irrelevant because the +## matrix group contains all scalar matrices, or we know that the preimage +## has determinant $1$ and taking the root in question is unique. ## ## The idea is as follows. ## We have an $F$-basis $(v_1, \ldots, v_n)$. @@ -3450,7 +3469,7 @@ function( hom, elm ) TryNextMethod(); fi; - # PreImagesRepresentative does not test membership + # PreImagesRepresentativeNC does not test membership #if not elm in Image( hom ) then return fail; fi; xset:=UnderlyingExternalSet(hom); V := HomeEnumerator(xset); diff --git a/lib/oprtperm.gi b/lib/oprtperm.gi index 0678e7eafb..a1a1616b7c 100644 --- a/lib/oprtperm.gi +++ b/lib/oprtperm.gi @@ -964,7 +964,7 @@ InstallMethod( Earns, "G, ints, gens, perms, act", true, fi; gens := [ ]; for gen in GeneratorsOfGroup( Centre( P ) ) do - pre := PreImagesRepresentative( f, gen ); + pre := PreImagesRepresentativeNC( f, gen ); ord := Order( pre ); pa := 1; while ord mod p = 0 do ord := ord / p; diff --git a/lib/pcgsnice.gi b/lib/pcgsnice.gi index 0496a0c212..caa90d90ec 100644 --- a/lib/pcgsnice.gi +++ b/lib/pcgsnice.gi @@ -23,7 +23,7 @@ AttributeMethodByNiceMonomorphism( Pcgs, if npcgs = fail then return fail; fi; - pcgs := List( npcgs, gen -> PreImagesRepresentative( nice, gen ) ); + pcgs := List( npcgs, gen -> PreImagesRepresentativeNC( nice, gen ) ); pcgs := PcgsByPcSequenceNC( ElementsFamily( FamilyObj( G ) ), pcgs ); if HasIsPrimeOrdersPcgs( npcgs ) and IsPrimeOrdersPcgs( npcgs ) then SetIsPrimeOrdersPcgs( pcgs, true ); diff --git a/lib/permdeco.gi b/lib/permdeco.gi index f57059f634..e605798c0f 100644 --- a/lib/permdeco.gi +++ b/lib/permdeco.gi @@ -314,7 +314,7 @@ local tryrep,sel,selin,a,s,dom,iso,stabs,outs,map,i,j,p,found,seln, for i in GeneratorsOfGroup(G) do a:=One(d); for j in [1..Length(stabs)] do - a:=a*Image(Embedding(d,j),PreImagesRepresentative(outs[j],i)); + a:=a*Image(Embedding(d,j),PreImagesRepresentativeNC(outs[j],i)); od; Add(p,a); od; @@ -360,7 +360,7 @@ local G,H,tg,th,hom, tga, Gemb, C, outs, auts, ar, Hemb; i->GroupHomomorphismByImagesNC(tg,tg, GeneratorsOfGroup(tg), List(GeneratorsOfGroup(tg), - j->Image(hom,PreImagesRepresentative(hom,j)^i)))); + j->Image(hom,PreImagesRepresentativeNC(hom,j)^i)))); Gemb:=fail; if ForAll(tga,IsConjugatorAutomorphism) then @@ -442,7 +442,7 @@ local cs,i,k,u,o,norm,T,Thom,autos,ng,a,Qhom,Q,Ehom,genimages, autos:=List(ng,i->GroupHomomorphismByImagesNC(T,T, GeneratorsOfGroup(T), List(GeneratorsOfGroup(T), - j->Image(Thom,PreImagesRepresentative(Thom,j)^i)))); + j->Image(Thom,PreImagesRepresentativeNC(Thom,j)^i)))); a:=AutomorphismRepresentingGroup(T,autos); Thom:=GroupHomomorphismByImagesNC(norm,a[1],ng,a[3]); a:=a[1]; @@ -455,7 +455,7 @@ local cs,i,k,u,o,norm,T,Thom,autos,ng,a,Qhom,Q,Ehom,genimages, # define isomorphisms between the components reps:=List([1..n],i-> - PreImagesRepresentative(Qhom,RepresentativeAction(Q,1,i))); + PreImagesRepresentativeNC(Qhom,RepresentativeAction(Q,1,i))); genimages:=[]; for i in GeneratorsOfGroup(G) do @@ -539,7 +539,7 @@ local limit, r, pcgs, ser, ind, m, p, l, l2, good, i, j,nser,hom; ser:=InvariantElementaryAbelianSeries(p, List( GeneratorsOfGroup( G ), i -> GroupHomomorphismByImagesNC(p,p,GeneratorsOfGroup(p), List(GeneratorsOfGroup(p), - j->Image(m,PreImagesRepresentative(m,j)^i)))), + j->Image(m,PreImagesRepresentativeNC(m,j)^i)))), TrivialSubgroup(p),true); ser:=List(ser,i->PreImage(m,i)); else diff --git a/lib/relation.gi b/lib/relation.gi index e5208df4b7..4bdac46e50 100644 --- a/lib/relation.gi +++ b/lib/relation.gi @@ -71,7 +71,7 @@ ## ## I. Operations and methods for binary relations on points ## 1. ImagesElm (compatibility with GeneralMapping) -## 2. PreImagesElm (compatibility with GeneralMapping) +## 2. PreImagesElmNC (compatibility with GeneralMapping) ## 3. \=, \in, \< ## 4. \* for relations, transformations, and permutation ## 5. Set operations \+, \- (union, difference) @@ -92,7 +92,7 @@ ## 4. MeetEquivalenceRelations ## 5. \= ## 6. ImagesElm (compatibility with GeneralMapping) -## 7. PreImagesElm (compatibility with GeneralMapping) +## 7. PreImagesElmNC (compatibility with GeneralMapping) ## 8. PrintObj ## ## L. Constructors of equivalence classes @@ -104,7 +104,7 @@ ## 2. PrintObj, Enumerator ## 3. \< ## 4. ImagesRepresentative -## 6. PreImagesRepresentative +## 6. PreImagesRepresentativeNC ## ############################################################################ ############################################################################ @@ -250,7 +250,7 @@ InstallMethod(IsSymmetricBinaryRelation, List(Enumerator(UnderlyingRelation(m)),x->[x[1],x[2]]))); for e in el do - if not PreImages(m,e)=Images(m,e) then + if not PreImagesNC(m,e)=Images(m,e) then return false; fi; od; @@ -312,7 +312,7 @@ InstallMethod(IsAntisymmetricBinaryRelation, List(Enumerator(UnderlyingRelation(rel)),x->[x[1],x[2]]))); for e in el do - i := IntersectionSet(PreImages(rel,e),Images(rel,e)); + i := IntersectionSet(PreImagesNC(rel,e),Images(rel,e)); if not IsEmpty(i) and not i=[e] then return false; fi; @@ -376,7 +376,7 @@ function(rel) for a in Source(rel) do for b in Source(rel) do # intersecting downsets - intersection := Intersection(PreImages(rel,b),PreImages(rel,a)); + intersection := Intersection(PreImagesNC(rel,b),PreImagesNC(rel,a)); # new relation on the intersection induced by the original relation nrel := PartialOrderByOrderingFunction( Domain(intersection), @@ -607,11 +607,11 @@ InstallMethod(HasseDiagramBinaryRelation, HDBRMinElts := function(list, rel) ## x minimal if - ## {y in list | y<>x and y in PreImagesElm( rel,x)} is empty + ## {y in list | y<>x and y in PreImagesElmNC( rel,x)} is empty ## return Filtered(list, x->IsEmpty(Filtered(list, y-> (y <> x) and - (y in PreImagesElm(rel,x))))); + (y in PreImagesElmNC(rel,x))))); end; ## return the elements which cover x in rel @@ -983,11 +983,11 @@ InstallMethod(ImagesElm, ############################################################################# ## -#M PreImagesElm( , ) +#M PreImagesElmNC( , ) ## ## For binary relations over [1..n] represented as a list of images ## -InstallMethod(PreImagesElm, +InstallMethod(PreImagesElmNC, "for binary rels over [1..n] with images list", true, [IsBinaryRelation and IsBinaryRelationOnPointsRep, IsPosInt], 0, function( rel, n ) @@ -1781,9 +1781,9 @@ InstallMethod( ImagesRepresentative, "equivalence relations", ############################################################################# ## -#M PreImagesRepresentative( , ) . . . for equivalence relations +#M PreImagesRepresentativeNC( , ) . . for equivalence relations ## -InstallMethod( PreImagesRepresentative, "equivalence relations", +InstallMethod( PreImagesRepresentativeNC, "equivalence relations", FamRangeEqFamElm, [IsEquivalenceRelation, IsObject], 0, function( map, elm ) return elm; @@ -1813,9 +1813,9 @@ InstallMethod( ImagesElm, ############################################################################# ## -#M PreImagesElm( , ) for equivalence relations with partition +#M PreImagesElmNC( , ) for equivalence relations with partition ## -InstallMethod( PreImagesElm, +InstallMethod( PreImagesElmNC, "equivalence relations with partition and element", FamRangeEqFamElm, [IsEquivalenceRelation and HasEquivalenceRelationPartition, diff --git a/lib/ringhom.gi b/lib/ringhom.gi index 21791f48a8..2dc8ab4bb7 100644 --- a/lib/ringhom.gi +++ b/lib/ringhom.gi @@ -444,9 +444,9 @@ end ); ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . . for ring g.m.b.i. +#M PreImagesRepresentativeNC( , ) . . . . . . for ring g.m.b.i. ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for ring g.m.b.i., and element", FamRangeEqFamElm, [ IsRingGeneralMapping and IsRingGeneralMappingByImagesDefaultRep, diff --git a/lib/schur.gi b/lib/schur.gi index f53b66dbdd..f06590728d 100644 --- a/lib/schur.gi +++ b/lib/schur.gi @@ -130,7 +130,7 @@ InstallMethod(EpimorphismSchurCover,"generic, via fp group",true,[IsGroup],1, j->One(F))))); hom:=GroupHomomorphismByImagesNC(D,G,GeneratorsOfGroup(D), - List(Dgens,i->PreImagesRepresentative(iso,i))); + List(Dgens,i->PreImagesRepresentativeNC(iso,i))); Dgens:=TzImagesOldGens(p); Dgens:=List(Dgens{[Length(Fgens)+1..Length(Dgens)]}, i->MappedWord(i,p!.generators,GeneratorsOfGroup(D))); @@ -201,7 +201,7 @@ local s,pcgs,n,l,cov,pco,ng,gens,imgs,ran,zer,i,j,e,a, fi; # get a decent pcgs for the cover - pco:=List(pcgs,i->Image(epi,PreImagesRepresentative(de,i))); + pco:=List(pcgs,i->Image(epi,PreImagesRepresentativeNC(de,i))); Append(pco,Pcgs(mul)); pco:=PcgsByPcSequenceNC(FamilyObj(One(cov)),pco); @@ -261,7 +261,8 @@ local s,pcgs,n,l,cov,pco,ng,gens,imgs,ran,zer,i,j,e,a, # factor generators gens:=GeneratorsOfGroup(qs); # their conjugates - imgs:=List(gens,j->PreImagesRepresentative(epi,Image(epi,j)^dc[i])); + imgs:=List(gens, + j->PreImagesRepresentativeNC(epi,Image(epi,j)^dc[i])); rels:=ClosureGroup(rels,CommutGenImgs(pco,gens,imgs, Intersection(mul,DerivedSubgroup(qs)))); fi; @@ -306,7 +307,7 @@ BindGlobal("PositiveExponentsPresentationFpHom",function(hom) local G,F,geni,ro,fam,r,i,j,rel,n,e; G:=Image(hom); F:=FreeGeneratorsOfFpGroup(G); - geni:=List(GeneratorsOfGroup(G),i->PreImagesRepresentative(hom,i)); + geni:=List(GeneratorsOfGroup(G),i->PreImagesRepresentativeNC(hom,i)); ro:=List(geni,Order); fam:=FamilyObj(F[1]); r:=[]; @@ -351,7 +352,7 @@ local G,H,D,T,i,j,k,l,a,h,nk,evals,rels,gens,r,np,g,invlist,el,elp,TL,rp,pos; # this will guarantee we always take the same preimages el:=AsSSortedListNonstored(H); - elp:=List(el,i->PreImagesRepresentative(s,i)); + elp:=List(el,i->PreImagesRepresentativeNC(s,i)); #ensure the preimage of identity is one if IsOne(el[1]) then pos:=1; @@ -485,7 +486,7 @@ local G,B,P,s,D,i,j,v,ri,rank,bas,basr,row,rel,sol,snf,mat; j:=NaturalHomomorphismByNormalSubgroupNC(D,v); i:=GeneratorsOfGroup(Image(j)); i:=GroupHomomorphismByImagesNC(Image(j),P,i, - List(i,k->ImageElm(s,PreImagesRepresentative(j,k)))); + List(i,k->ImageElm(s,PreImagesRepresentativeNC(j,k)))); SetKernelOfMultiplicativeGeneralMapping(i, Image(j,KernelOfMultiplicativeGeneralMapping(s))); return i; @@ -558,7 +559,7 @@ local hom, #isomorphism fp s:=sl[pp]; mg:=IsomorphismPermGroup(KernelOfMultiplicativeGeneralMapping(s)); mg:=List(IndependentGeneratorsOfAbelianGroup(Image(mg)), - i->PreImagesRepresentative(mg,i)); + i->PreImagesRepresentativeNC(mg,i)); sdc:=ListWithIdenticalEntries(Last(ngl),One(Source(s))); sdc{[ngl[pp]+1..ngl[pp+1]]}:=mg; @@ -579,7 +580,7 @@ local hom, #isomorphism fp q:=[]; for i in ce do - Add(q,PreImagesRepresentative(sdc,i[2])); + Add(q,PreImagesRepresentativeNC(sdc,i[2])); od; rel2[pp]:=q; od; diff --git a/lib/semirel.gi b/lib/semirel.gi index dd0fad38fa..ddf52fda8f 100644 --- a/lib/semirel.gi +++ b/lib/semirel.gi @@ -1299,7 +1299,7 @@ end); ######## ######## -InstallMethod(PreImagesRepresentative, "for semigroup homomorphism by images", +InstallMethod(PreImagesRepresentativeNC,"for semigroup homomorphism by images", FamRangeEqFamElm, [IsSemigroupHomomorphism and IsSemigroupHomomorphismByImagesRep, IsMultiplicativeElement], function(hom, x) diff --git a/lib/stbcbckt.gi b/lib/stbcbckt.gi index f0b4eb0046..1d9ccd727f 100644 --- a/lib/stbcbckt.gi +++ b/lib/stbcbckt.gi @@ -2602,7 +2602,7 @@ dom, et, ft, Pr, rbase, BF, Q, data,lc; found:=PartitionBacktrack( G, Pr, true, rbase, data, L, R ); if IsPerm(found) and map<>false then - found:=PreImagesRepresentative(map,found); + found:=PreImagesRepresentativeNC(map,found); fi; return found; end ); diff --git a/lib/twocohom.gi b/lib/twocohom.gi index 179e1f453a..7af0728b1e 100644 --- a/lib/twocohom.gi +++ b/lib/twocohom.gi @@ -813,7 +813,7 @@ local field,fp,fpg,gens,hom,mats,fm,mon,tzrules,dim,rules,eqs,i,j,k,l,o,l1, od; gens:=List(GeneratorsOfGroup(FamilyObj(fpg)!.wholeGroup), - x->PreImagesRepresentative(fp,x)); + x->PreImagesRepresentativeNC(fp,x)); hom:=GroupHomomorphismByImagesNC(G,Group(mo.generators), GeneratorsOfGroup(G),mo.generators); @@ -845,7 +845,7 @@ local field,fp,fpg,gens,hom,mats,fm,mon,tzrules,dim,rules,eqs,i,j,k,l,o,l1, else # Length of r[1] is 1. That is, this generator is not used! m:=First(RelationsOfFpMonoid(mon),x->List(x,LetterRepAssocWord)=r); - m:=List(m,x->PreImagesRepresentative(fm,ElementOfFpMonoid(FamilyObj(One(mon)),x))); + m:=List(m,x->PreImagesRepresentativeNC(fm,ElementOfFpMonoid(FamilyObj(One(mon)),x))); m:=List(m,UnderlyingElement); # free group elements/words if not IsOne(m[1]*Subword(m[2],1,1)) then @@ -866,7 +866,7 @@ local field,fp,fpg,gens,hom,mats,fm,mon,tzrules,dim,rules,eqs,i,j,k,l,o,l1, model:=ValueOption("model"); if model<>fail then q:=GQuotients(model,G)[1]; - pre:=List(gens,x->PreImagesRepresentative(q,x)); + pre:=List(gens,x->PreImagesRepresentativeNC(q,x)); ker:=KernelOfMultiplicativeGeneralMapping(q); pcgs:=Pcgs(ker); l1:=GModuleByMats(LinearActionLayer(Group(pre),pcgs),mo.field); @@ -880,7 +880,7 @@ local field,fp,fpg,gens,hom,mats,fm,mon,tzrules,dim,rules,eqs,i,j,k,l,o,l1, m:=GroupGeneralMappingByImagesNC(fpg,model,GeneratorsOfGroup(fpg),pre); mats:=List(GeneratorsOfMonoid(mon), x->ImagesRepresentative(m, - PreImagesRepresentative(fm,x))); #Elements for monoid generators + PreImagesRepresentativeNC(fm,x))); #Elements for monoid generators nonone:=[1..Length(mats)]; pre:=mats; onemat:=One(G); @@ -896,8 +896,8 @@ local field,fp,fpg,gens,hom,mats,fm,mon,tzrules,dim,rules,eqs,i,j,k,l,o,l1, zerovec:=Zero(onemat[1]); mats:=List(GeneratorsOfMonoid(mon), - x->ImagesRepresentative(hom,PreImagesRepresentative(fp, - PreImagesRepresentative(fm,x)))); # matrices for monoid generators + x->ImagesRepresentative(hom,PreImagesRepresentativeNC(fp, + PreImagesRepresentativeNC(fm,x)))); # matrices for monoid generators one:=One(mats[1]); nonone:=Filtered([1..Length(mats)],x->not IsOne(mats[x])); zero:=zerovec; @@ -1046,7 +1046,7 @@ local field,fp,fpg,gens,hom,mats,fm,mon,tzrules,dim,rules,eqs,i,j,k,l,o,l1, one:=One(FreeGroupOfFpGroup(fpg)); k:=List(GeneratorsOfMonoid(mon), - x->UnderlyingElement(PreImagesRepresentative(fm,x))); + x->UnderlyingElement(PreImagesRepresentativeNC(fm,x))); # matrix corresponding to monoid word mapped2:=function(list) local a,i; @@ -1124,8 +1124,8 @@ local field,fp,fpg,gens,hom,mats,fm,mon,tzrules,dim,rules,eqs,i,j,k,l,o,l1, local a; if not IsBound(imagemonwords[nr]) then # apply automorphism - a:=PreImagesRepresentative(fm,GeneratorsOfMonoid(mon)[nr]); - a:=PreImagesRepresentative(fp,a); + a:=PreImagesRepresentativeNC(fm,GeneratorsOfMonoid(mon)[nr]); + a:=PreImagesRepresentativeNC(fp,a); a:=ImagesRepresentative(autom,a); a:=ImagesRepresentative(fp,a); a:=ImagesRepresentative(fm,a); diff --git a/lib/vspchom.gi b/lib/vspchom.gi index 4b6aee7a75..daf0e145bf 100644 --- a/lib/vspchom.gi +++ b/lib/vspchom.gi @@ -485,9 +485,9 @@ InstallMethod( ImagesRepresentative, ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . for left module g.m.b.i. +#M PreImagesRepresentativeNC( , ) . . . for left module g.m.b.i. ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for left module g.m.b.i., and element", FamRangeEqFamElm, [ IsGeneralMapping and IsLinearGeneralMappingByImagesDefaultRep, @@ -1221,9 +1221,9 @@ InstallMethod( ImagesRepresentative, ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . for left module m.b.m. +#M PreImagesRepresentativeNC( , ) . . . . for left module m.b.m. ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for left module m.b.m., and element", FamRangeEqFamElm, [ IsGeneralMapping and IsLinearMappingByMatrixDefaultRep, diff --git a/tst/testextra/ctbl.tst b/tst/testextra/ctbl.tst index 1fa17024fb..a935018ca0 100644 --- a/tst/testextra/ctbl.tst +++ b/tst/testextra/ctbl.tst @@ -16,7 +16,7 @@ gap> tmpSolvableResiduum:= function( G ) > return TrivialSubgroup( G ); > fi; > iso:= IsomorphismFpGroup( G ); -> return PreImages( iso, Kernel( +> return PreImagesNC( iso, Kernel( > EpimorphismSolvableQuotient( ImagesSource( iso ), Size( G ) ) ) ); > end;; gap> for n in [ 1 .. 150 ] do diff --git a/tst/testextra/makeperfect.g b/tst/testextra/makeperfect.g index fd68a1560c..b7ed22e898 100644 --- a/tst/testextra/makeperfect.g +++ b/tst/testextra/makeperfect.g @@ -244,8 +244,8 @@ local respp,cf,m,mpos,coh,fgens,comp,reps,v,new,isok,pema,pf,gens,nt,quot, List(GeneratorsOfGroup(new),x->ImagesRepresentative(pema,x)), Concatenation( List(GeneratorsOfGroup(Range(coh.fphom)), - x->PreImagesRepresentative(coh.fphom,x)), - ListWithIdenticalEntries(coh.module.dimension, + x->PreImagesRepresentativeNC(coh.fphom,x)), + ListWithIdenticalEntries(coh.module.dimension, One(coh.group)) )); qk:=KernelOfMultiplicativeGeneralMapping(quot); diff --git a/tst/testinstall/fldabnum.tst b/tst/testinstall/fldabnum.tst index 0643fbf338..b2d276c965 100644 --- a/tst/testinstall/fldabnum.tst +++ b/tst/testinstall/fldabnum.tst @@ -288,7 +288,7 @@ gap> ImagesRepresentative( aut, E(45) ); E(45)^2 gap> PreImageElm( aut, E(45) ); -E(45)^8-E(45)^38 -gap> Print(PreImagesSet( aut, Conjugates( f, E(45) ) ),"\n"); +gap> Print(PreImagesSetNC( aut, Conjugates( f, E(45) ) ),"\n"); [ -E(45)-E(45)^16, -E(45)^2-E(45)^17, -E(45)^7-E(45)^37, -E(45)^8-E(45)^38, -E(45)^11-E(45)^26, -E(45)^19-E(45)^34, -E(45)^28-E(45)^43, -E(45)^29-E(45)^44, E(45)^44, E(45)^43, E(45)^38, E(45)^37, E(45)^34, diff --git a/tst/testinstall/mapping.tst b/tst/testinstall/mapping.tst index d6d7bd36ae..99eab51aa6 100644 --- a/tst/testinstall/mapping.tst +++ b/tst/testinstall/mapping.tst @@ -231,6 +231,11 @@ gap> ImagesRepresentative( map, Z(3) ); Z(3)^0 gap> (0*Z(3)) ^ map; 0*Z(3) +gap> ## test new PreImagesRepresentative +gap> PreImagesRepresentative( map, Z(3) ); +fail +gap> PreImagesRepresentative( map, Z(3)^0 ); +Z(3) # PreImage(s)Elm, PreImagesSet for # bijective but neither IsSingleValued nor IsTotal @@ -249,7 +254,7 @@ gap> IsTotal( map ); false gap> PreImageElm( map, Z(3) ); Z(3)^0 -gap> PreImagesElm( map, Z(3) ); +gap> PreImagesElmNC( map, Z(3) ); [ Z(3)^0 ] gap> PreImagesSet( map, [ 0*Z(3), Z(3) ] ); [ 0*Z(3), Z(3)^0 ] @@ -304,7 +309,7 @@ gap> IsTotal( map ); true gap> PreImageElm( map, Z(3) ); 0*Z(3) -gap> PreImagesElm( map, Z(3) ); +gap> PreImagesElmNC( map, Z(3) ); [ 0*Z(3) ] gap> PreImagesSet( map, [ 0*Z(3), Z(3) ] ); [ 0*Z(3), Z(3)^0 ]