@@ -37,10 +37,16 @@ end);
3737
3838# ############################################################################
3939# #
40- # O RestrictedNiceMonomorphism(<hom>,< G>)
40+ # O RestrictedNiceMonomorphism(<G>)
4141# #
42- InstallGlobalFunction(RestrictedNiceMonomorphism,
43- function (hom,G )
42+ InstallMethod(RestrictedNiceMonomorphism,
43+ [ IsObject] ,
44+ function (G )
45+ local hom;
46+ hom:= NiceMonomorphism(G);
47+ if IsIdenticalObj(Source(hom),G) and IsSurjective(hom) then
48+ return hom;
49+ fi ;
4450 hom:= RestrictedMapping(hom,G: surjective);
4551
4652 # CompositionMapping methods need this to avoid forming an AsGHBI of an
@@ -558,9 +564,9 @@ InstallMethod(IsomorphismPermGroup,"via niceomorphisms",true,
558564 [ [ IsGroup and IsFinite ] , 1 ] ,
559565function (g )
560566local mon,iso;
561- mon:= NiceMonomorphism (g);
562- if not IsIdenticalObj(Source (mon),g ) then
563- mon:= RestrictedNiceMonomorphism(mon,g) ;
567+ mon:= RestrictedNiceMonomorphism (g);
568+ if IsPermGroup(Range (mon)) then
569+ return mon;
564570 fi ;
565571 iso:= IsomorphismPermGroup(NiceObject(g));
566572 if iso= fail then
@@ -581,9 +587,9 @@ InstallMethod(IsomorphismPcGroup,"via niceomorphisms",true,
581587 [ IsGroup and IsFinite and IsHandledByNiceMonomorphism] ,0 ,
582588function (g )
583589local mon,iso;
584- mon:= NiceMonomorphism (g);
585- if not IsIdenticalObj(Source (mon),g ) then
586- mon:= RestrictedNiceMonomorphism(mon,g) ;
590+ mon:= RestrictedNiceMonomorphism (g);
591+ if IsPcGroup(Range (mon)) then
592+ return mon;
587593 fi ;
588594 iso:= IsomorphismPcGroup(NiceObject(g));
589595 if iso= fail then
@@ -604,9 +610,9 @@ InstallOtherMethod(IsomorphismFpGroup,"via niceomorphism",true,
604610 [ IsGroup and IsHandledByNiceMonomorphism,IsString] ,0 ,
605611function (g,nam )
606612local mon,iso;
607- mon:= NiceMonomorphism (g);
608- if not IsIdenticalObj(Source (mon),g ) then
609- mon:= RestrictedNiceMonomorphism(mon,g) ;
613+ mon:= RestrictedNiceMonomorphism (g);
614+ if IsFpGroup(Range (mon)) then
615+ return mon;
610616 fi ;
611617 iso:= IsomorphismFpGroup(NiceObject(g),nam);
612618 if iso= fail then
@@ -624,11 +630,8 @@ InstallMethod(IsomorphismFpGroupByGeneratorsNC,"via niceomorphism/w. gens",
624630 IsFamFamX,[ IsGroup and IsHandledByNiceMonomorphism, IsList,IsString] ,0 ,
625631function (g,c,nam )
626632local mon,iso;
627- mon:= NiceMonomorphism (g);
633+ mon:= RestrictedNiceMonomorphism (g);
628634 c:= List(c,i-> Image(mon,i));
629- if not IsIdenticalObj(Source(mon),g) then
630- mon:= RestrictedNiceMonomorphism(mon,g);
631- fi ;
632635 iso:= IsomorphismFpGroupByGeneratorsNC(NiceObject(g),c,nam);
633636 if iso= fail then
634637 return fail ;
@@ -925,9 +928,9 @@ InstallMethod( NaturalHomomorphismByNormalSubgroupOp, IsIdenticalObj,
925928 function ( G, N )
926929 local nice;
927930
928- nice := RestrictedNiceMonomorphism(NiceMonomorphism( G ), G);
929- G := ImagesSet( nice,G );
930- N := ImagesSet ( nice, N );
931+ nice := RestrictedNiceMonomorphism(G);
932+ G := ImagesSet( nice, G );
933+ N := ImagesSet( nice, N );
931934 return CompositionMapping( NaturalHomomorphismByNormalSubgroup( G, N ),
932935 nice );
933936end );
@@ -946,10 +949,7 @@ local nice,geni,map2,tmp;
946949 fi ;
947950 tmp := RUN_IN_GGMBI;
948951 RUN_IN_GGMBI:= true ;
949- nice:= NiceMonomorphism(G);
950- if not IsIdenticalObj(Source(nice),G) then
951- nice:= RestrictedNiceMonomorphism(nice,G);
952- fi ;
952+ nice:= RestrictedNiceMonomorphism(G);
953953 geni:= List(gens,i-> ImageElm(nice,i));
954954 map2:= GroupGeneralMappingByImagesNC(NiceObject(G),H,geni,imgs);
955955 RUN_IN_GGMBI:= tmp;
0 commit comments