Skip to content

Commit 74cd9fd

Browse files
committed
Turn RestrictedNiceMonomorphism into an attribute
1 parent 4760f22 commit 74cd9fd

File tree

4 files changed

+36
-40
lines changed

4 files changed

+36
-40
lines changed

lib/factgrp.gi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ InstallMethod(FactorCosetAction,"by right transversal operation, Niceo",
523523
IsIdenticalObj,[IsGroup and IsHandledByNiceMonomorphism,IsGroup],0,
524524
function(G,U)
525525
local hom;
526-
hom:=RestrictedNiceMonomorphism(NiceMonomorphism(G),G);
526+
hom:=RestrictedNiceMonomorphism(G);
527527
return hom*DoFactorCosetAction(NiceObject(G),Image(hom,U));
528528
end);
529529

@@ -532,7 +532,7 @@ InstallOtherMethod(FactorCosetAction,
532532
[IsGroup and IsHandledByNiceMonomorphism,IsGroup,IsGroup],0,
533533
function(G,U,N)
534534
local hom;
535-
hom:=RestrictedNiceMonomorphism(NiceMonomorphism(G),G);
535+
hom:=RestrictedNiceMonomorphism(G);
536536
return hom*DoFactorCosetAction(NiceObject(G),Image(hom,U),Image(hom,N));
537537
end);
538538

lib/grpmat.gi

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -556,26 +556,22 @@ end );
556556
##
557557
BindGlobal( "IsomorphismPermGroupForMatrixGroup",
558558
function(G)
559-
local map,H;
560-
if HasNiceMonomorphism(G) and IsPermGroup(Range(NiceMonomorphism(G))) then
561-
map:=NiceMonomorphism(G);
562-
else
559+
local map;
560+
if not HasNiceMonomorphism(G) or not IsPermGroup(Range(NiceMonomorphism(G))) then
563561
if not HasIsFinite(G) then
564562
Info(InfoWarning,1,
565563
"IsomorphismPermGroup: The group is not known to be finite");
566564
fi;
567565
map:=NicomorphismOfGeneralMatrixGroup(G,false,false);
568566
SetNiceMonomorphism(G,map);
569567
fi;
570-
if IsIdenticalObj(Source(map),G) and IsBijective(map) then
571-
return map;
568+
if IsPermGroup(Range(NiceMonomorphism(G))) then
569+
map:=RestrictedNiceMonomorphism(G);
572570
fi;
573-
if IsIdenticalObj(map, NiceMonomorphism(G)) then
574-
H:=NiceObject(G);
575-
else
576-
H:=ImagesSet(map,G);
571+
if IsIdenticalObj(Source(map),G) and IsSurjective(map) then
572+
return map;
577573
fi;
578-
map:=GeneralRestrictedMapping(map, G, H);
574+
map:=GeneralRestrictedMapping(map, G, ImagesSet(map,G));
579575
SetIsBijective(map, true);
580576
return map;
581577
end);

lib/grpnice.gd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ DeclareFilter("IsNiceMonomorphism");
6262

6363
#############################################################################
6464
##
65-
#O RestrictedNiceMonomorphism(<hom>,<G>)
65+
#A RestrictedNiceMonomorphism(<G>)
6666
##
6767
## <ManSection>
68-
## <Oper Name="RestrictedNiceMonomorphism" Arg='hom, G'/>
68+
## <Attr Name="RestrictedNiceMonomorphism" Arg='G'/>
6969
##
7070
## <Description>
71-
## returns the restriction of the nice monomorphism <A>hom</A> onto
71+
## returns the restriction of the nice monomorphism of <A>G</A> onto
7272
## <A>G</A>.
7373
## In contrast to <Ref Func="RestrictedMapping"/>,
7474
## this operation returns an object which has the filter
@@ -89,7 +89,7 @@ DeclareFilter("IsNiceMonomorphism");
8989
## </Description>
9090
## </ManSection>
9191
##
92-
DeclareGlobalFunction("RestrictedNiceMonomorphism");
92+
DeclareAttribute("RestrictedNiceMonomorphism", IsObject);
9393

9494
#############################################################################
9595
##

lib/grpnice.gi

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -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 ],
559565
function(g)
560566
local 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,
582588
function(g)
583589
local 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,
605611
function(g,nam)
606612
local 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,
625631
function(g,c,nam)
626632
local 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 );
933936
end );
@@ -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

Comments
 (0)