############################################################################# ## #M IsIsomorphicGroup( <G>, <H> ) . . Check if two groups G, H are isomorphic ## V0.2 3.10.94 ## The return value is 'false' iff G and H are not isomorphic ##
InstallMethod(
IsIsomorphicGroup, "test all",
true,
[IsGroup, IsGroup], 0, function( G, H )
return not ( IsomorphismGroups( G, H ) = fail ); end );
InstallMethod(
IsIsomorphicGroup, "both abelian",
true,
[IsGroup, IsGroup], 100, function( G, H ) if IsAbelian(G) <> IsAbelian(H) then
return false; else
TryNextMethod(); fi; end );
InstallMethod(
IsIsomorphicGroup, "same size",
true,
[IsGroup, IsGroup], 90, function( G, H ) if Size(G) <> Size(H) then
return false; else
TryNextMethod(); fi; end );
InstallMethod(
IsIsomorphicGroup, "small groups",
true,
[IsGroup, IsGroup], 85, function ( G , H ) if Size(G)<=1000 and not (Size(G) in [256,512,768]) then
return IdGroup(G)=IdGroup(H); else
TryNextMethod(); fi; end );
InstallMethod(
IsIsomorphicGroup, "centres of equal size",
true,
[IsGroup, IsGroup], 80, function( G, H ) if Size(Centre(G)) <> Size(Centre(H)) then
return false; else
TryNextMethod(); fi; end );
InstallMethod(
IsIsomorphicGroup, "commutator subgroups of equal size",
true,
[IsGroup, IsGroup], 70, function( G, H ) if Size(DerivedSubgroup(G)) <> Size(DerivedSubgroup(H)) then
return false; else
TryNextMethod(); fi; end );
InstallMethod(
IsIsomorphicGroup, "elements of the same order",
true,
[IsGroup, IsGroup], 60, function( G, H ) if Collected( List( AsList(G), Order ) ) <>
Collected( List( AsList(H), Order ) ) then
return false; else
TryNextMethod(); fi; end );
############################################################################# ## #F Subgroups ( <G> ) a list of all subgroups of <G>
Subgroups := function ( G )
local sgrps, sg;
sgrps := Flat( List( ConjugacyClassesSubgroups( G ), AsList ) ); for sg in sgrps do
SetParent( sg, Parent(G) );
od;
return sgrps; end;
############################################################################## ## #M OneGeneratedNormalSubgroups ( <G> ) ## ## Computes a list of all normal subgroups of <G> ## that are generated by one element. ##
#InstallMethod( # OneGeneratedNormalSubgroups, # "default", # true, # [IsGroup], # 0, # function (G) # return List ( # ConjugacyClasses (G), # C -> NormalClosure (G, # Subgroup (G, [Representative (C)]) # ) # ); # end );
##################################################################### ## #F IsInvariantUnderMaps ( <G>, <U>, <maps>) ## ## returns true iff the subgroup <U> is invariant under ## all mappings in <maps>. All m in <maps> operate on <G>. ##
IsInvariantUnderMaps := function ( G, U, maps )
return ForAll (maps,
m -> IsSubset (U,
Images (m, U)
)
); end;
InstallMethod(
PrintTable2, "groups",
true,
[IsGroup, IsString], 0, function ( G, mode ) # mode is simply ignored here!
local elms, # the elements of the group
n, # the size of the group
symbols, # a list of the symbols for the elements of the group
tw, # the width of a table
spc, # local function which prints the right number of spaces
bar, # local function for printing the right length of the bar
ind, # help variable, an index
i,j, # loop variables
max; # length of the longest symbol string
elms := AsSSortedList( G );
n := Length( elms );
symbols := Symbols( G );
max := Maximum( List( symbols, Length ) );
# compute the number of characters per line required for the table
tw := (max+1)*(n+1) + 2;
if SizeScreen()[1] - 3 < tw then
Print( "The table of a group of order ", n, " will not ", "look\ngood on a screen with ", SizeScreen()[1], " characters per ", "line.\nHowever, you may want to set your line length to a ", "greater\nvalue by using the GAP function 'SizeScreen'.\n" );
return; fi;
bar := function()
return String( Concatenation( List( [0..max+1], i -> "-" ) ) ); end;
Print( "Let:\n" ); for i in [1..n] do Print( symbols[i], " := ", elms[i], "\n" ); od;
# print the addition table
Print("\n"); for i in [1..max+1] do Print(" "); od;
Print( "* | " ); for i in [1..n] do Print( symbols[i], spc(i) ); od;
Print( "\n ", bar() ); for i in [1..n] do Print( bar() ); od; for i in [1..n] do
Print( "\n ", symbols[i], spc(i), "| " ); for j in [1..n] do
ind := Position( elms, elms[i] * elms[j] );
Print( symbols[ ind ], spc(ind) );
od;
od;
Print("\n"); end );
##################################################################### ## #F PrintTable( <domain> [, <mode>] ) print the operation table of ## a group or a nearring. ## With nearrings <mode> can be used to specify which ## information should be printed: ## 'e': information about the elements ## 'a': addition table ## 'm': multiplication table ## the default value for mode is "eam"
InstallGlobalFunction(
PrintTable, function ( arg ) if Length(arg)=1then
PrintTable2(arg[1],"eam"); else
PrintTable2(arg[1],arg[2]); fi; end);
##################################################################### ## #F IdTWGroup ( <G> ) returns the Thomas/Wood group classification ## number of the group <G> as a pair of integers
IdTWGroup := function ( G )
local table, id; if Size(G)>32then
Error("group must be of order at most 32"); fi;
# table is a translation table between GAP and Thomas/Wood notation
table := [
[1],
[1],
[1],
[1,2],
[1],
[2,1],
[1],
[1,2,4,5,3],
[1,2],
[2,1],
[1],
[5,1,4,3,2],
[1],
[2,1],
[1],
[1,3,9,10,2,11,12,13,14,4,6,7,8,5],
[1],
[4,1,3,5,2],
[1],
[4,1,5,3,2],
[2,1],
[2,1],
[1],
[14,1,13,11,9,10,6,15,2,7,8,12,5,4,3],
[1,2],
[2,1],
[1,2,4,5,3],
[4,1,3,2],
[1],
[3,2,4,1],
[1],
[1,18,3,19,20,46,47,48,27,28,31,21,30,29,32,2,22,49,50,51,5,11, 12,16,14,15,33,36,37,38,39,40,41,34,35,4,13,17,23,24,25,26,44, 45,6,8,9,10,42,43,7],
];
#PrincipalSeries := function (G) # # returns one principal series of G # # local N, i, principalSeries, lastadded; # # N := NormalSubgroups (G); # Print ("\n1\n"); # principalSeries := [G]; # lastadded := G; # # i := Length (N) - 1; # while i >= 1 do # if IsSubgroup (lastadded, N[i]) then # Add (principalSeries, N[i]); # lastadded := N[i]; # fi; # i := i - 1; # od; # # return principalSeries; #end;
InstallGlobalFunction(
ScottSigma,
function (G, N1, N2)
if (not IsSubgroup (N1, N2)) or (Size (N2) = Size (N1)) then
Error ("length.x : Wrong order of parameters"); fi;
if IsSubgroup (N2, CommutatorSubgroup (G, N1)) then
return Size (N1) / Size (N2); else
return 1; fi;
end );
InstallMethod(
ScottLength, "abelian",
true,
[IsGroup and IsAbelian], 0, function ( G )
return Exponent( G ); end );
BindGlobal( "FindKInPGroup", function ( PG ) # find a k in a p-group PG s.t. kx = [x,pi] for a pi and k
local info, # the return-value
p, # which p-group
ExpG, # the exponent of PG is p^ExpG
ExpZ, # the same for Z(PG)
ExpGz, # the same for PG/Z(PG)
ExpGk, # the same for PG/K(PG)
LowerBound,
UpperBound, # bounds for k
possibilities,# possible values for k
k, # a possible value for k
gens, l, indices, indx, pi, orders;
info := rec (exponent := Exponent(PG));
if IsAbelian(PG)
or IsPrime(Exponent(PG)) # Corollary 4
or Exponent(PG)=4# Corollary 8 then
info.IsSmall := false;
info.k := Exponent(PG);
return info; fi;
for k in possibilities do # Proposition 9 if IsSubset(Centre(PG), Set(List(PG,x->x^k)))
and # Proposition 14
ForAll(Combinations(Filtered(GeneratorsOfGroup(PG),
gen->gen^k<>Identity(PG)),2),
gen->Comm(gen[1],gen[2])^(k*(k-1)/2)=Identity(PG)) then
gens := GeneratorsOfGroup(PG);
l := Length(gens);
orders := List( gens, Order );
indices := Cartesian(List(orders, o -> [1..o])); for indx in indices do
pi := Product(List([1..l], i -> gens[i]^indx[i])); if pi^k=Identity(PG) and
pi^(p^(ExpG-1)/k)<>Identity(PG) and
ForAll(GeneratorsOfGroup(PG),gen->gen^k=Comm(gen,pi)) then
info.IsSmall := true;
info.k := k;
return info; fi;
od; fi;
od;
BindGlobal( "FindKInGroup", function ( G ) # find a possible k in the group G
local pees, # values for p with nontrivial p-Sylow subgroup
SylowSgps, # the corresponding p-Sylow subgroups
SSgInfo; # information about possible k's # for the Sylow subgroups
return Product(List(SSgInfo,info->info.k)); end );
InstallMethod(
ScottLength, "nilpotent of class 2",
true,
[IsGroup], 2, function ( G ) if not IsNilpotent( G ) or NilpotencyClassOfGroup( G ) <> 2then
TryNextMethod(); fi;
return FindKInGroup( G ); end );
InstallMethod(
ScottLength, "default",
true,
[IsGroup], 0, function ( G )
# Computes the length of a group according to # Scott, Monatshefte f. Math 73, 250 - 267 (1969) #
local primes, principalSeries, product, i, N,
n, p, IG, length, primepowerList;
# N := NormalSubgroups (G); # principalSeries := PrincipalSeries (G);
principalSeries := ChiefSeries (G);
product := 1; for i in [1..Length (principalSeries) - 1] do
product := product *
ScottSigma( G, principalSeries[i], principalSeries[i + 1] );
od;
primes := Set( FactorsInt(product) );
if product <> 1then
IG := InnerAutomorphismNearRing( G );
length := 1; for p in primes do
n := 1; while
MOD( Exponent(G), p^(n+1) ) = 0 and
MOD( product, p ^ (n+1) ) = 0 and
( Size( InnerAutomorphismNearRing(
DirectProduct( G, CyclicGroup( p^(n+1) ) )
) )
=
Size (IG)
) do
n := n+1;
od; # now n has the maximal possible value
length := length * p^n;
od;
InstallMethod(
FastImageOfProjection, "perm groups - very dangerous !!!",
true,
[IsGroup and IsPermGroup, IsMultiplicativeElementWithInverse,
IsInt and IsPosRat], 0, function( DP, dpElm, i )
local G, d, list, inv_perm;
G := DirectProductInfo( DP ).groups[1];
inv_perm := (DirectProductInfo( DP ).perms[1])^-1;
d := Length( MovedPoints( G ) ); # if dpElm = () then # list := []; # else
list := ListPerm( dpElm ); # fi; if Length(list) < d*Size(G) then
list := Concatenation( list, [Length(list)+1..d*Size(G)] ); fi;
list := List( list{[d*(i-1)+1..d*i]}, k -> k-d*(i-1) );
return PermList( list )^inv_perm;
end );
InstallMethod(
FastImageOfProjection, "standard",
true,
[IsGroup, IsMultiplicativeElementWithInverse, IsInt and IsPosRat], 0, function( DP, dpElm, i )
return dpElm^Projection( DP, i ); end );
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.43 Sekunden
(vorverarbeitet am 2026-10-12)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.