File: pcgsnice.gi

package info (click to toggle)
gap 4r4p9-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 27,120 kB
  • ctags: 6,735
  • sloc: ansic: 96,692; sh: 3,254; makefile: 319; perl: 11; awk: 6
file content (108 lines) | stat: -rw-r--r-- 4,019 bytes parent folder | download | duplicates (4)
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
#############################################################################
##
#W  pcgsnice.gi                 GAP library                    Heiko Thei"sen
##
#H  @(#)$Id: pcgsnice.gi,v 4.9 2002/04/15 10:05:12 sal Exp $
##
#Y  Copyright (C)  1997,  Lehrstuhl D fuer Mathematik,  RWTH Aachen, Germany
#Y  (C) 1998 School Math and Comp. Sci., University of St.  Andrews, Scotland
#Y  Copyright (C) 2002 The GAP Group
##
Revision.pcgsnice_gi :=
    "@(#)$Id: pcgsnice.gi,v 4.9 2002/04/15 10:05:12 sal Exp $";

#############################################################################
##
#M  Pcgs( <G> ) . . . . . . . . . . . . . . . . . . . . via nice monomorphism
##
InstallMethod( Pcgs, "via niceomorphism", true, 
  [ IsGroup and IsHandledByNiceMonomorphism ], 0,
    function( G )
    local   nice,  npcgs,  pcgs;
    
    nice := NiceMonomorphism( G );
    npcgs := Pcgs( NiceObject( G ) );
    if npcgs = fail  then
        return fail;
    fi;
    pcgs := List( npcgs, gen -> PreImagesRepresentative( nice, gen ) );
    pcgs := PcgsByPcSequenceNC( ElementsFamily( FamilyObj( G ) ), pcgs );
    if HasIsPrimeOrdersPcgs( npcgs )  and  IsPrimeOrdersPcgs( npcgs )  then
        SetIsPrimeOrdersPcgs( pcgs, true );
    fi;
    SetNiceMonomorphism( pcgs, nice );
    SetNiceObject      ( pcgs, npcgs );
    SetGroupOfPcgs     ( pcgs, G );
    SetOneOfPcgs(pcgs,One(G));
    SetFilterObj       ( pcgs, IsHandledByNiceMonomorphism );
    return pcgs;
end );

#############################################################################
##
#M  DepthOfPcElement( <pcgs>, <g> [ , <from> ] )  . . . via nice monomorphism
##
AttributeMethodByNiceMonomorphismCollElm( DepthOfPcElement,
        [ IsPcgs, IsMultiplicativeElementWithInverse ] );

InstallOtherMethod( DepthOfPcElement, true,
        [ IsPcgs and IsHandledByNiceMonomorphism,
          IsMultiplicativeElementWithInverse,
          IsPosInt ], 0,
    function( pcgs, g, depth )
    return DepthOfPcElement( NiceObject( pcgs ),
                   ImagesRepresentative( NiceMonomorphism( pcgs ), g ),
                   depth );
end );
    
#############################################################################
##
#M  LeadingExponentOfPcElement( <pcgs>, <g> ) . . . . . via nice monomorphism
##
AttributeMethodByNiceMonomorphismCollElm( LeadingExponentOfPcElement,
        [ IsPcgs, IsMultiplicativeElementWithInverse ] );

#############################################################################
##
#M  ExponentsOfPcElement( <pcgs>, <g> [ , <poss> ] )  . via nice monomorphism
##
AttributeMethodByNiceMonomorphismCollElm( ExponentsOfPcElement,
        [ IsPcgs, IsMultiplicativeElementWithInverse ] );

InstallOtherMethod( ExponentsOfPcElement, true,
        [ IsPcgs and IsHandledByNiceMonomorphism,
          IsMultiplicativeElementWithInverse,
          IsList and IsCyclotomicCollection ], 0,
    function( pcgs, g, poss )
    return ExponentsOfPcElement( NiceObject( pcgs ),
                   ImagesRepresentative( NiceMonomorphism( pcgs ), g ),
                   poss );
end );

InstallOtherMethod( ExponentsOfPcElement, "perm group with 0 positions", true,
        [ IsPcgs and IsHandledByNiceMonomorphism,
          IsMultiplicativeElementWithInverse,
          IsList and IsEmpty ], 0,
    function( pcgs, g, poss )
    return [  ];
end );

#############################################################################
##
#M  ExponentOfPcElement( <pcgs>, <g>, <pos> ) . . . . . via nice monomorphism
##
InstallMethod( ExponentOfPcElement, "via nicoemorphism", true,
        [ IsPcgs and IsHandledByNiceMonomorphism,
          IsMultiplicativeElementWithInverse,
          IsPosInt ], 0,
    function( pcgs, g, pos )
    return ExponentOfPcElement( NiceObject( pcgs ),
                   ImagesRepresentative( NiceMonomorphism( pcgs ), g ),
                   pos );
end );


#############################################################################
##
#E  pcgsnice.gi . . . . . . . . . . . . . . . . . . . . . . . . . . ends here