From ed4c9a88952ad130ac80e7d4a8d125c667d2b469 Mon Sep 17 00:00:00 2001 From: cdwensley Date: Wed, 20 May 2026 09:13:46 +0100 Subject: [PATCH 1/7] re-edited library files, adding NC --- lib/algebra.gi | 2 +- lib/algfp.gi | 2 +- lib/alghom.gi | 16 ++--- lib/alglie.gi | 26 ++++---- lib/algrep.gi | 8 +-- lib/autsr.gi | 42 ++++++------ lib/clas.gi | 2 +- lib/clashom.gi | 48 +++++++------- lib/csetgrp.gi | 4 +- lib/ctblfuns.gi | 4 +- lib/ctblgrp.gi | 4 +- lib/ctblsolv.gi | 28 ++++---- lib/field.gi | 13 ++-- lib/fitfree.gi | 24 +++---- lib/fldabnum.gi | 12 ++-- lib/ghom.gi | 20 +++--- lib/ghomfp.gi | 16 ++--- lib/ghompcgs.gi | 8 +-- lib/ghomperm.gi | 32 +++++----- lib/gpfpiso.gi | 72 ++++++++++----------- lib/gpprmsya.gi | 2 +- lib/gprd.gi | 16 ++--- lib/gprdmat.gi | 12 ++-- lib/gprdpc.gi | 2 +- lib/gprdperm.gi | 26 ++++---- lib/grp.gi | 24 +++---- lib/grpcompl.gi | 6 +- lib/grpfp.gi | 18 +++--- lib/grplatt.gi | 6 +- lib/grpmat.gi | 10 +-- lib/grpnames.gi | 2 +- lib/grpnice.gd | 14 ++-- lib/grpnice.gi | 26 ++++---- lib/grppc.gi | 12 ++-- lib/grppcaut.gi | 20 +++--- lib/grppccom.gi | 4 +- lib/grppcext.gi | 44 ++++++------- lib/grppclat.gi | 6 +- lib/grpperm.gi | 6 +- lib/grpprmcs.gi | 16 ++--- lib/liefam.gi | 2 +- lib/mapphomo.gi | 46 +++++++------- lib/mapping.gd | 51 ++++++++++++--- lib/mapping.gi | 166 +++++++++++++++++++++++++++++++++++++++++++----- lib/mapprep.gi | 106 +++++++++++++++---------------- lib/maxsub.gi | 22 +++---- lib/mgmring.gi | 8 +-- lib/morpheus.gi | 28 ++++---- lib/norad.gi | 8 +-- lib/onecohom.gi | 10 +-- lib/oprt.gi | 14 ++-- lib/oprtglat.gi | 2 +- lib/oprtperm.gi | 2 +- lib/pcgsnice.gi | 2 +- lib/permdeco.gi | 10 +-- lib/relation.gi | 30 ++++----- lib/ringhom.gi | 4 +- lib/schur.gi | 22 +++---- lib/semirel.gi | 2 +- lib/stbcbckt.gi | 2 +- lib/twocohom.gi | 18 +++--- lib/vspchom.gi | 8 +-- 62 files changed, 693 insertions(+), 525 deletions(-) diff --git a/lib/algebra.gi b/lib/algebra.gi index e8457b37e1b..df6d32f75f7 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 c65a8ec796f..51adff0b6d4 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 8dc79c6efde..550ac43fd68 100644 --- a/lib/alghom.gi +++ b/lib/alghom.gi @@ -576,16 +576,16 @@ 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 ); @@ -902,7 +902,7 @@ InstallMethod( ImagesRepresentative, ############################################################################# ## -#M PreImagesRepresentative( , ) +#M PreImagesRepresentativeNC( , ) ## BindGlobal( "PreImagesRepresentativeOperationAlgebraHomomorphism", function( ophom, mat ) if not IsBound( ophom!.basisImage ) then @@ -915,7 +915,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 +1076,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 322e003d6db..d3343f8fc4f 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? @@ -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: @@ -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, @@ -5592,8 +5592,8 @@ InstallMethod( JenningsLieAlgebra, 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,8 +5610,8 @@ 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) ); e:= ExtRepOfObj(c); @@ -5788,8 +5788,8 @@ InstallMethod( PCentralLieAlgebra, 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,8 +5807,8 @@ 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) ); e:= ExtRepOfObj(c); diff --git a/lib/algrep.gi b/lib/algrep.gi index 8d331feee29..7607190b94d 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 241cc841150..704f9093dc0 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; @@ -1028,7 +1028,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, b:=MTX.BasisRadical(mo); fratsim:=Length(b)=0; if not fratsim then - b:=List(b,x->PreImagesRepresentative(hom,PcElementByExponents(MPcgs,x))); + b:=List(b,x->PreImagesRepresentativeNC(hom,PcElementByExponents(MPcgs,x))); for j in b do N:=ClosureSubgroup(N,b); od; @@ -1129,8 +1129,8 @@ local ff,r,d,ser,u,v,i,j,k,p,bd,e,gens,lhom,M,N,hom,Q,Mim,q,ocr,split,MPcgs, if perm in Aperm then return true; fi; - aut:=PreImagesRepresentative(AQiso,perm); - newgens:=List(gens,x->PreImagesRepresentative(comiso, + aut:=PreImagesRepresentativeNC(AQiso,perm); + newgens:=List(gens,x->PreImagesRepresentativeNC(comiso, ImagesRepresentative(aut,ImagesRepresentative(comiso,x)))); mo2:=GModuleByMats(LinearActionLayer(newgens,MPcgs),mo.field); @@ -1163,9 +1163,9 @@ local ff,r,d,ser,u,v,i,j,k,p,bd,e,gens,lhom,M,N,hom,Q,Mim,q,ocr,split,MPcgs, if perm in Aperm then return true; fi; - aut:=PreImagesRepresentative(AQiso,perm); + aut:=PreImagesRepresentativeNC(AQiso,perm); newgens:=List(GeneratorsOfGroup(Q), - x->PreImagesRepresentative(q,Image(aut,ImagesRepresentative(q,x)))); + x->PreImagesRepresentativeNC(q,Image(aut,ImagesRepresentative(q,x)))); mo2:=GModuleByMats(LinearActionLayer(newgens,MPcgs),mo.field); return MTX.IsomorphismModules(mo,mo2)<>fail; end; @@ -1175,9 +1175,9 @@ local ff,r,d,ser,u,v,i,j,k,p,bd,e,gens,lhom,M,N,hom,Q,Mim,q,ocr,split,MPcgs, if perm in Aperm then return true; fi; - aut:=PreImagesRepresentative(AQiso,perm); + aut:=PreImagesRepresentativeNC(AQiso,perm); newgens:=List(GeneratorsOfGroup(Q), - x->PreImagesRepresentative(q,Image(aut,ImagesRepresentative(q,x)))); + 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 +1234,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)); @@ -1367,7 +1367,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, GeneratorsOfGroup(rf), List(GeneratorsOfGroup(rf), y->ImagesRepresentative(hom,ImagesRepresentative(j, - PreImagesRepresentative(hom,y))))); + PreImagesRepresentativeNC(hom,y))))); Assert(2,IsBijective(k)); Add(ind,k); od; @@ -1390,7 +1390,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, 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)); + C:=List(SmallGeneratingSet(C),x->PreImagesRepresentativeNC(AQiso,x)); AQ:=Group(C); SetIsFinite(AQ,true); SetIsGroupOfAutomorphismsFiniteGroup(AQ,true); @@ -1416,7 +1416,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, C:=MappingGeneratorsImages(AQiso); if C[2]<>GeneratorsOfGroup(AQP) then C:=[List(GeneratorsOfGroup(AQP), - x->PreImagesRepresentative(AQiso,x)), + x->PreImagesRepresentativeNC(AQiso,x)), GeneratorsOfGroup(AQP)]; fi; for j in u do @@ -1450,7 +1450,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 +1883,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 +1904,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 b933b7d50b0..2a27e3cbbaa 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 201b2cd9b7e..16c7c4f9c34 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), @@ -564,7 +564,7 @@ local clT, # classes T orb:=[]; for p in [1..Length(clTR)] do - repres:=PreImagesRepresentative(projections[i],clTR[p]); + repres:=PreImagesRepresentativeNC(projections[i],clTR[p]); if i=1 or isdirprod or reps[j]*RestrictedPermNC(repres,components[i]) in Mproj[i] then @@ -586,8 +586,8 @@ local clT, # classes T #was: #clTR:=List(clTR,i->ConjugacyClass(localcent_r,i)); - #clTR:=List(clTR,j->[PreImagesRepresentative(projections[i], - # Representative(j)), + #clTR:=List(clTR,j->[PreImagesRepresentativeNC(projections[i], + # Representative(j)), # PreImage(centrhom,Centralizer(j)), # j]); @@ -706,7 +706,7 @@ local clT, # classes T #change the transversal element to map to the representative con:=trans[orpo]*gen; limg:=opfun(repres,con); - con:=con*PreImagesRepresentative(centrhom, + con:=con*PreImagesRepresentativeNC(centrhom, RepresentativeAction(localcent_r, Image(projections[i],limg), Representative(clTR[p][3]))); @@ -798,7 +798,7 @@ local clT, # classes T # centralizers_r-conjugation.) con:=trans[orpo]*gen; limg:=opfun(repres,con); - con:=con*PreImagesRepresentative(centrhom, + con:=con*PreImagesRepresentativeNC(centrhom, RepresentativeAction(localcent_r, Image(projections[i],limg), Representative(orb[p][3]))); @@ -870,7 +870,7 @@ local clT, # classes T # remember the element to try trymap:=[p,(cengen[genpos2]* - PreImagesRepresentative( + PreImagesRepresentativeNC( RestrictedMapping(projections[i], centralizers[j]), RepresentativeAction( @@ -1140,7 +1140,7 @@ 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)), + cl:=List(cl,i->[PreImagesRepresentativeNC(hom,Representative(i)), PreImage(hom,StabilizerOfExternalSet(i))]); cs:=Concatenation([G],Filtered(cs,x->IsSubset(lastM,x))); fi; @@ -1207,7 +1207,7 @@ local cs, # chief series of G autos:=List(GeneratorsOfGroup(G), i->GroupHomomorphismByImagesNC(T1,T1,GeneratorsOfGroup(T1), List(GeneratorsOfGroup(T1), - j->Image(Thom,PreImagesRepresentative(Thom,j)^i)))); + j->Image(Thom,PreImagesRepresentativeNC(Thom,j)^i)))); # find (probably another) permutation rep for T1 for which all # automorphisms can be represented by permutations @@ -1268,7 +1268,7 @@ local cs, # chief series of G autos:=List(GeneratorsOfGroup(S), i->GroupHomomorphismByImagesNC(T1,T1,GeneratorsOfGroup(T1), List(GeneratorsOfGroup(T1), - j->Image(Thom,PreImagesRepresentative(Thom,j)^i)))); + j->Image(Thom,PreImagesRepresentativeNC(Thom,j)^i)))); # find (probably another) permutation rep for T1 for which all # automorphisms can be represented by permutations @@ -1288,7 +1288,7 @@ local cs, # chief series of G # define isomorphisms between the components reps:=List([1..n],i-> - PreImagesRepresentative(Qhom,RepresentativeAction(Q,1,i))); + PreImagesRepresentativeNC(Qhom,RepresentativeAction(Q,1,i))); genimages:=[]; for j in GeneratorsOfGroup(G) do @@ -1345,7 +1345,7 @@ local cs, # chief series of G 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])]); + clF:=List(clF,x->[PreImagesRepresentativeNC(FM,x[1]),PreImage(FM,x[2])]); return clF; fi; #fi; @@ -1374,9 +1374,9 @@ local cs, # chief series of G 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])]); + cl:=List(clF,i->[PreImagesRepresentativeNC(Fhom,i[1]),Size(i[2])]); else - cl:=List(clF,i->[PreImagesRepresentative(Fhom,i[1]), + cl:=List(clF,i->[PreImagesRepresentativeNC(Fhom,i[1]), PreImage(Fhom,i[2])]); fi; else @@ -1391,7 +1391,7 @@ local cs, # chief series of G for k in clF do # modify the representative with a kernel elm. to project # correctly on the second component - elm:=j[1]*PreImagesRepresentative(FMhom, + 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), @@ -1449,7 +1449,7 @@ local cs, # chief series of G 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, + elm:=l[1]*PreImagesRepresentativeNC(FMhom, LeftQuotient(Image(Fhom,l[1]),elm)); zentr:=PreImage(Fhom,k[2]^l1); zentr:=Intersection(zentr,l[2]); @@ -1957,7 +1957,7 @@ local classes, # classes to be constructed, the result c := [h * PcElementByExponentsNC( Npcgs,w*com.factorspace), stabrad,stabfacgens,stabfacimg,subsz,stabrsubsz]; #if reduce<>fail then - # Add(classes,[PreImagesRepresentative(reduce,c[1]), + # Add(classes,[PreImagesRepresentativeNC(reduce,c[1]), # PreImage(reduce,c[2])]); # else @@ -2022,7 +2022,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 +2338,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 +2398,12 @@ local r, #radical if ntrihom then ncl:=[]; for i in cl do - new:=[PreImagesRepresentative(hom,i[1])]; + 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->PreImagesRepresentative(hom,x))); + List(gens,x->PreImagesRepresentativeNC(hom,x))); Add(new,gens); #TODO: PreImage groups? #Add(new,PreImage(hom,i[2])); @@ -2886,10 +2886,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,7 +2897,7 @@ 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, + 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 9c5955a8f33..c2d37bfba8b 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; @@ -1064,7 +1064,7 @@ local c, flip, maxidx, cano, tryfct, p, r, t, Assert(2,Size(a2)*Size(tra)=Size(b)); SetKernelOfMultiplicativeGeneralMapping(r,a2); - dcs:=List(dcs,x->[PreImagesRepresentative(quot,x[1]),Size(a1)*x[2], + dcs:=List(dcs,x->[PreImagesRepresentativeNC(quot,x[1]),Size(a1)*x[2], PreImage(r,x[3])]); r:=List(dcs,x->x[1]); stabs:=List(dcs,x->x[3]); diff --git a/lib/ctblfuns.gi b/lib/ctblfuns.gi index c648c9401ff..eec04e92e45 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 3b41dbb5be7..914845923fb 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 d18f10f6d73..fc787a2bb6f 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, @@ -582,9 +582,9 @@ InstallGlobalFunction( CoveringTriplesCharacters, function( G, z ) h:= NaturalHomomorphismByNormalSubgroupNC( G, P ); r:= List( CoveringTriplesCharacters( ImagesSource( h ), ImageElm( h, z ) ), - x -> [ PreImagesSet( h, x[1] ), - PreImagesSet( h, x[2] ), - PreImagesRepresentative( h, x[3] ) ] ); + x -> [ PreImagesSetNC( h, x[1] ), + PreImagesSetNC( h, x[2] ), + PreImagesRepresentativeNC( h, x[3] ) ] ); if p = i then @@ -622,9 +622,9 @@ InstallGlobalFunction( CoveringTriplesCharacters, function( G, z ) c:= Stabilizer( img, zn ); fi; Append( r, List( CoveringTriplesCharacters( c, zn ), - x -> [ PreImagesSet( h, x[1] ), - PreImagesSet( h, x[2] ), - PreImagesRepresentative( h, x[3] ) ] ) ); + x -> [ PreImagesSetNC( h, x[1] ), + PreImagesSetNC( h, x[2] ), + PreImagesRepresentativeNC( h, x[3] ) ] ) ); od; return r; @@ -663,9 +663,9 @@ InstallGlobalFunction( CoveringTriplesCharacters, function( G, z ) img:= ImagesSource( h ); Append( r, List( CoveringTriplesCharacters( img, ImageElm( h, z ) ), - x -> [ PreImagesSet( h, x[1] ), - PreImagesSet( h, x[2] ), - PreImagesRepresentative( h, x[3] ) ] ) ); + x -> [ PreImagesSetNC( h, x[1] ), + PreImagesSetNC( h, x[2] ), + 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,7 +1911,7 @@ InstallMethod( BaumClausenInfo, k:= Pcgs( kernel ); pcgs:= PcgsByPcSequence( ElementsFamily( FamilyObj( kernel ) ), Concatenation( List( pcgs, - x -> PreImagesRepresentative( hom, x ) ), + x -> PreImagesRepresentativeNC( hom, x ) ), k ) ); k:= ListWithIdenticalEntries( Length( k ), 0 ); diff --git a/lib/field.gi b/lib/field.gi index f5eadb8ede1..a65dd502660 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,14 @@ InstallMethod( PreImagesElm, ############################################################################# ## -#M PreImagesSet( , ) . . . . . . . . . . . . . preimage of a set -## -InstallMethod( PreImagesSet, +#M PreImagesSetNC +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 d68681ea936..a683e7964c3 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,7 +1195,7 @@ 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, + rep:=PreImagesRepresentativeNC(act, RepresentativeAction(Image(act),i[1],i[j])), component:=d[i[j]],hall:=h, norm:=n); 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 5902772c5ee..6fb312be2da 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 bc217f1e321..8047a392066 100644 --- a/lib/ghom.gi +++ b/lib/ghom.gi @@ -253,9 +253,9 @@ end ); ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . . . . . . . via images -## -InstallMethod( PreImagesRepresentative, "for PBG-Hom", FamRangeEqFamElm, +#M PreImagesRepresentativeNC( , ) . . . . . . . . . . via images + +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,9 +875,9 @@ InstallMethod( ImagesRepresentative, ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . . . . . . . . for GHBI +#M PreImagesRepresentativeNC( , ) . . . . . . . . . . . . for GHBI ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for GHBI and mult.-elm.-with-inverse", FamRangeEqFamElm, [ IsGroupGeneralMappingByImages, @@ -1225,9 +1225,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 +1238,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 fcc83630d93..fb2ce5f0737 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->PreImagesRepresentativeNC(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 f17db8b36c8..78ba75b3397 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 2f103a6a372..7bf4a40a70c 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,9 +1162,9 @@ 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 ) @@ -1562,9 +1562,9 @@ InstallMethod( ImagesSource,"constituent homomorphism",true, ############################################################################# ## -#M PreImagesRepresentative( , ) +#M PreImagesRepresentativeNC( , ) ## -InstallMethod( PreImagesRepresentative,"constituent homomorphism", +InstallMethod( PreImagesRepresentativeNC,"constituent homomorphism", FamRangeEqFamElm,[IsConstituentHomomorphism,IsPerm], 0, function( hom, elm ) local D,DP; @@ -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 202d9419a7b..8095dd5be1d 100644 --- a/lib/gpfpiso.gi +++ b/lib/gpfpiso.gi @@ -91,7 +91,7 @@ local l,iso,fp,stbc,gens; fp:=IsomorphismFpGroup(l); iso:=GroupHomomorphismByImagesNC(G,Range(fp), List(MappingGeneratorsImages(fp)[1], - i->PreImagesRepresentative(iso,i)), + i->PreImagesRepresentativeNC(iso,i)), MappingGeneratorsImages(fp)[2]); SetIsBijective(iso,true); return iso; @@ -171,8 +171,8 @@ function( G, str ) IsNaturalAlternatingGroup(H); new:=IsomorphismFpGroup(H,"@"); gensH:=List(GeneratorsOfGroup(Image(new)), - i->PreImagesRepresentative(new,i)); - preiH := List( gensH, x -> PreImagesRepresentative( hom, x ) ); + 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 @@ -397,7 +397,8 @@ function(g,str,N) fgens:=GeneratorsOfGroup(f); auts:=List(GeneratorsOfGroup(g),i-> GroupHomomorphismByImagesNC(f,f,fgens, - List(fgens,j->Image(hom,PreImagesRepresentative(hom,j)^i)):noassert)); + List(fgens, + j->Image(hom,PreImagesRepresentativeNC(hom,j)^i)):noassert)); for j in auts do SetIsBijective(j,true); od; @@ -426,7 +427,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 +462,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 +641,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 +695,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 +967,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 +990,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 +1004,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 +1229,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 +1249,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 +1321,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 +1521,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 +1729,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 +1880,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 +1925,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)), @@ -1966,7 +1967,7 @@ local isob,isos,iso,gens,a,rels,l,i,j,bgens,cb,cs,b,f,k,w,monoid, a:=Group(SmallGeneratingSet(group)); # so nothing stores csetperm:=List(GeneratorsOfGroup(a),x->Permutation(x,rt,OnRight)); iso:=EpimorphismFromFreeGroup(a); - csetperm:=List(bgens,x->MappedWord(PreImagesRepresentative(iso,x), + csetperm:=List(bgens,x->MappedWord(PreImagesRepresentativeNC(iso,x), MappingGeneratorsImages(iso)[1],csetperm)); act:=Group(csetperm,()); @@ -2014,7 +2015,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 @@ -2074,9 +2075,8 @@ local isob,isos,iso,gens,a,rels,l,i,j,bgens,cb,cs,b,f,k,w,monoid, # a:=Group(SmallGeneratingSet(group)); # so nothing stores # csetperm:=List(GeneratorsOfGroup(a),x->Permutation(x,rt,OnRight)); # iso:=EpimorphismFromFreeGroup(a); -# csetperm:=List(bgens,x->MappedWord(PreImagesRepresentative(iso,x),MappingGeneratorsImages(iso)[1],csetperm)); -# act:=Group(csetperm,()); -# +# csetperm:=List(bgens,x->MappedWord(PreImagesRepresentativeNC(iso,x), +# MappingGeneratorsImages(iso)[1],csetperm)); act:=Group(csetperm,()); # bhom:=GroupHomomorphismByImagesNC(borel,act,bgens,csetperm); # #Assert(0,bhom<>fail); # @@ -2119,7 +2119,7 @@ local isob,isos,iso,gens,a,rels,l,i,j,bgens,cb,cs,b,f,k,w,monoid, # pos:=rti[PositionCanonical(rt,elm)]; # #rep:=RepresentativeAction(borel,PositionCanonical(rt,elm), # # PositionCanonical(rt,dcreps[pos]),bgens,csetperm,OnPoints); -# rep:=PreImagesRepresentative(bhom, +# rep:=PreImagesRepresentativeNC(bhom, # RepresentativeAction(Range(bhom),PositionCanonical(rt,elm), # PositionCanonical(rt,dcreps[pos]))); # rep:=[elm*rep/dcreps[pos],dcreps[pos],rep^-1]; @@ -2441,7 +2441,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 +2455,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 +2511,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 +2684,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 +2896,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 a88508a2bbf..d0af65692ee 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 e32bf13af78..49b091d983a 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 ); @@ -1094,7 +1094,7 @@ local info,map,U,mapfun,P; function(elm) elm:=elm![n]; if n>info.degI then - elm:=PreImagesRepresentative(info.alpha,elm); + elm:=PreImagesRepresentativeNC(info.alpha,elm); fi; return elm; end); @@ -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 2480d861d18..c5821733500 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 6994897c392..a17e46436ad 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 327f812adc8..36973b6b466 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 e46a66da6f9..27f3644271d 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 9adf68a1752..5058cd8610c 100644 --- a/lib/grpcompl.gi +++ b/lib/grpcompl.gi @@ -100,11 +100,11 @@ local G,N,K,s, h, q, fpi, factorpres, com, comgens, cen, ocrels, fpcgs, ncom, 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)); + 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 8f9d97983bd..0546a1f18a3 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); @@ -5497,7 +5497,7 @@ local G,T,gens,g,reps,ng,index,i,j,ndef,n,iso; subgroup := U, iso:=iso, table:=T, - reps:=List(reps,i->PreImagesRepresentative(iso,i)))); + reps:=List(reps,i->PreImagesRepresentativeNC(iso,i)))); fi; ndef := 1; @@ -5517,7 +5517,7 @@ local G,T,gens,g,reps,ng,index,i,j,ndef,n,iso; subgroup := U, iso:=iso, table:=T, - reps:=List(reps,i->PreImagesRepresentative(iso,i)))); + reps:=List(reps,i->PreImagesRepresentativeNC(iso,i)))); fi; fi; od; diff --git a/lib/grplatt.gi b/lib/grplatt.gi index 5563219bf79..7419486e852 100644 --- a/lib/grplatt.gi +++ b/lib/grplatt.gi @@ -955,7 +955,7 @@ 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 +2779,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; @@ -2856,7 +2856,7 @@ local fgi,inducedfactorautos,projs,psubs,info,n,l,nl,emb,u,pos, 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], + 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); diff --git a/lib/grpmat.gi b/lib/grpmat.gi index 5766951a766..17eae4f5e07 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 8220d79e888..11dcafd25e4 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 5a9480fd869..e22d72c39a5 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 f72d348e814..6e3db2bd6f8 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 f01a7af92d3..9233d045e29 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 28406947257..eb3e7a5f51d 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,11 @@ 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 +1543,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 2dc5682575e..bb59eef42e7 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; @@ -890,7 +890,7 @@ local H, E, cor, a, i, fun2,pcgs,home; #a :=NaturalHomomorphism( G, G / N ); #cor:=PPrimeSetsOC( Image( a ) ); #cor.generators:=List( cor.generators, x -> - # PreImagesRepresentative( a, x ) ); + # PreImagesRepresentativeNC( a, x ) ); cor:=rec(home:=home,generators:=pcgs mod InducedPcgs(pcgs,N)); cor.useCentralSK:=true; fi; diff --git a/lib/grppcext.gi b/lib/grppcext.gi index 4cfb4063a1b..bcc5e554a9e 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 4b8113783e2..b313ba63599 100644 --- a/lib/grppclat.gi +++ b/lib/grppclat.gi @@ -86,7 +86,7 @@ local f; else aut:= GroupHomomorphismByImagesNC(f,f,GeneratorsOfGroup(f), List(GeneratorsOfGroup(f), - i->Image(epi,Image(aut,PreImagesRepresentative(epi,i))))); + 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,PreImagesRepresentativeNC(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 020398dfe5c..08f78052983 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 c8a8a1166ad..8ba3001d287 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 6122a753b0c..ca6c3161c66 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 3e396945ff5..fbd38cb004f 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. mapp. 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 12d2ff39dc1..70c0be49a01 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,7 +968,8 @@ 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"> ## @@ -976,16 +977,22 @@ DeclareGlobalFunction( "Images" ); ## ## ## 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 now checks that +## elm is an element of the range before calling PreImagesElmNC. ## ## ## <#/GAPDoc> ## DeclareOperation( "PreImagesElm", [ IsGeneralMapping, IsObject ] ); +DeclareOperation( "PreImagesElmNC", [ IsGeneralMapping, IsObject ] ); ############################################################################# @@ -1015,11 +1022,12 @@ DeclareOperation( "PreImageElm", ############################################################################# ## #O PreImagesRepresentative( , ) . . . one preimage of an element -## under a gen. mapping +#O PreImagesRepresentativeNC( , ) . . . . under a general mapping ## ## <#GAPDoc Label="PreImagesRepresentative"> ## ## +## ## ## ## If elm is an element of the range of the general mapping @@ -1030,21 +1038,28 @@ DeclareOperation( "PreImageElm", ##

## 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 now checks that elm is an +## element of the range before calling PreImagesRepresentativeNC. ## ## ## <#/GAPDoc> ## -DeclareOperation( "PreImagesRepresentative", - [ IsGeneralMapping, IsObject ] ); +DeclareOperation( "PreImagesRepresentative", [ IsGeneralMapping, IsObject ] ); +DeclareOperation( "PreImagesRepresentativeNC", [ IsGeneralMapping, IsObject ] ); ############################################################################# ## #O PreImagesSet( , ) +#O PreImagesSetNC( , ) ## ## <#GAPDoc Label="PreImagesSet"> ## ## +## ## ## ## If elms is a subset of the range of the general mapping map @@ -1053,11 +1068,17 @@ DeclareOperation( "PreImagesRepresentative", ##

## 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 now checks that elm is an +## element of the range before calling PreImagesSetNC. ## ## ## <#/GAPDoc> ## DeclareOperation( "PreImagesSet", [ IsGeneralMapping, IsListOrCollection ] ); +DeclareOperation( "PreImagesSetNC", [ IsGeneralMapping, IsListOrCollection ] ); ############################################################################# @@ -1119,18 +1140,27 @@ DeclareGlobalFunction( "PreImage" ); ############################################################################# ## #F PreImages( ) . . . set of preimages of the range of a gen. mapping +#F PreImagesNC( ) . . 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 PreImagesNC(,) set of preimages of an elm under a gen. mapping +#F PreImages(,) set of preimages of a coll. under a gen. mapping +#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 @@ -1157,13 +1187,16 @@ DeclareGlobalFunction( "PreImage" ); ## and to resp. when ## called with two arguments. ##

-## If the second argument is not an element or a subset of the range of -## the first argument, an error is signalled. +## In order to improve this state of affairs, PreImages +## has been renamed PreImagesNC throughout the library, +## and PreImages now checks that elm or coll +## belong to the range before calling PreImagesNC. ## ## ## <#/GAPDoc> ## DeclareGlobalFunction( "PreImages" ); +DeclareGlobalFunction( "PreImagesNC" ); ############################################################################# diff --git a/lib/mapping.gi b/lib/mapping.gi index 7ae902e9717..f54e58ee2d9 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 @@ -1067,16 +1125,17 @@ InstallMethod( PreImageElm, "for inj. & surj. general mapping, and element", FamRangeEqFamElm, [ IsGeneralMapping and IsInjective and IsSurjective, IsObject ], 0, - PreImagesRepresentative ); + PreImagesRepresentativeNC ); ############################################################################# ## #M PreImagesElm( , ) . . . . . . for general mapping and element +#M PreImagesElmNC( , ) . . . . . 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 +1152,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 []; + else + return PreImagesElmNC( map, elm ); + fi; + end ); + ############################################################################# ## -#M PreImagesElm( , ) for const. time access gen. map., and elm. +#M PreImagesElm( , ) . for const. time access gen. map., and elm. +#M PreImagesElmNC( , ) 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,12 +1186,25 @@ 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 []; + 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, @@ -1129,12 +1215,31 @@ InstallMethod( PreImagesSet, fi; primgs:= []; for elm in Enumerator( elms ) do - UniteSet( primgs, AsList( PreImagesElm( map, elm ) ) ); + 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; + im:= Image( map ); + for elm in Enumerator( elms ) do + if not (elm in im ) then + return []; + fi; + od; + return PreImagesSetNC( map, elms ); + end ); + +InstallMethod( PreImagesSetNC, "for general mapping, and empty list", true, [ IsGeneralMapping, IsList and IsEmpty ], 0, @@ -1142,6 +1247,14 @@ InstallMethod( PreImagesSet, return []; end ); +InstallMethod( PreImagesSet, + "for general mapping, and empty list", + true, + [ IsGeneralMapping, IsList and IsEmpty ], 0, + function( map, elms ) + return []; + end ); + ############################################################################# ## @@ -1151,7 +1264,7 @@ InstallMethod( PreImagesRange, "for general mapping", true, [ IsGeneralMapping ], 0, - map -> PreImagesSet( map, Range( map ) ) ); + map -> PreImagesSetNC( map, Range( map ) ) ); ############################################################################# @@ -1169,6 +1282,7 @@ InstallMethod( PreImagesRange, ############################################################################# ## #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", @@ -1178,12 +1292,21 @@ InstallMethod( PreImagesRepresentative, Error( "no default method for s.p. general mapping" ); end ); +InstallMethod( PreImagesRepresentativeNC, + "for s.p. general mapping, and element", + FamRangeEqFamElm, + [ IsSPGeneralMapping, IsObject ], 0, + function( map, elm ) + Error( "no default method for s.p. general mapping" ); + end ); + ############################################################################# ## #M PreImagesRepresentative( , ) +#M PreImagesRepresentativeNC( , ) ## -InstallMethod( PreImagesRepresentative, +InstallMethod( PreImagesRepresentativeNC, "for total non-s.p. general mapping, and element", FamRangeEqFamElm, [ IsNonSPGeneralMapping, IsObject ], 0, @@ -1191,17 +1314,28 @@ InstallMethod( PreImagesRepresentative, 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 - return fail; + return []; fi; # pick one preimage, and return it. return Representative( pres ); end ); +InstallMethod( PreImagesRepresentative, + "for total non-s.p. general mapping, and element", + FamRangeEqFamElm, + [ IsNonSPGeneralMapping, IsObject ], 0, + function( map, elm ) + if not elm in Image( map ) then + return []; + fi; + return PreImagesRepresentativeNC( map, elm ); + end ); + ############################################################################# ## @@ -1459,7 +1593,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 96bf008e8b8..67ea3b12335 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 PreImagesElmMC( , ) . . . 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 e04c94eaa5d..d9a9923d6df 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 @@ -758,8 +758,8 @@ local m, fact, fg, reps, ma, idx, nm, embs, proj, kproj, k, ag, agl, ug, #phi:=ActionHomomorphism(fg,u.orbit,OnSets); #ue:=Image(phi,fg); #reps:=List([1..nlb],i->RepresentativeAction(ue,1,i)); - #reps:=List(reps,i->PreImagesRepresentative(phi,i)); - #reps:=List(reps,i->PreImagesRepresentative(fact,i)); + #reps:=List(reps,i->PreImagesRepresentativeNC(phi,i)); + #reps:=List(reps,i->PreImagesRepresentativeNC(fact,i)); #u:=u.stabilizer; uphi:=ActionHomomorphism(Image(fact,u),b); diff --git a/lib/mgmring.gi b/lib/mgmring.gi index 077f27c1538..f7a4688a362 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 0e927723996..9cb2957e145 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 7457f035e86..6323d1070da 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 c2b6d29723c..e1432730e38 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; @@ -171,7 +171,7 @@ local hom,fg,fpi,fpg,nt,fam; # else # old code # fpi:=IsomorphismFpGroup(ocr.group:noshort:=true); # ocr.generators:=List(MappingGeneratorsImages(fpi)[2], -# i->PreImagesRepresentative(fpi,i)); +# i->PreImagesRepresentativeNC(fpi,i)); # fi; fpg:=FreeGeneratorsOfFpGroup(Range(fpi)); ocr.factorpres:=[fpg,RelatorsOfFpGroup(Range(fpi))]; @@ -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 a7b758b73f9..9d12954fef7 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, filt, R, 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); @@ -3420,7 +3420,7 @@ end ); ############################################################################# ## -#M PreImagesRepresentative( , ) . . . . . . . . . . build matrix +#M PreImagesRepresentativeNC( , ) . . . . . . . . . build matrix ## ## The idea is as follows. ## We have an $F$-basis $(v_1, \ldots, v_n)$. @@ -3441,7 +3441,7 @@ end ); ## matrix group contains all scalar matrices, or we know that the preimage ## has determinant $1$ and taking the root in question is unique. ## -InstallMethod( PreImagesRepresentative,"IsProjectiveActionHomomorphism", +InstallMethod( PreImagesRepresentativeNC,"IsProjectiveActionHomomorphism", FamRangeEqFamElm, [ IsProjectiveActionHomomorphism, IsPerm ], 0, function( hom, elm ) local V, G, Grep, filt, R, mat, xset,lab,dim,sol,i; @@ -3457,7 +3457,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/oprtglat.gi b/lib/oprtglat.gi index b80acc2755d..43b45318052 100644 --- a/lib/oprtglat.gi +++ b/lib/oprtglat.gi @@ -224,7 +224,7 @@ local acts,gps,clusters,conj,ncl,nacts,i,j,new,q,hom,lhom,c,n,r,len, Info(InfoLattice,5,"reduced (factor) by ",Size(q)/Size(n)); Add(nacts,PreImage(lhom,n)); for k in new.clusters[j] do - r:=PreImagesRepresentative(lhom,new.conjugators[k]); + r:=PreImagesRepresentativeNC(lhom,new.conjugators[k]); conj[c[k]]:=conj[c[k]]*r; gps[c[k]]:=gps[c[k]]^r; od; diff --git a/lib/oprtperm.gi b/lib/oprtperm.gi index 0678e7eafbf..a1a1616b7c9 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 0496a0c212c..caa90d90ece 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 f57059f634b..e605798c0f5 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 e5208df4b7a..115e5409ae0 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 ## ############################################################################ ############################################################################ @@ -230,7 +230,7 @@ InstallMethod(IsReflexiveBinaryRelation, ## #P IsSymmetricBinaryRelation() ## -## Depends on Images and Preimages returning SSorted lists. +## Depends on Images and PreimagesNC returning SSorted lists. ## InstallMethod(IsSymmetricBinaryRelation, @@ -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 21791f48a8b..2dc8ab4bb76 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 f53b66dbdd0..b34a4608c94 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,7 @@ 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 +306,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 +351,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; @@ -401,13 +401,13 @@ local G,H,D,T,i,j,k,l,a,h,nk,evals,rels,gens,r,np,g,invlist,el,elp,TL,rp,pos; fi; np:=k*g; nk:=TL[PositionCanonical(T,np)]; - #h:=h*PreImagesRepresentative(s,np/nk); + #h:=h*PreImagesRepresentativeNC(s,np/nk); h:=h*elp[Position(el,np/nk)]; k:=nk; od; - #Print(PreImagesRepresentative(s,Image(s,h))*h,"\n"); - #a:=a/PreImagesRepresentative(s,Image(s,h))*h; + #Print(PreImagesRepresentativeNC(s,Image(s,h))*h,"\n"); + #a:=a/PreImagesRepresentativeNC(s,Image(s,h))*h; a:=a/h*elp[Position(el,Image(s,h))]; od; @@ -485,7 +485,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 +558,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 +579,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 dd0fad38fa0..f3bb8188cc8 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 f0b4eb00461..1d9ccd727f9 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 179e1f453a6..7af0728b1e4 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 4b6aee7a75f..daf0e145bf5 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, From 1f6bbafcbeb686978daeaf0db4edd4fc69da1927 Mon Sep 17 00:00:00 2001 From: cdwensley Date: Wed, 20 May 2026 19:01:26 +0100 Subject: [PATCH 2/7] added non-NC methods so that tests pass --- lib/alghom.gi | 32 ++-- lib/alglie.gi | 14 ++ lib/field.gi | 25 +++ lib/fldabnum.gi | 35 ++++- lib/ghom.gi | 11 ++ lib/ghomfp.gi | 25 +++ lib/ghompcgs.gi | 11 ++ lib/ghomperm.gi | 11 ++ lib/gprdmat.gi | 35 +++++ lib/gprdperm.gi | 47 ++++++ lib/grpmat.gi | 12 ++ lib/grpnice.gi | 12 ++ lib/liefam.gi | 11 ++ lib/mapprep.gi | 222 ++++++++++++++++++++++++++- lib/mgmring.gi | 43 ++++++ lib/morpheus.gi | 10 ++ lib/oprt.gi | 20 +++ lib/relation.gi | 34 ++++ lib/ringhom.gi | 13 ++ lib/vspchom.gi | 24 +++ tst/testbugfix/2012-11-25-t00264.tst | 4 +- 21 files changed, 629 insertions(+), 22 deletions(-) diff --git a/lib/alghom.gi b/lib/alghom.gi index 550ac43fd68..51147d67cda 100644 --- a/lib/alghom.gi +++ b/lib/alghom.gi @@ -576,7 +576,8 @@ InstallMethod( ImagesRepresentative, ############################################################################# ## -#M PreImagesRepresentativeNC( , ) . . . . . . for algebra g.m.b.i. +#M PreImagesRepresentativeNC( , ) . . . . . for algebra g.m.b.i. +#M PreImagesRepresentative( , ) . . . . . . for algebra g.m.b.i. ## InstallMethod( PreImagesRepresentativeNC, "for algebra g.m.b.i., and element", @@ -588,6 +589,18 @@ InstallMethod( PreImagesRepresentativeNC, AsLeftModuleGeneralMappingByImages(map), elm ); end ); +InstallMethod( PreImagesRepresentative, + "for algebra g.m.b.i., and element", + FamRangeEqFamElm, + [ IsGeneralMapping and IsAlgebraGeneralMappingByImagesDefaultRep, + IsObject ], + function( map, elm ) + if not ( elm in Range( map ) ) then + return fail; + fi; + return PreImagesRepresentativeNC( map, elm ); + end ); + ############################################################################# ## @@ -915,12 +928,6 @@ BindGlobal( "PreImagesRepresentativeOperationAlgebraHomomorphism", function( oph return mat; end ); -InstallMethod( PreImagesRepresentativeNC, - "for an operation algebra homomorphism, and an element", - FamRangeEqFamElm, - [ IsOperationAlgebraHomomorphismDefaultRep, IsMatrix ], - PreImagesRepresentativeOperationAlgebraHomomorphism ); - ############################################################################# ## @@ -1074,17 +1081,6 @@ InstallMethod( ImagesRepresentative, end ); -############################################################################# -## -#M PreImagesRepresentativeNC( , ) -## -InstallMethod( PreImagesRepresentativeNC, - "for an alg. hom. from f. p. algebra, and an element", - FamRangeEqFamElm, - [ IsAlgebraHomomorphismFromFpRep, IsMatrix ], - PreImagesRepresentativeOperationAlgebraHomomorphism ); - - ############################################################################# ## #M OperationAlgebraHomomorphism( , , ) diff --git a/lib/alglie.gi b/lib/alglie.gi index d3343f8fc4f..d682f714592 100644 --- a/lib/alglie.gi +++ b/lib/alglie.gi @@ -4018,6 +4018,7 @@ InstallMethod( ImagesRepresentative, ########################################################################### ## #M PreImagesRepresentativeNC( f, x ) +#M PreImagesRepresentative( f, x ) ## InstallMethod( PreImagesRepresentativeNC, "for Fp to SCA mapping, and element", @@ -4095,6 +4096,19 @@ InstallMethod( PreImagesRepresentativeNC, end); +InstallMethod( PreImagesRepresentative, + "for Fp to SCA mapping, and element", + FamRangeEqFamElm, + [ IsFptoSCAMorphism, IsSCAlgebraObj ], 0, + + function( f, x ) + if not ( x in Range( f ) ) then + return fail; + fi; + return PreImagesRepresentative( f, x ); + +end ); + ############################################################################# ## #M Dimension( ) diff --git a/lib/field.gi b/lib/field.gi index a65dd502660..ff2e31c3bad 100644 --- a/lib/field.gi +++ b/lib/field.gi @@ -1316,6 +1316,7 @@ InstallMethod( ImagesSet, ############################################################################# ## #M PreImagesElmNC( , ) . . . . . . . . . . . . preimage of an elm +#M PreImagesElm( , ) . . . . . . . . . . . . . preimage of an elm ## InstallMethod( PreImagesElmNC, "for field homomorphism and element", @@ -1331,10 +1332,22 @@ InstallMethod( PreImagesElmNC, fi; end ); +InstallMethod( PreImagesElm, + "for field homomorphism and element", + FamRangeEqFamElm, + [ IsFieldHomomorphism, IsObject ], + function ( hom, elm ) + if not (elm in Range(hom)) then + return []; + fi; + return PreImagesElm( hom, elm ); + end ); ############################################################################# ## #M PreImagesSetNC +#M PreImagesSet +## InstallMethod( PreImagesSetNC, "for field homomorphism and field", CollFamRangeEqFamElms, @@ -1345,3 +1358,15 @@ InstallMethod( PreImagesSetNC, UseSubsetRelation( Source( hom ), elms ); return elms; end ); + +InstallMethod( PreImagesSet, + "for field homomorphism and field", + CollFamRangeEqFamElms, + [ IsFieldHomomorphism, IsField ], + function ( hom, elms ) + if not IsSubset( Range(hom), elms ) then + return []; + fi; + return PreImagesSet( hom, elms ); + end ); + diff --git a/lib/fldabnum.gi b/lib/fldabnum.gi index 6fb312be2da..6c5f22d030d 100644 --- a/lib/fldabnum.gi +++ b/lib/fldabnum.gi @@ -1918,7 +1918,8 @@ InstallMethod( PreImageElm, ############################################################################# ## -#M PreImagesElmNC( , ) . . . . . . for autom. of ab. number fields +#M PreImagesElmNC( , ) . . . . . for autom. of ab. number fields +#M PreImagesElm( , ) . . . . . . for autom. of ab. number fields ## InstallMethod( PreImagesElmNC, "for ANF automorphism and scalar", @@ -1929,10 +1930,21 @@ InstallMethod( PreImagesElmNC, mod Conductor( Range( aut ) ) ) ]; end ); +InstallMethod( PreImagesElm, + "for ANF automorphism and scalar", + FamRangeEqFamElm, + [ IsFieldHomomorphism and IsANFAutomorphismRep, IsScalar ], + function ( aut, elm ) + if not ( elm in Range(aut) ) then + return []; + fi; + return PreImagesElmNC( aut, elm ); + end ); ############################################################################# ## #M PreImagesSetNC( , ) . . . . . for autom. of ab. number fields +#M PreImagesSet( , ) . . . . . . for autom. of ab. number fields ## InstallMethod( PreImagesSetNC, "for ANF automorphism and scalar", @@ -1942,10 +1954,21 @@ InstallMethod( PreImagesSetNC, return F; end ); +InstallMethod( PreImagesSet, + "for ANF automorphism and scalar", + CollFamRangeEqFamElms, + [ IsFieldHomomorphism and IsANFAutomorphismRep, IsField ], + function ( aut, F ) + if not IsSubset( Range(aut), F ) then + return []; + fi; + return PreImagesSetNC( aut, F ); + end ); ############################################################################# ## #M PreImagesRepresentativeNC( , ) for autom. of ab. number fields +#M PreImagesRepresentative( , ) . for autom. of ab. number fields ## InstallMethod( PreImagesRepresentativeNC, "for ANF automorphism and scalar", @@ -1956,6 +1979,16 @@ InstallMethod( PreImagesRepresentativeNC, mod Conductor( Range( aut ) ) ); end ); +InstallMethod( PreImagesRepresentative, + "for ANF automorphism and scalar", + FamRangeEqFamElm, + [ IsFieldHomomorphism and IsANFAutomorphismRep, IsScalar ], + function ( aut, elm ) + if not ( elm in Range( aut ) ) then + return fail; + fi; + return PreImagesRepresentativeNC( aut, elm ); + end ); ############################################################################# ## diff --git a/lib/ghom.gi b/lib/ghom.gi index 8047a392066..29caa4a36bd 100644 --- a/lib/ghom.gi +++ b/lib/ghom.gi @@ -254,6 +254,7 @@ end ); ############################################################################# ## #M PreImagesRepresentativeNC( , ) . . . . . . . . . . via images +#M PreImagesRepresentative( , ) . . . . . . . . . . . via images InstallMethod( PreImagesRepresentativeNC, "for PBG-Hom", FamRangeEqFamElm, [ IsPreimagesByAsGroupGeneralMappingByImages, @@ -268,6 +269,16 @@ function( hom, elm ) fi; end ); +InstallMethod( PreImagesRepresentative, "for PBG-Hom", FamRangeEqFamElm, + [ IsPreimagesByAsGroupGeneralMappingByImages, + IsMultiplicativeElementWithInverse ], 0, +function( hom, elm ) + if not ( elm in Range( hom ) ) then + return fail; + fi; + return PreImagesRepresentativeNC( hom, elm ); +end ); + InstallAttributeMethodByGroupGeneralMappingByImages( CoKernelOfMultiplicativeGeneralMapping ); InstallAttributeMethodByGroupGeneralMappingByImages( KernelOfMultiplicativeGeneralMapping ); InstallAttributeMethodByGroupGeneralMappingByImages( PreImagesRange ); diff --git a/lib/ghomfp.gi b/lib/ghomfp.gi index fb2ce5f0737..be891d7ee9b 100644 --- a/lib/ghomfp.gi +++ b/lib/ghomfp.gi @@ -528,6 +528,7 @@ end); ############################################################################# ## #M PreImagesSetNC( , ) +#M PreImagesSet( , ) ## InstallMethod( PreImagesSetNC, "map from (sub)group of fp group", CollFamRangeEqFamElms, @@ -624,6 +625,16 @@ local s,gens,t,p,w,c,q,chom,tg,thom,hi,i,lp,max; return SubgroupOfWholeGroupByQuotientSubgroup(FamilyObj(s),u,Stabilizer(u,1)); end); +InstallMethod( PreImagesSet, "map from (sub)group of fp group", + CollFamRangeEqFamElms, + [ IsFromFpGroupHomomorphism,IsGroup ],0, +function(hom,u) + if not (u in Range(hom)) then + return []; + fi; + return PreImagesSetNC(hom,u); +end); + ############################################################################# ## @@ -719,6 +730,7 @@ end); ############################################################################# ## #M PreImagesRepresentativeNC +#M PreImagesRepresentative ## InstallMethod( PreImagesRepresentativeNC, "hom. to standard generators of fp group, using 'MappedWord'", @@ -747,6 +759,19 @@ local mapi; return mapi; end); +InstallMethod( PreImagesRepresentative, + "hom. to standard generators of fp group, using 'MappedWord'", + FamRangeEqFamElm, + [IsToFpGroupHomomorphismByImages,IsMultiplicativeElementWithInverse], + 1, +function(hom,elm) + if not (elm in Range(hom)) then + return fail; + fi; + return PreImagesRepresentativeNC(hom,elm); +end); + + ############################################################################# ## ## methods to construct homomorphisms to fp groups diff --git a/lib/ghompcgs.gi b/lib/ghompcgs.gi index 78ba75b3397..984f80f3f36 100644 --- a/lib/ghompcgs.gi +++ b/lib/ghompcgs.gi @@ -504,6 +504,7 @@ end); ############################################################################# ## #M PreImagesRepresentativeNC( , ) . . . . . . . . . . via images +#M PreImagesRepresentative( , ) . . . . . . . . . . . via images ## InstallMethod( PreImagesRepresentativeNC, "method for pcgs hom", FamRangeEqFamElm, @@ -530,6 +531,16 @@ function( hom, elm ) return pre; end); +InstallMethod( PreImagesRepresentative, "method for pcgs hom", + FamRangeEqFamElm, + [ IsToPcGroupHomomorphismByImages,IsMultiplicativeElementWithInverse ], 0, +function( hom, elm ) + if not ( elm in Range( hom ) ) then + return fail; + fi; + return PreImagesRepresentativeNC( hom, elm ); +end ); + ############################################################################# ## #M NaturalHomomorphismByNormalSubgroup( , ) . . . . . . for pc groups diff --git a/lib/ghomperm.gi b/lib/ghomperm.gi index 7bf4a40a70c..8b5c6a79dd4 100644 --- a/lib/ghomperm.gi +++ b/lib/ghomperm.gi @@ -1163,6 +1163,7 @@ end); ############################################################################# ## #M PreImagesRepresentativeNC( , ) . . . . . for perm group range +#M PreImagesRepresentative( , ) . . . . . . for perm group range ## InstallMethod( PreImagesRepresentativeNC, FamRangeEqFamElm, [ IsToPermGroupGeneralMappingByImages, @@ -1171,6 +1172,16 @@ InstallMethod( PreImagesRepresentativeNC, FamRangeEqFamElm, return ImagesRepresentative( RestrictedInverseGeneralMapping( hom ), elm ); end ); +InstallMethod( PreImagesRepresentative, FamRangeEqFamElm, + [ IsToPermGroupGeneralMappingByImages, + IsMultiplicativeElementWithInverse ], 0, + function( hom, elm ) + if not ( elm in Range( hom ) ) then + return fail; + fi; + return PreImagesRepresentativeNC( hom, elm ); +end ); + ############################################################################# ## #F StabChainPermGroupToPermGroupGeneralMappingByImages( ) . . . local diff --git a/lib/gprdmat.gi b/lib/gprdmat.gi index c5821733500..d73b63e568a 100644 --- a/lib/gprdmat.gi +++ b/lib/gprdmat.gi @@ -144,6 +144,7 @@ end); ############################################################################# ## #M PreImagesRepresentativeNC(,) . . . . . . . . . . . of embedding +#M PreImagesRepresentative(,) . . . . . . . . . . . . of embedding ## InstallMethod(PreImagesRepresentativeNC,"matrix direct product embedding", FamRangeEqFamElm, @@ -162,6 +163,17 @@ local info,a,b; fi; end); +InstallMethod(PreImagesRepresentative,"matrix direct product embedding", + FamRangeEqFamElm, + [ IsEmbeddingDirectProductMatrixGroup, + IsMultiplicativeElementWithInverse ], +function(emb,g) + if not (g in Range(emb)) then + return fail; + fi; + return PreImagesRepresentativeNC(emb,g); +end); + ############################################################################# ## #R IsProjectionDirectProductMatrixGroup() projection onto direct factor @@ -207,6 +219,7 @@ end); ############################################################################# ## #M PreImagesRepresentativeNC(,) . . . . . . . . . . . of projection +#M PreImagesRepresentative(,) . . . . . . . . . . . . of projection ## InstallMethod(PreImagesRepresentativeNC,"matrix direct product projection", FamRangeEqFamElm, @@ -220,6 +233,17 @@ local info,a; return ImmutableMatrix(info.field,a); end); +InstallMethod(PreImagesRepresentative,"matrix direct product projection", + FamRangeEqFamElm, + [ IsProjectionDirectProductMatrixGroup, + IsMultiplicativeElementWithInverse ],0, +function(prj,m) + if not (m in Range(prj)) then + return fail; + fi; + return PreImagesRepresentativeNC(prj,m); +end); + ############################################################################# ## #M KernelOfMultiplicativeGeneralMapping() . . . . . . . of projection @@ -383,6 +407,7 @@ end); ############################################################################# ## #M PreImagesRepresentativeNC( , ) . . . . . . . . . . of embedding +#M PreImagesRepresentative( , ) . . . . . . . . . . . of embedding ## InstallMethod( PreImagesRepresentativeNC, "imprim matrix wreath product embedding", FamRangeEqFamElm, @@ -401,6 +426,16 @@ local info,a,b; fi; end); +InstallMethod( PreImagesRepresentative, + "imprim matrix wreath product embedding", FamRangeEqFamElm, + [ IsEmbeddingImprimitiveWreathProductMatrixGroup, + IsMultiplicativeElementWithInverse ], 0, +function( emb, g ) + if not (g in Range(emb)) then + return fail; + fi; + return PreImagesRepresentativeNC(emb,g); +end); ############################################################################# ## diff --git a/lib/gprdperm.gi b/lib/gprdperm.gi index 36973b6b466..75583f7a0d8 100644 --- a/lib/gprdperm.gi +++ b/lib/gprdperm.gi @@ -170,6 +170,7 @@ end ); ############################################################################# ## #M PreImagesRepresentativeNC( , ) . . . . . . . . . . of embedding +#M PreImagesRepresentative( , ) . . . . . . . . . . . of embedding ## InstallMethod( PreImagesRepresentativeNC, "perm direct product embedding", FamRangeEqFamElm, @@ -191,6 +192,17 @@ InstallMethod( PreImagesRepresentativeNC, "perm direct product embedding", fi; end ); +InstallMethod( PreImagesRepresentative, "perm direct product embedding", + FamRangeEqFamElm, + [ IsEmbeddingDirectProductPermGroup, + IsMultiplicativeElementWithInverse ], + function( emb, g ) + if not ( g in Range( emb ) ) then + return fail; + fi; + return PreImagesRepresentativeNC( emb, g ); +end ); + ############################################################################# ## #M ImagesSource( ) . . . . . . . . . . . . . . . . . . . of embedding @@ -293,6 +305,7 @@ end ); ############################################################################# ## #M PreImagesRepresentativeNC( , ) . . . . . . . . . . of projection +#M PreImagesRepresentative( , ) . . . . . . . . . . . of projection ## InstallMethod( PreImagesRepresentativeNC,"perm direct product projection", FamRangeEqFamElm, @@ -302,6 +315,17 @@ InstallMethod( PreImagesRepresentativeNC,"perm direct product projection", return g ^ DirectProductInfo( Source( prj ) ).perms[ prj!.component ]; end ); +InstallMethod( PreImagesRepresentative,"perm direct product projection", + FamRangeEqFamElm, + [ IsProjectionDirectProductPermGroup, + IsMultiplicativeElementWithInverse ], 0, + function( prj, g ) + if not ( g in Range( prj ) ) then + return fail; + fi; + return PreImagesRepresentativeNC( prj, g ); +end ); + ############################################################################# ## #M KernelOfMultiplicativeGeneralMapping( ) . . . . . . . of projection @@ -467,6 +491,7 @@ end ); ############################################################################# ## #M PreImagesRepresentativeNC( , ) . . . . . . . . . . of projection +#M PreImagesRepresentative( , ) . . . . . . . . . . . of projection ## InstallMethod( PreImagesRepresentativeNC,"perm subdirect product projection", FamRangeEqFamElm, @@ -498,6 +523,17 @@ InstallMethod( PreImagesRepresentativeNC,"perm subdirect product projection", return elm; end ); +InstallMethod( PreImagesRepresentative,"perm subdirect product projection", + FamRangeEqFamElm, + [ IsProjectionSubdirectProductPermGroup, + IsMultiplicativeElementWithInverse ], 0, + function( prj, img ) + if not ( img in Range( prj ) ) then + return fail; + fi; + return PreImagesRepresentativeNC( prj, img ); +end ); + ############################################################################# ## #M KernelOfMultiplicativeGeneralMapping( ) . . . . . . . of projection @@ -800,6 +836,7 @@ end ); ############################################################################# ## #M PreImagesRepresentativeNC( , ) . . . . . . . . . . of embedding +#M PreImagesRepresentative( , ) . . . . . . . . . . . of embedding ## InstallMethod( PreImagesRepresentativeNC, "imprim perm wreath product embedding", FamRangeEqFamElm, @@ -820,6 +857,16 @@ InstallMethod( PreImagesRepresentativeNC, ^ (info.perms[ emb!.component ] ^ -1); end ); +InstallMethod( PreImagesRepresentative, + "imprim perm wreath product embedding", FamRangeEqFamElm, + [ IsEmbeddingImprimitiveWreathProductPermGroup, + IsMultiplicativeElementWithInverse ], 0, + function( emb, g ) + if not ( g in Range( emb ) ) then + return fail; + fi; + return PreImagesRepresentativeNC( emb, g ); +end ); ############################################################################# ## diff --git a/lib/grpmat.gi b/lib/grpmat.gi index 17eae4f5e07..65104b3aa46 100644 --- a/lib/grpmat.gi +++ b/lib/grpmat.gi @@ -1203,6 +1203,7 @@ InstallMethod( ImagesRepresentative, ############################################################################# ## #M PreImagesRepresentativeNC( , ) . . . for a blow up isomorphism +#M PreImagesRepresentative( , ) . . . . for a blow up isomorphism ## InstallMethod( PreImagesRepresentativeNC, "for a blow up isomorphism, and a matrix in the range", @@ -1257,6 +1258,17 @@ InstallMethod( PreImagesRepresentativeNC, return preim; end ); +InstallMethod( PreImagesRepresentative, + "for a blow up isomorphism, and a matrix in the range", + FamRangeEqFamElm, + [ IsBlowUpIsomorphism, IsMatrix ], + function( iso, mat ) + if not ( mat in Range(iso) ) then + return fail; + fi; + return PreImagesRepresentativeNC( iso, mat ); + end ); + ############################################################################# ## diff --git a/lib/grpnice.gi b/lib/grpnice.gi index 6e3db2bd6f8..25f7d780451 100644 --- a/lib/grpnice.gi +++ b/lib/grpnice.gi @@ -973,6 +973,7 @@ end); ############################################################################# ## #M PreImagesRepresentativeNC( , ) . . . . . . . . . . via images +#M PreImagesRepresentative( , ) . . . . . . . . . . . via images ## InstallMethod( PreImagesRepresentativeNC, "for PBG-Niceo", FamRangeEqFamElm, @@ -988,6 +989,17 @@ local p, tmp; return p; end ); +InstallMethod( PreImagesRepresentative, "for PBG-Niceo", + FamRangeEqFamElm, + [ IsPreimagesByAsGroupGeneralMappingByImages and IsNiceMonomorphism, + IsMultiplicativeElementWithInverse ], 0, +function( hom, elm ) + if not ( elm in Range(hom) ) then + return fail; + fi; + return PreImagesRepresentativeNC( hom, elm ); +end ); + ############################################################################# ## #M NiceMonomorphism( ) . . diff --git a/lib/liefam.gi b/lib/liefam.gi index ca6c3161c66..0a5590b03d2 100644 --- a/lib/liefam.gi +++ b/lib/liefam.gi @@ -456,6 +456,17 @@ InstallMethod( PreImagesElmNC, return [ elm![1] ]; end ); +InstallMethod( PreImagesElm, + "for Lie embedding and Lie object in default representation", + FamRangeEqFamElm, + [ IsGeneralMapping and IsLieEmbeddingRep, + IsLieObject and IsPackedElementDefaultRep ], 0, + function( emb, elm ) + if not ( elm in Range(emb) ) then + return []; + fi; + return PreImagesElm( emb, elm ); + end ); ############################################################################# ## diff --git a/lib/mapprep.gi b/lib/mapprep.gi index 67ea3b12335..8b3ebe6fc29 100644 --- a/lib/mapprep.gi +++ b/lib/mapprep.gi @@ -303,6 +303,7 @@ InstallMethod( ImagesRepresentative, ############################################################################# ## #M PreImagesElmNC( , ) . . . . . . . . . for composition mapping +#M PreImagesElm( , ) . . . . . . . . . . for composition mapping ## InstallMethod( PreImagesElmNC, "for a composition mapping, and an element", @@ -318,10 +319,22 @@ InstallMethod( PreImagesElmNC, fi; end ); +InstallMethod( PreImagesElm, + "for a composition mapping, and an element", + FamRangeEqFamElm, + [ IsCompositionMappingRep, IsObject ], 0, + function( com, elm ) + if not ( elm in Range(com) ) then + return []; + fi; + return PreImagesElmNC( com, elm ); + end ); + ############################################################################# ## #M PreImagesSetNC( , ) . . . . . . . . . for composition mapping +#M PreImagesSet( , ) . . . . . . . . . . for composition mapping ## InstallMethod( PreImagesSetNC, "for a composition mapping, and a collection", @@ -337,10 +350,22 @@ InstallMethod( PreImagesSetNC, fi; end ); +InstallMethod( PreImagesSet, + "for a composition mapping, and a collection", + CollFamRangeEqFamElms, + [ IsCompositionMappingRep, IsCollection ], 0, + function( com, elms ) + if not IsSubset( Range(com), elms ) then + return []; + fi; + return PreImagesSetNC( com, elms ); + end ); + ############################################################################# ## #M PreImagesRepresentativeNC( , ) . . . . for composition mapping +#M PreImagesRepresentative( , ) . . . . . for composition mapping ## InstallMethod( PreImagesRepresentativeNC, "for a composition mapping, and an element", @@ -369,6 +394,17 @@ InstallMethod( PreImagesRepresentativeNC, fi; end ); +InstallMethod( PreImagesRepresentative, + "for a composition mapping, and an element", + FamRangeEqFamElm, + [ IsCompositionMappingRep, IsObject ], 0, + function( com, elm ) + if not ( elm in Range(com) ) then + return fail; + fi; + return PreImagesRepresentativeNC( com, elm ); + end ); + ############################################################################# ## @@ -629,7 +665,8 @@ end ); ############################################################################# ## -#M PreImagesRepresentativeNC( , ) . . . . . for mapping by function +#M PreImagesRepresentativeNC( , ) . . . . for mapping by function +#M PreImagesRepresentative( , ) . . . . . for mapping by function ## InstallMethod( PreImagesRepresentativeNC, "for mapping by function", @@ -643,6 +680,17 @@ InstallMethod( PreImagesRepresentativeNC, return map!.prefun( elm ); end ); +InstallMethod( PreImagesRepresentative, + "for mapping by function", + FamRangeEqFamElm, + [ IsMappingByFunctionRep, IsObject ], 0, + function ( map, elm ) + if not ( elm in Range(map) ) then + return fail; + fi; + return PreImagesRepresentativeNC( map, elm ); + end ); + ############################################################################# ## @@ -660,6 +708,7 @@ InstallMethod( PreImageElm, ############################################################################# ## #M PreImagesElmNC( , ) . . . . . . . . . . for mapping by function +#M PreImagesElm( , ) . . . . . . . . . . . for mapping by function ## InstallMethod( PreImagesElmNC, "for mapping by function", @@ -669,9 +718,22 @@ InstallMethod( PreImagesElmNC, return [ map!.invFun( elm ) ]; end ); +InstallMethod( PreImagesElm, + "for mapping by function", + FamRangeEqFamElm, + [ IsMappingByFunctionWithInverseRep, IsObject ], 0, + function ( map, elm ) + if not ( elm in Range(map) ) then + return []; + fi; + return PreImagesElmNC( map, elm ); + end ); + + ############################################################################# ## #M PreImagesRepresentativeNC( , ) . . . . for mapping by function +#M PreImagesRepresentative( , ) . . . . . for mapping by function ## InstallMethod( PreImagesRepresentativeNC, "for mapping by function with inverse", @@ -681,6 +743,16 @@ InstallMethod( PreImagesRepresentativeNC, return map!.invFun( elm ); end ); +InstallMethod( PreImagesRepresentative, + "for mapping by function with inverse", + FamRangeEqFamElm, + [ IsMappingByFunctionWithInverseRep, IsObject ], 0, + function ( map, elm ) + if not ( elm in Range(map) ) then + return fail; + fi; + return PreImagesRepresentativeNC( map, elm ); + end ); ############################################################################# @@ -1055,6 +1127,7 @@ InstallMethod( PreImageElm, ############################################################################# ## #M PreImagesElmNC( , ) . . . . for inverse mapping and element +#M PreImagesElm( , ) . . . . . for inverse mapping and element ## InstallMethod( PreImagesElmNC, "for an inverse mapping and an element", @@ -1064,10 +1137,22 @@ InstallMethod( PreImagesElmNC, return ImagesElm( InverseGeneralMapping( inv ), elm ); end ); +InstallMethod( PreImagesElm, + "for an inverse mapping and an element", + FamRangeEqFamElm, + [ IsGeneralMapping and IsInverseGeneralMappingRep, IsObject ], 0, + function ( inv, elm ) + if not ( elm in Range(inv) ) then + return []; + fi; + return PreImagesElmNC( inv, elm ); + end ); + ############################################################################# ## #M PreImagesSetNC( , ) . . for inverse mapping and collection +#M PreImagesSet( , ) . . . for inverse mapping and collection ## InstallMethod( PreImagesSetNC, "for an inverse mapping and a collection", @@ -1077,10 +1162,22 @@ InstallMethod( PreImagesSetNC, return ImagesSet( InverseGeneralMapping( inv ), elms ); end ); +InstallMethod( PreImagesSet, + "for an inverse mapping and a collection", + CollFamRangeEqFamElms, + [ IsGeneralMapping and IsInverseGeneralMappingRep, IsCollection ], 0, + function ( inv, elms ) + if not IsSubset( Range(inv), elms ) then + return []; + fi; + return PreImagesSetNC( inv, elms ); + end ); + ############################################################################# ## #M PreImagesRepresentativeNC( , ) . . for inv. mapping and elm. +#M PreImagesRepresentative( , ) . . . for inv. mapping and elm. ## InstallMethod( PreImagesRepresentativeNC, "for an inverse mapping and an element", @@ -1090,6 +1187,17 @@ InstallMethod( PreImagesRepresentativeNC, return ImagesRepresentative( InverseGeneralMapping( inv ), elm ); end ); +InstallMethod( PreImagesRepresentative, + "for an inverse mapping and an element", + FamRangeEqFamElm, + [ IsInverseGeneralMappingRep, IsObject ], 0, + function ( inv, elm ) + if not ( elm in Range(inv) ) then + return fail; + fi; + return PreImagesRepresentativeNC( inv, elm ); + end ); + ############################################################################# ## @@ -1294,6 +1402,7 @@ InstallMethod( PreImageElm, ############################################################################# ## #M PreImagesElmMC( , ) . . . for identity mapping and element +#M PreImagesElm( , ) . . . . for identity mapping and element ## InstallMethod( PreImagesElmNC, "for identity mapping and object", @@ -1304,10 +1413,23 @@ InstallMethod( PreImagesElmNC, return [ elm ]; end ); +InstallMethod( PreImagesElm, + "for identity mapping and object", + FamRangeEqFamElm, + [ IsGeneralMapping and IsOne, IsObject ], + SUM_FLAGS, # can't do better + function ( id, elm ) + if not ( elm in Range(id) ) then + return []; + fi; + return PreImagesElmNC( id, elm ); + end ); + ############################################################################# ## #M PreImagesSetNC( , ) . . for identity mapping and collection +#M PreImagesSet( , ) . . . for identity mapping and collection ## InstallMethod( PreImagesSetNC, "for identity mapping and collection", @@ -1318,10 +1440,23 @@ InstallMethod( PreImagesSetNC, return elms; end ); +InstallMethod( PreImagesSet, + "for identity mapping and collection", + CollFamRangeEqFamElms, + [ IsGeneralMapping and IsOne, IsCollection ], + SUM_FLAGS, # can't do better + function ( id, elms ) + if not IsSubset( Range(id), elms ) then + return []; + fi; + return PreImagesSetNC( id, elms ); + end ); + ############################################################################# ## #M PreImagesRepresentativeNC( , ) +#M PreImagesRepresentative( , ) ## InstallMethod( PreImagesRepresentativeNC, "for identity mapping and object", @@ -1332,6 +1467,17 @@ InstallMethod( PreImagesRepresentativeNC, return elm; end ); +InstallMethod( PreImagesRepresentative, + "for identity mapping and object", + FamRangeEqFamElm, + [ IsGeneralMapping and IsOne, IsObject ], + SUM_FLAGS, # can't do better + function ( id, elm ) + if not ( elm in Range(id) ) then + return fail; + fi; + return elm; + end ); ############################################################################# ## @@ -1582,6 +1728,7 @@ InstallMethod( ImagesRepresentative, ############################################################################# ## #M PreImagesElmNC( , ) . . . . for zero mapping and element +#M PreImagesElm( , ) . . . . . for zero mapping and element ## InstallMethod( PreImagesElmNC, "for zero mapping and object", @@ -1595,10 +1742,22 @@ InstallMethod( PreImagesElmNC, fi; end ); +InstallMethod( PreImagesElm, + "for zero mapping and object", + FamRangeEqFamElm, + [ IsGeneralMapping and IsZero, IsObject ], SUM_FLAGS, + function( zero, elm ) + if not ( elm in Range(zero) ) then + return []; + fi; + return PreImagesElmNC( zero, elm ); + end ); + ############################################################################# ## #M PreImagesSetNC( , ) . . . for zero mapping and collection +#M PreImagesSet( , ) . . . . for zero mapping and collection ## InstallMethod( PreImagesSetNC, "for zero mapping and collection", @@ -1612,10 +1771,22 @@ InstallMethod( PreImagesSetNC, fi; end ); +InstallMethod( PreImagesSet, + "for zero mapping and collection", + CollFamRangeEqFamElms, + [ IsGeneralMapping and IsZero, IsCollection ], SUM_FLAGS, + function( zero, elms ) + if not IsSubset( Range(zero), elms ) then + return []; + fi; + return PreImagesSetNC( zero, elms ); + end ); + ############################################################################# ## #M PreImagesRepresentativeNC( , ) +#M PreImagesRepresentative( , ) ## InstallMethod( PreImagesRepresentativeNC, "for zero mapping and object", @@ -1629,6 +1800,17 @@ InstallMethod( PreImagesRepresentativeNC, fi; end ); +InstallMethod( PreImagesRepresentative, + "for zero mapping and object", + FamRangeEqFamElm, + [ IsGeneralMapping and IsZero, IsObject ], SUM_FLAGS, + function( zero, elm ) + if not ( elm in Range(zero) ) then + return fail; + fi; + return PreImagesRepresentativeNC( zero, elm ); + end ); + ############################################################################# ## @@ -1818,6 +2000,7 @@ end ); ############################################################################# ## #M PreImagesElmNC( , ) . . . . . . . . . for restricted mapping +#M PreImagesElm( , ) . . . . . . . . . . for restricted mapping ## InstallMethod( PreImagesElmNC, "for a restricted mapping, and an element", @@ -1831,12 +2014,24 @@ InstallMethod( PreImagesElmNC, preim:=Intersection(Source(res),preim); fi; return preim; -end ); + end ); + +InstallMethod( PreImagesElm, + "for a restricted mapping, and an element", + FamRangeEqFamElm, + [ IsGeneralRestrictedMappingRep, IsObject ], 0, + function( res, elm ) + if not ( elm in Range(res) ) then + return []; + fi; + return PreImagesElmNC( res, elm ); + end ); ############################################################################# ## #M PreImagesSetNC( , ) . . . . . . . . . for restricted mapping +#M PreImagesSet( , ) . . . . . . . . . . for restricted mapping ## InstallMethod( PreImagesSetNC, "for a restricted mapping, and a collection", @@ -1852,10 +2047,22 @@ InstallMethod( PreImagesSetNC, return preim; end ); +InstallMethod( PreImagesSet, + "for a restricted mapping, and a collection", + CollFamRangeEqFamElms, + [ IsGeneralRestrictedMappingRep, IsCollection ], 0, + function( res, elms ) + if not IsSubset( Range(res), elms ) then + return []; + fi; + return PreImagesSetNC( res, elms ); + end ); + ############################################################################# ## #M PreImagesRepresentativeNC( , ) . . . . for restricted mapping +#M PreImagesRepresentative( , ) . . . . . for restricted mapping ## InstallMethod( PreImagesRepresentativeNC, "for a restricted mapping, and an element", @@ -1877,6 +2084,17 @@ InstallMethod( PreImagesRepresentativeNC, fi; end ); +InstallMethod( PreImagesRepresentative, + "for a restricted mapping, and an element", + FamRangeEqFamElm, + [ IsGeneralRestrictedMappingRep, IsObject ], 0, + function( res, elm ) + if not ( elm in Range(res) ) then + return fail; + fi; + return PreImagesRepresentativeNC( res, elm ); + end ); + ############################################################################# ## diff --git a/lib/mgmring.gi b/lib/mgmring.gi index f7a4688a362..d4d0771b799 100644 --- a/lib/mgmring.gi +++ b/lib/mgmring.gi @@ -1236,6 +1236,17 @@ InstallMethod( PreImagesElmNC, fi; end ); +InstallMethod( PreImagesElm, + "for embedding of ring into magma ring, and free magma ring element", + FamRangeEqFamElm, + [ IsEmbeddingRingMagmaRing, IsElementOfFreeMagmaRing ], + function ( emb, elm ) + if not ( elm in Range( emb ) ) then + return fail; + fi; + return PreImagesElm( emb, elm ); + end ); + InstallMethod( PreImagesRepresentativeNC, "for embedding of ring into magma ring, and free magma ring element", FamRangeEqFamElm, @@ -1252,6 +1263,17 @@ InstallMethod( PreImagesRepresentativeNC, fi; end ); +InstallMethod( PreImagesRepresentative, + "for embedding of ring into magma ring, and free magma ring element", + FamRangeEqFamElm, + [ IsEmbeddingRingMagmaRing, IsElementOfFreeMagmaRing ], + function ( emb, elm ) + if not ( elm in Range( emb ) ) then + return fail; + fi; + return PreImagesRepresentativeNC( emb, elm ); + end ); + ############################################################################# ## @@ -1340,6 +1362,17 @@ InstallMethod( PreImagesElmNC, fi; end ); +InstallMethod( PreImagesElm, + "for embedding of magma into magma ring, and free magma ring element", + FamRangeEqFamElm, + [ IsEmbeddingMagmaMagmaRing, IsElementOfFreeMagmaRing ], + function ( emb, elm ) + if not ( elm in Range( emb ) ) then + return fail; + fi; + return PreImagesElmNC( emb, elm ); + end ); + InstallMethod( PreImagesRepresentativeNC, "for embedding of magma into magma ring, and free magma ring element", FamRangeEqFamElm, @@ -1356,6 +1389,16 @@ InstallMethod( PreImagesRepresentativeNC, fi; end ); +InstallMethod( PreImagesRepresentative, + "for embedding of magma into magma ring, and free magma ring element", + FamRangeEqFamElm, + [ IsEmbeddingMagmaMagmaRing, IsElementOfFreeMagmaRing ], + function ( emb, elm ) + if not ( elm in Range( emb ) ) then + return fail; + fi; + return PreImagesRepresentativeNC( emb, elm ); + end ); ############################################################################# ## diff --git a/lib/morpheus.gi b/lib/morpheus.gi index 9cb2957e145..a440d864fcf 100644 --- a/lib/morpheus.gi +++ b/lib/morpheus.gi @@ -1071,6 +1071,7 @@ end); ############################################################################# ## #M PreImagesRepresentativeNC for OpHomAutomGrp +#M PreImagesRepresentative. for OpHomAutomGrp ## InstallMethod(PreImagesRepresentativeNC,"AutomGroup Niceomorphism", FamRangeEqFamElm,[IsActionHomomorphismAutomGroup,IsPerm],0, @@ -1086,6 +1087,15 @@ local xset,g,imgs; return elm; end); +InstallMethod(PreImagesRepresentative,"AutomGroup Niceomorphism", + FamRangeEqFamElm,[IsActionHomomorphismAutomGroup,IsPerm],0, +function(hom,elm) + if not (elm in Range(hom)) then + return fail; + fi; + return PreImagesRepresentativeNC(hom,elm); +end); + ############################################################################# ## diff --git a/lib/oprt.gi b/lib/oprt.gi index 9d12954fef7..2a36087133a 100644 --- a/lib/oprt.gi +++ b/lib/oprt.gi @@ -3375,6 +3375,7 @@ end ); ############################################################################# ## #M PreImagesRepresentativeNC( , ) . . . . . . . . . build matrix +#M PreImagesRepresentative( , ) . . . . . . . . . . build matrix ## InstallMethod( PreImagesRepresentativeNC,"IsLinearActionHomomorphism", FamRangeEqFamElm, [ IsLinearActionHomomorphism, IsPerm ], 0, @@ -3418,9 +3419,19 @@ function( hom, elm ) return hom!.linActInverse*elm; end ); +InstallMethod( PreImagesRepresentative,"IsLinearActionHomomorphism", + FamRangeEqFamElm, [ IsLinearActionHomomorphism, IsPerm ], 0, +function( hom, elm ) + if not ( elm in Range( hom ) ) then + return fail; + fi; + return PreImagesRepresentativeNC( hom, elm ); +end ); + ############################################################################# ## #M PreImagesRepresentativeNC( , ) . . . . . . . . . build matrix +#M PreImagesRepresentative( , ) . . . . . . . . . . build matrix ## ## The idea is as follows. ## We have an $F$-basis $(v_1, \ldots, v_n)$. @@ -3493,6 +3504,15 @@ function( hom, elm ) return MakeImmutable( mat ); end); +InstallMethod( PreImagesRepresentative,"IsProjectiveActionHomomorphism", + FamRangeEqFamElm, [ IsProjectiveActionHomomorphism, IsPerm ], 0, +function( hom, elm ) + if not ( elm in Range( hom ) ) then + return fail; + fi; + return PreImagesRepresentativeNC( hom, elm ); +end); + ############################################################################# ## #A LinearActionBasis() diff --git a/lib/relation.gi b/lib/relation.gi index 115e5409ae0..e349d50d5e0 100644 --- a/lib/relation.gi +++ b/lib/relation.gi @@ -984,6 +984,7 @@ InstallMethod(ImagesElm, ############################################################################# ## #M PreImagesElmNC( , ) +#M PreImagesElm( , ) ## ## For binary relations over [1..n] represented as a list of images ## @@ -995,6 +996,16 @@ InstallMethod(PreImagesElmNC, i->n in Successors(rel)[i]); end); +InstallMethod(PreImagesElm, + "for binary rels over [1..n] with images list", + true, [IsBinaryRelation and IsBinaryRelationOnPointsRep, IsPosInt], 0, + function( rel, n ) + if not ( n in Range(rel) ) then + return []; + fi; + return PreImagesElm( rel, n ); + end ); + ############################################################################# ## #A Successors( ) @@ -1782,6 +1793,7 @@ InstallMethod( ImagesRepresentative, "equivalence relations", ############################################################################# ## #M PreImagesRepresentativeNC( , ) . . . for equivalence relations +#M PreImagesRepresentative( , ) . . . . for equivalence relations ## InstallMethod( PreImagesRepresentativeNC, "equivalence relations", FamRangeEqFamElm, [IsEquivalenceRelation, IsObject], 0, @@ -1789,6 +1801,15 @@ InstallMethod( PreImagesRepresentativeNC, "equivalence relations", return elm; end); +InstallMethod( PreImagesRepresentative, "equivalence relations", + FamRangeEqFamElm, [IsEquivalenceRelation, IsObject], 0, + function( map, elm ) + if not ( elm in Range(map) ) then + return fail; + fi; + return elm; + end); + ############################################################################# ## #M ImagesElm( , ) for equivalence relations with partition @@ -1814,6 +1835,7 @@ InstallMethod( ImagesElm, ############################################################################# ## #M PreImagesElmNC( , ) . for equivalence relations with partition +#M PreImagesElm( , ) . . for equivalence relations with partition ## InstallMethod( PreImagesElmNC, "equivalence relations with partition and element", @@ -1826,6 +1848,18 @@ InstallMethod( PreImagesElmNC, return ImagesElm(rel, elm); end); +InstallMethod( PreImagesElm, + "equivalence relations with partition and element", + FamRangeEqFamElm, + [IsEquivalenceRelation and HasEquivalenceRelationPartition, + IsObject],0, + function( rel, elm ) + if not ( elm in Range( rel ) ) then ##?? is there a Range(rel)? + return []; + fi; + return PreImagesElmNC( rel, elm ); + end); + ############################################################################# ## #M PrintObj( ) for equivalence relation diff --git a/lib/ringhom.gi b/lib/ringhom.gi index 2dc8ab4bb76..6377e0ceec7 100644 --- a/lib/ringhom.gi +++ b/lib/ringhom.gi @@ -445,6 +445,7 @@ end ); ############################################################################# ## #M PreImagesRepresentativeNC( , ) . . . . . . for ring g.m.b.i. +#M PreImagesRepresentative( , ) . . . . . . . for ring g.m.b.i. ## InstallMethod( PreImagesRepresentativeNC, "for ring g.m.b.i., and element", @@ -455,6 +456,18 @@ function( map, elm ) return ImagesRepresentative(InverseGeneralMapping(map),elm); end ); +InstallMethod( PreImagesRepresentative, + "for ring g.m.b.i., and element", + FamRangeEqFamElm, + [ IsRingGeneralMapping and IsRingGeneralMappingByImagesDefaultRep, + IsObject ], +function( map, elm ) + if not ( elm in Range( map ) ) then + return fail; + fi; + return PreImagesRepresentativeNC( map, elm ); +end ); + BindGlobal("IsomorphismSCRing",function(R) local e, z, one, o, sel, g, go, elms, dec, p, cands, m, a, b, nr, hom, i, j; if Size(R)>100000 then diff --git a/lib/vspchom.gi b/lib/vspchom.gi index daf0e145bf5..7fe397f6bd3 100644 --- a/lib/vspchom.gi +++ b/lib/vspchom.gi @@ -485,6 +485,7 @@ InstallMethod( ImagesRepresentative, ############################################################################# ## +#M PreImagesRepresentative( , ) . . . . for left module g.m.b.i. #M PreImagesRepresentativeNC( , ) . . . for left module g.m.b.i. ## InstallMethod( PreImagesRepresentativeNC, @@ -503,6 +504,17 @@ InstallMethod( PreImagesRepresentativeNC, return LinearCombination( map!.preimagesbasisimage, elm ); end ); +InstallMethod( PreImagesRepresentative, + "for left module g.m.b.i., and element", + FamRangeEqFamElm, + [ IsGeneralMapping and IsLinearGeneralMappingByImagesDefaultRep, + IsObject ], + function( map, elm ) + if not ( elm in Image( map ) ) then + return fail; + fi; + return PreImagesRepresentativeNC( map, elm ); + end ); ############################################################################# ## @@ -1239,6 +1251,18 @@ InstallMethod( PreImagesRepresentativeNC, return LinearCombination( map!.preimagesbasisimage, elm ); end ); +InstallMethod( PreImagesRepresentative, + "for left module m.b.m., and element", + FamRangeEqFamElm, + [ IsGeneralMapping and IsLinearMappingByMatrixDefaultRep, + IsObject ], + function( map, elm ) + if not ( elm in Image( map ) ) then + return fail; + fi; + return PreImagesRepresentativeNC( map, elm ); + end ); + ############################################################################# ## diff --git a/tst/testbugfix/2012-11-25-t00264.tst b/tst/testbugfix/2012-11-25-t00264.tst index 29e0fb14eed..754b367a0d0 100644 --- a/tst/testbugfix/2012-11-25-t00264.tst +++ b/tst/testbugfix/2012-11-25-t00264.tst @@ -5,5 +5,7 @@ gap> f := FreeGroup(2); gap> iso:=GroupHomomorphismByImagesNC(f,f,[f.1*f.2,f.1*f.2^2],[f.2^2*f.1,f.2*f.1]); [ f1*f2, f1*f2^2 ] -> [ f2^2*f1, f2*f1 ] gap> SetIsSurjective(iso,true); -gap> Image(iso,PreImagesRepresentative(iso,f.1)); +gap> Image(iso,PreImagesRepresentativeNC(iso,f.1)); f1 +## (20/05/26): gap> Image(iso,PreImagesRepresentative(iso,f.1)); +## cannot be made to work because the code for the NC version is in a package From 5b98560c50db5dbe760147f5a7eb4bcee53def23 Mon Sep 17 00:00:00 2001 From: cdwensley Date: Wed, 20 May 2026 19:44:30 +0100 Subject: [PATCH 3/7] adjust documentation in mapping.gd --- lib/mapping.gd | 48 +++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/lib/mapping.gd b/lib/mapping.gd index 70c0be49a01..497fe25b859 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. ## @@ -977,16 +977,17 @@ DeclareGlobalFunction( "Images" ); ## ## ## 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 +## From &GAP; version 4.16.0 +## PreImagesElm was renamed PreImagesElmNC ## throughout the library, and PreImagesElm now checks that ## elm is an element of the range before calling PreImagesElmNC. +##

+## When using PreImagesElmNC anything may happen if elm +## is not an element of the range of map. +##

## ## ## <#/GAPDoc> @@ -1036,13 +1037,14 @@ DeclareOperation( "PreImageElm", ## 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, +## From &GAP; version 4.16.0 PreImagesRepresentative +## was renamed PreImagesRepresentativeNC throughout the library, ## and PreImagesRepresentative now checks that elm is an ## element of the range before calling PreImagesRepresentativeNC. +##

+## When using PreImagesRepresentativeNC anything may happen if +## elm is not an element of the range of map. +##

## ## ## <#/GAPDoc> @@ -1066,13 +1068,14 @@ DeclareOperation( "PreImagesRepresentativeNC", [ IsGeneralMapping, IsObject ] ); ## 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 +## From &GAP; version 4.16.0 PreImagesSet ## has been renamed PreImagesSetNC throughout the library, -## and PreImagesSet now checks that elm is an -## element of the range before calling PreImagesSetNC. +## and PreImagesSet now checks that elms is a +## subset of the range before calling PreImagesSetNC. +##

+## When using PreImagesSetNC anything may happen if elms +## is not a subset of the range of map. +##

## ## ## <#/GAPDoc> @@ -1182,15 +1185,18 @@ DeclareGlobalFunction( "PreImage" ); ## entries do in general not correspond.) ##

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

-## In order to improve this state of affairs, PreImages +## From &GAP; version 4.16.0 PreImages ## has been renamed PreImagesNC throughout the library, ## and PreImages now checks that elm or coll ## belong to the range before calling PreImagesNC. +##

+## When using PreImagesNC anything may happen if elm +## or coll do not belong to the range of map. +##

## ## ## <#/GAPDoc> From 9fd69482998f54a7089217683471621b0db2fc4d Mon Sep 17 00:00:00 2001 From: cdwensley Date: Thu, 21 May 2026 10:12:07 +0100 Subject: [PATCH 4/7] replace items deleted in error in alghom.gi --- lib/alghom.gi | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/lib/alghom.gi b/lib/alghom.gi index 51147d67cda..15af8ea48da 100644 --- a/lib/alghom.gi +++ b/lib/alghom.gi @@ -916,6 +916,7 @@ InstallMethod( ImagesRepresentative, ############################################################################# ## #M PreImagesRepresentativeNC( , ) +#M PreImagesRepresentative( , ) ## BindGlobal( "PreImagesRepresentativeOperationAlgebraHomomorphism", function( ophom, mat ) if not IsBound( ophom!.basisImage ) then @@ -928,6 +929,22 @@ BindGlobal( "PreImagesRepresentativeOperationAlgebraHomomorphism", function( oph return mat; end ); +InstallMethod( PreImagesRepresentativeNC, + "for an operation algebra homomorphism, and an element", + FamRangeEqFamElm, + [ IsOperationAlgebraHomomorphismDefaultRep, IsMatrix ], + PreImagesRepresentativeOperationAlgebraHomomorphism ); + +InstallMethod( PreImagesRepresentative, + "for an operation algebra homomorphism, and an element", + FamRangeEqFamElm, + [ IsOperationAlgebraHomomorphismDefaultRep, IsMatrix ], + function( ophom, mat ) + if not ( mat in Range( ophom ) ) then + return fail; + fi; + return PreImagesRepresentativeOperationAlgebraHomomorphism( ophom, mat ); +end ); ############################################################################# ## @@ -1081,6 +1098,28 @@ InstallMethod( ImagesRepresentative, end ); +############################################################################# +## +#M PreImagesRepresentativeNC( , ) +#M PreImagesRepresentative( , ) +## +InstallMethod( PreImagesRepresentativeNC, + "for an alg. hom. from f. p. algebra, and an element", + FamRangeEqFamElm, + [ IsAlgebraHomomorphismFromFpRep, IsMatrix ], + PreImagesRepresentativeOperationAlgebraHomomorphism ); + +InstallMethod( PreImagesRepresentativeNC, + "for an alg. hom. from f. p. algebra, and an element", + FamRangeEqFamElm, + [ IsAlgebraHomomorphismFromFpRep, IsMatrix ], + function( ophom, mat ); + if not ( mat in Range( ophom ) ) then + return fail; + fi; + return PreImagesRepresentativeOperationAlgebraHomomorphism( ophom, mat ); + end ); + ############################################################################# ## #M OperationAlgebraHomomorphism( , , ) From 8481a3940d74be25ee6a1ebe1144bd986bb608db Mon Sep 17 00:00:00 2001 From: cdwensley Date: Thu, 21 May 2026 10:17:20 +0100 Subject: [PATCH 5/7] applied fix from stertooy --- lib/ghomfp.gi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ghomfp.gi b/lib/ghomfp.gi index be891d7ee9b..fc045d82895 100644 --- a/lib/ghomfp.gi +++ b/lib/ghomfp.gi @@ -629,7 +629,7 @@ InstallMethod( PreImagesSet, "map from (sub)group of fp group", CollFamRangeEqFamElms, [ IsFromFpGroupHomomorphism,IsGroup ],0, function(hom,u) - if not (u in Range(hom)) then + if not IsSubset( Range(hom), u ) then return []; fi; return PreImagesSetNC(hom,u); From a8e5012e65dbd52f1fb334e5ddfa496839ca404d Mon Sep 17 00:00:00 2001 From: cdwensley Date: Thu, 21 May 2026 17:46:20 +0100 Subject: [PATCH 6/7] minor correction --- lib/alghom.gi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/alghom.gi b/lib/alghom.gi index 15af8ea48da..b28b163047d 100644 --- a/lib/alghom.gi +++ b/lib/alghom.gi @@ -1109,7 +1109,7 @@ InstallMethod( PreImagesRepresentativeNC, [ IsAlgebraHomomorphismFromFpRep, IsMatrix ], PreImagesRepresentativeOperationAlgebraHomomorphism ); -InstallMethod( PreImagesRepresentativeNC, +InstallMethod( PreImagesRepresentative, "for an alg. hom. from f. p. algebra, and an element", FamRangeEqFamElm, [ IsAlgebraHomomorphismFromFpRep, IsMatrix ], From 168d9176686da36b09a663b0942f2fee5d295ef4 Mon Sep 17 00:00:00 2001 From: cdwensley Date: Thu, 21 May 2026 18:36:32 +0100 Subject: [PATCH 7/7] another adjustment to bugfix test --- tst/testbugfix/2012-11-25-t00264.tst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tst/testbugfix/2012-11-25-t00264.tst b/tst/testbugfix/2012-11-25-t00264.tst index 754b367a0d0..3d570f79c54 100644 --- a/tst/testbugfix/2012-11-25-t00264.tst +++ b/tst/testbugfix/2012-11-25-t00264.tst @@ -1,5 +1,7 @@ # 2012/11/25 (AK) # Fix of a bug that was reproducible in GAP 4.5.6 with FGA 1.1.1 +# (20/05/26): gap> Image(iso,PreImagesRepresentative(iso,f.1)); +# cannot be made to work because the code for the NC version is in a package gap> f := FreeGroup(2); gap> iso:=GroupHomomorphismByImagesNC(f,f,[f.1*f.2,f.1*f.2^2],[f.2^2*f.1,f.2*f.1]); @@ -7,5 +9,3 @@ gap> iso:=GroupHomomorphismByImagesNC(f,f,[f.1*f.2,f.1*f.2^2],[f.2^2*f.1,f.2*f.1 gap> SetIsSurjective(iso,true); gap> Image(iso,PreImagesRepresentativeNC(iso,f.1)); f1 -## (20/05/26): gap> Image(iso,PreImagesRepresentative(iso,f.1)); -## cannot be made to work because the code for the NC version is in a package