From dc04a82f85f52ff8b2c95e50fa021b5095ab98bc Mon Sep 17 00:00:00 2001 From: cdwensley Date: Wed, 13 Aug 2025 10:24:12 +0100 Subject: [PATCH] removed all SubdirectProductWithEmbeddings code --- lib/groups.gd | 10 -- lib/groups.gi | 309 -------------------------------------------------- 2 files changed, 319 deletions(-) diff --git a/lib/groups.gd b/lib/groups.gd index 8e9ea7a..ee9809f 100644 --- a/lib/groups.gd +++ b/lib/groups.gd @@ -44,16 +44,6 @@ DeclareGlobalName( "ListOfPowers" ); ## DeclareOperation( "GeneratorsAndInverses", [ IsMagmaWithInverses ] ); -############################################################################# -## this function has been copied from main library gprd.gd and renamed -## -#O SubdirectProductWithEmbeddings(, , , ) -## -DeclareGlobalName( "SubdirectProductWithEmbeddings" ); -DeclareOperation( "SubdirectProductWithEmbeddingsOp", - [ IsGroup, IsGroup, IsGroupHomomorphism, IsGroupHomomorphism ] ); -DeclareAttribute( "SubdirectProductWithEmbeddingsInfo", IsGroup, "mutable" ); - ############################################################################# ## #E groups.gd . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here diff --git a/lib/groups.gi b/lib/groups.gi index 4334c8c..6b0b6f8 100644 --- a/lib/groups.gi +++ b/lib/groups.gi @@ -105,315 +105,6 @@ InstallMethod( GeneratorsAndInverses, "for groups", true, [ IsGroup ], 0, G -> Concatenation( GeneratorsOfGroup(G), List( GeneratorsOfGroup(G), g->g^-1 ) ) ); - - - -############################################################################# -## temporary methods for SubdirectProductWithEmbeddings -## -BindGlobal( "SubdirectProductWithEmbeddings", -function(G,H,ghom,hhom) -local iso; - if ( Range( ghom, G ) <> Range( hhom, H ) ) or - ( Image( ghom, G ) <> Image( hhom, H ) ) then - Error("the image groups are not the same"); - fi; - if not ( IsPermGroup(G) and IsPermGroup(H) ) or - ( IsPcGroup(G) and IsPcGroup(H) ) then - Error("methods only supplied forperm groups or pc groups"); - fi; - return SubdirectProductWithEmbeddingsOp( G, H, ghom, hhom ); -end); - -############################################################################# -## -#M SubdirectProductWithEmbeddingsOp( , , , ) -## -InstallMethod( SubdirectProductWithEmbeddingsOp,"groups", true, - [ IsGroup, IsGroup, IsGroupHomomorphism, IsGroupHomomorphism ], 0, -function( G, H, ghom, hhom ) -local gc,hc,S,info; - # try to enforce a common representation - if not (IsFinite(G) and IsFinite(H)) then - TryNextMethod(); - fi; - if IsSolvableGroup(G) and IsSolvableGroup(H) and - not (IsPcGroup(G) and IsPcGroup(H)) then - # enforce pc groups - gc:=IsomorphismPcGroup(G); - hc:=IsomorphismPcGroup(H); - elif not (IsPermGroup(G) and IsPermGroup(H)) then - # enforce perm groups - gc:=IsomorphismPermGroup(G); - hc:=IsomorphismPermGroup(H); - else - TryNextMethod(); - fi; - ghom := InverseGeneralMapping(gc)*ghom; - hhom := InverseGeneralMapping(hc)*hhom; - # the ...Op is installed for `IsGroupHomomorphism'. So we have to enforce - # the filter to be set. - if not IsGroupHomomorphism(ghom) or not IsGroupHomomorphism(hhom) then - Error("mappings are not homomorphisms"); - fi; - S:=SubdirectProductWithEmbeddingsOp(Image(gc,G),Image(hc,H),ghom,hhom); - info:=rec(groups:=[G,H], - homomorphisms:=[ghom,hhom], - projections:=[Projection(S,1)*InverseGeneralMapping(gc), - Projection(S,2)*InverseGeneralMapping(hc)]); - S:=Group(GeneratorsOfGroup(S)); - SetSubdirectProductWithEmbeddingsInfo(S,info); - return S; -end); - -############################################################################# -## -#M Projection( , ) . . . . . . . . . . . . . . . . . make projection -## -InstallMethod( Projection,"pc subdirect product", true, - [ IsGroup and HasSubdirectProductWithEmbeddingsInfo, IsPosInt ], 0, -function( S, i ) -local prj, info; - if not i in [1,2] then - Error("only 2 embeddings"); - fi; - info := SubdirectProductWithEmbeddingsInfo( S ); - if not IsBound(info.projections[i]) then - TryNextMethod(); - fi; - return info.projections[i]; -end); - -############################################################################# -## -#M Size( ) . . . . . . . . . . . . . . . . . . . . of subdirect product -## -InstallMethod( Size,"subdirect product", true, - [ IsGroup and HasSubdirectProductWithEmbeddingsInfo ], 0, - function( S ) - local info; - info := SubdirectProductWithEmbeddingsInfo( S ); - return Size( info.groups[ 1 ] ) * Size( info.groups[ 2 ] ) - / Size( ImagesSource( info.homomorphisms[ 1 ] ) ); -end ); - -############################################################################# -## methods copied from gprdperm.gi -## -############################################################################# -## -#M SubdirectProductWithEmbeddingsOp( , , , ) -## -InstallMethod( SubdirectProductWithEmbeddingsOp, "permgroup", true, - [ IsPermGroup, IsPermGroup, IsGroupHomomorphism, IsGroupHomomorphism ], 0, - function( G1, G2, phi1, phi2 ) - local S, # subdirect product of and , result - gens, # generators of - D, # direct product of and - emb1, emb2, # embeddings of and into - info, Dinfo,# info records - gen; # one generator of or kernel of - - # make the direct product and the embeddings - D := DirectProduct( G1, G2 ); - emb1 := Embedding( D, 1 ); - emb2 := Embedding( D, 2 ); - - # the subdirect product is generated by $(g_1,x_{g_1})$ where $g_1$ loops - # over the generators of $G_1$ and $x_{g_1} \in G_2$ is abitrary such - # that $g_1^{phi_1} = x_{g_1}^{phi_2}$ and by $(1,k_2)$ where $k_2$ loops - # over the generators of the kernel of $phi_2$. - gens := []; - for gen in GeneratorsOfGroup( G1 ) do - Add( gens, gen^emb1 * PreImagesRepresentativeNC(phi2,gen^phi1)^emb2 ); - od; - for gen in GeneratorsOfGroup( - KernelOfMultiplicativeGeneralMapping( phi2 ) ) do - Add( gens, gen ^ emb2 ); - od; - - # and make the subdirect product - S := GroupByGenerators( gens ); - SetParent( S, D ); - - Dinfo := DirectProductInfo( D ); - info := rec( groups := [G1, G2], - homomorphisms := [phi1, phi2], - olds := Dinfo.olds, - news := Dinfo.news, - perms := Dinfo.perms, - projections := [] ); - SetSubdirectProductWithEmbeddingsInfo( S, info ); - return S; -end ); - -############################################################################# -## -#R IsProjectionSubdirectProductWithEmbeddingsPermGroup( ) . projection onto factor -## -DeclareRepresentation( "IsProjectionSubdirectProductWithEmbeddingsPermGroup", - IsAttributeStoringRep and IsComponentObjectRep and - IsGroupHomomorphism and IsSurjective and - IsSPGeneralMapping, [ "component" ] ); - -############################################################################# -## -#M Projection( , ) . . . . . . . . . . . . . . . . . make projection -## -InstallMethod( Projection,"perm subdirect product",true, - [ IsPermGroup and HasSubdirectProductWithEmbeddingsInfo, - IsPosInt ], 0, - function( S, i ) - local prj, info; - info := SubdirectProductWithEmbeddingsInfo( S ); - if IsBound( info.projections[i] ) then return info.projections[i]; fi; - - prj := Objectify( NewType( GeneralMappingsFamily( PermutationsFamily, - PermutationsFamily ), - IsProjectionSubdirectProductWithEmbeddingsPermGroup ), - rec( component := i ) ); - SetSource( prj, S ); - info.projections[i] := prj; - SetSubdirectProductWithEmbeddingsInfo( S, info ); - return prj; -end ); - -############################################################################# -## -#M Range( ) . . . . . . . . . . . . . . . . . . . . . . of projection -## -InstallMethod( Range,"perm subdirect product projection", - true, [ IsProjectionSubdirectProductWithEmbeddingsPermGroup ], 0, - prj -> SubdirectProductWithEmbeddingsInfo( Source( prj ) ).groups[ prj!.component ] ); - -############################################################################# -## -#M ImagesRepresentative( , ) . . . . . . . . . . . . of projection -## -InstallMethod( ImagesRepresentative,"perm subdirect product projection", - FamSourceEqFamElm, - [ IsProjectionSubdirectProductWithEmbeddingsPermGroup, - IsMultiplicativeElementWithInverse ], 0, - function( prj, g ) - local info; - info := SubdirectProductWithEmbeddingsInfo( Source( prj ) ); - return RestrictedPermNC( g, info.news[ prj!.component ] ) - ^ ( info.perms[ prj!.component ] ^ -1 ); -end ); - -############################################################################# -## -#M PreImagesRepresentativeNC( , ) . . . . . . . . . . of projection -## -InstallMethod( PreImagesRepresentativeNC,"perm subdirect product projection", - FamRangeEqFamElm, - [ IsProjectionSubdirectProductWithEmbeddingsPermGroup, - IsMultiplicativeElementWithInverse ], 0, - function( prj, img ) - local S, - elm, # preimage of under , result - info, # info record - phi1, phi2; # homomorphisms of components - - S := Source( prj ); - info := SubdirectProductWithEmbeddingsInfo( S ); - - # get the homomorphism - phi1 := info.homomorphisms[1]; - phi2 := info.homomorphisms[2]; - - # compute the preimage - if 1 = prj!.component then - elm := img ^ info.perms[1] - * PreImagesRepresentativeNC(phi2,img^phi1) ^ info.perms[2]; - else - elm := img ^ info.perms[2] - * PreImagesRepresentativeNC(phi1,img^phi2) ^ info.perms[1]; - fi; - - # return the preimage - return elm; -end ); - -############################################################################# -## -#M KernelOfMultiplicativeGeneralMapping( ) . . . . . . . of projection -## -InstallMethod( KernelOfMultiplicativeGeneralMapping, - "perm subdirect product projection",true, - [ IsProjectionSubdirectProductWithEmbeddingsPermGroup ], 0, - function( prj ) - local D, i, info; - - D := Source( prj ); - info := SubdirectProductWithEmbeddingsInfo( D ); - i := 3 - prj!.component; - return SubgroupNC( D, OnTuples - ( GeneratorsOfGroup( KernelOfMultiplicativeGeneralMapping( - info.homomorphisms[ i ] ) ), - info.perms[ i ] ) ); -end ); - - -############################################################################# -## -#M ViewObj( ) . . . . . . . . . . . . . . . . . . . . view projection -## -InstallMethod( ViewObj, - "for projection from subdirect product", - true, - [ IsProjectionSubdirectProductWithEmbeddingsPermGroup ], 0, - function( prj ) - Print( Ordinal( prj!.component ), " projection of " ); - View( Source( prj ) ); -end ); - - -############################################################################# -## -#M PrintObj( ) . . . . . . . . . . . . . . . . . . . print projection -## -InstallMethod( PrintObj, - "for projection from subdirect product", - true, - [ IsProjectionSubdirectProductWithEmbeddingsPermGroup ], 0, - function( prj ) - Print( "Projection( ", Source( prj ), ", ", prj!.component, " )" ); -end ); - -############################################################################# -## method copied from grpdpc.gi -## -############################################################################# -## -#M SubdirectProductWithEmbeddingsOp( , , , ) -## -InstallMethod( SubdirectProductWithEmbeddingsOp,"pcgroup", true, - [ IsPcGroup, IsPcGroup, IsGroupHomomorphism, IsGroupHomomorphism ], 0, -function( G, H, gh, hh ) -local pg,ph,kg,kh,ig,ih,mg,mh,S,info; - pg:=Pcgs(G); - ph:=Pcgs(H); - kg:=KernelOfMultiplicativeGeneralMapping(gh); - kh:=KernelOfMultiplicativeGeneralMapping(hh); - ig:=InducedPcgs(pg,kg); - ih:=InducedPcgs(ph,kh); - mg:=pg mod ig; - 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); - pg:=GroupHomomorphismByImagesNC(S[1],G,S[2],pg); - ph:=GroupHomomorphismByImagesNC(S[1],H,S[2],ph); - S:=S[1]; - info:=rec(groups:=[G,H], - homomorphisms:=[gh,hh], - projections:=[pg,ph]); - SetSubdirectProductWithEmbeddingsInfo(S,info); - return S; -end); - - ############################################################################# ## #E groups.gi . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here