1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
|
#############################################################################
##
#W groups.gi GAP4 package `Utils' Stefan Kohl
##
#Y Copyright (C) 2015-2025, The GAP Group
#############################################################################
## this function has been transferred from ResClasses
##
#M Comm( [ <elm1>, <elm2> ] ) . . . for arguments enclosed in list brackets
##
InstallOtherMethod( Comm,
"for arguments enclosed in list brackets (ResClasses)",
true, [ IsList ], 0, LeftNormedComm );
#############################################################################
## this function has been transferred from ResClasses
##
#M IsCommuting( <a>, <b> ) . . . . . . . . . . . . . . . . . fallback method
##
InstallMethod( IsCommuting,
"fallback method (ResClasses)", IsIdenticalObj,
[ IsMultiplicativeElement, IsMultiplicativeElement ], 0,
function ( a, b ) return a*b = b*a; end );
#############################################################################
## this function has been transferred from ResClasses
##
#M UpperFittingSeries( <G> ) . . . . . . . . . . . . . . . . default method
##
InstallMethod( UpperFittingSeries, "default method", true, [ IsGroup ], 0,
function ( G )
local series, F, phi;
if IsTrivial(FittingSubgroup(G)) then return [ TrivialSubgroup(G) ]; fi;
F := FittingSubgroup(G); series := [ TrivialSubgroup(G), F ];
while F <> G do
phi := NaturalHomomorphismByNormalSubgroup(G,F);
F := PreImage(phi,FittingSubgroup(Image(phi)));
if series[Length(series)] = F then break; fi;
Add(series,F);
od;
return series;
end );
#############################################################################
## this function has been transferred from ResClasses
##
#M LowerFittingSeries( <G> ) . . . . . . . . . . . . . . . . default method
##
InstallMethod( LowerFittingSeries, "default method", true, [ IsGroup ], 0,
function ( G )
local series, F;
series := [ G ]; F := G;
while not IsTrivial(F) do
F := Reversed(LowerCentralSeries(F))[1];
if series[Length(series)] = F then break; fi;
Add(series,F);
od;
return series;
end );
#############################################################################
## this function has been transferred from ResClasses
##
#M FittingLength( <G> ) . . . . . . . . . . . . . . . . . . . default method
##
InstallMethod( FittingLength, "default method", true, [ IsGroup ], 0,
function ( G )
if not IsSolvableGroup(G) then return infinity; fi;
if HasUpperFittingSeries(G)
then return Length(UpperFittingSeries(G)) - 1;
else return Length(LowerFittingSeries(G)) - 1; fi;
end );
#############################################################################
## this function has been transferred from RCWA
##
#F ListOfPowers( <g>, <exp> ) . . . . . . list of powers <g>^1 .. <g>^<exp>
##
BindGlobal( "ListOfPowers",
function ( g, exp )
local powers, n;
powers := [g];
for n in [2..exp] do Add(powers,powers[n-1]*g); od;
return powers;
end );
#############################################################################
## this function has been transferred from RCWA
##
#M GeneratorsAndInverses( <D> ) list of generators of <D> and their inverses
#M GeneratorsAndInverses( <G> ) . . . . . . . . . . . . . . . . . for groups
##
InstallMethod( GeneratorsAndInverses, "for groups", true, [ IsGroup ], 0,
G -> Concatenation( GeneratorsOfGroup(G),
List( GeneratorsOfGroup(G), g->g^-1 ) ) );
#############################################################################
##
#E groups.gi . . . . . . . . . . . . . . . . . . . . . . . . . . . ends here
|