File: cong.gd

package info (click to toggle)
gap-congruence 1.2.7-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 928 kB
  • sloc: xml: 1,000; javascript: 155; makefile: 108
file content (260 lines) | stat: -rw-r--r-- 9,455 bytes parent folder | download | duplicates (2)
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
#############################################################################
##
#W cong.gd                 The Congruence package                   Ann Dooms
#W                                                               Eric Jespers
#W                                                         Olexandr Konovalov
##
##
#############################################################################


#############################################################################
##
## InfoCongruence
##  
## We declare new Info class for algorithms from the Congruence package. It
## has 3 levels - 0, 1 and 2. Default level is 1, and it is used to display
## messages when the package is used to replace existing GAP methods.
## To change Info level to k, use command SetInfoLevel(InfoCongruence, k)
DeclareInfoClass("InfoCongruence");


#############################################################################
##
## IsCongruenceSubgroup( <G> )
## 
## We create category of congruence subgroups as a subcategory of matrix 
## groups, and declare properties that are used to distinguish several
## important classes of congruence subgroups
DeclareCategory( "IsCongruenceSubgroup", IsMatrixGroup );


#############################################################################
##
## IsPrincipalCongruenceSubgroup( <G> )
## 
## The principal congruence subgroup of level N consists of all matrices
## of the form   [ 1+N    N ]
##               [   N  1+N ]
##
DeclareProperty( "IsPrincipalCongruenceSubgroup", IsCongruenceSubgroup );
InstallTrueMethod(IsCongruenceSubgroup, IsPrincipalCongruenceSubgroup);


#############################################################################
##
## IsCongruenceSubgroupGamma0( <G> )
## 
## The congruence subgroup CongruenceSubgroupGamma0(N) consists of all matrices
## of the form   [   *    * ]
##               [   N    * ]
##
DeclareProperty( "IsCongruenceSubgroupGamma0", IsCongruenceSubgroup );
InstallTrueMethod(IsCongruenceSubgroup, IsCongruenceSubgroupGamma0);


#############################################################################
##
## IsCongruenceSubgroupGammaUpper0( <G> )
## 
## The congruence subgroup CongruenceSubgroupGammaUpper0(N) consists of all matrices
## of the form   [   *    N ]
##               [   *    * ]
##
DeclareProperty( "IsCongruenceSubgroupGammaUpper0", IsCongruenceSubgroup );
InstallTrueMethod(IsCongruenceSubgroup, IsCongruenceSubgroupGammaUpper0);


#############################################################################
##
## IsCongruenceSubgroupGamma1( <G> )
## 
## The congruence subgroup CongruenceSubgroupGamma1(N) consists of all matrices
## of the form   [ 1+N    * ]
##               [   N  1+N ]
##
DeclareProperty( "IsCongruenceSubgroupGamma1", IsCongruenceSubgroup );
InstallTrueMethod(IsCongruenceSubgroup, IsCongruenceSubgroupGamma1);


#############################################################################
##
## IsCongruenceSubgroupGammaUpper1( <G> )
## 
## The congruence subgroup CongruenceSubgroupGammaUpper1(N) consists of all matrices
## of the form   [ 1+N    N ]
##               [   *  1+N ]
##
DeclareProperty( "IsCongruenceSubgroupGammaUpper1", IsCongruenceSubgroup );
InstallTrueMethod(IsCongruenceSubgroup, IsCongruenceSubgroupGammaUpper1);


#############################################################################
##
## IsCongruenceSubgroupGammaMN( <G> )
## 
## The congruence subgroup CongruenceSubgroupGammaMN(M,N) consists of all matrices 
## of the form   [ 1+M    M ]
##               [   N  1+N ]
##
DeclareProperty( "IsCongruenceSubgroupGammaMN", IsCongruenceSubgroup );
InstallTrueMethod(IsCongruenceSubgroup, IsCongruenceSubgroupGammaMN);


#############################################################################
##
## IsIntersectionOfCongruenceSubgroups( <G> )
## 
## This property will be uses for subgroups of SL_2(Z) that were constructed
## as intersection of a finite number of congruence subgroups of types 
## CongruenceSubgroupGamma, CongruenceSubgroupGamma_0, 
## CongruenceSubgroupGamma^0, CongruenceSubgroupGamma_1,
## CongruenceSubgroupGamma^1 and CongruenceSubgroupGammaMN
##
DeclareProperty( "IsIntersectionOfCongruenceSubgroups", IsCongruenceSubgroup );
InstallTrueMethod(IsCongruenceSubgroup, IsIntersectionOfCongruenceSubgroups);


#############################################################################
##
## PrincipalCongruenceSubgroup( n )
## CongruenceSubgroupGamma0( n )
## CongruenceSubgroupGammaUpper0( n )
## CongruenceSubgroupGamma1( n )
## CongruenceSubgroupGammaUpper1( n )
## CongruenceSubgroupGammaMN( m, n )
##
## Declaration of global functions - constructors of congruence subgroups
##
DeclareOperation("PrincipalCongruenceSubgroup", [IsPosInt]);
DeclareOperation("CongruenceSubgroupGamma0", [IsPosInt]);
DeclareOperation("CongruenceSubgroupGammaUpper0", [IsPosInt]);
DeclareOperation("CongruenceSubgroupGamma1", [IsPosInt]);
DeclareOperation("CongruenceSubgroupGammaUpper1", [IsPosInt]);
DeclareOperation("CongruenceSubgroupGammaMN", [IsPosInt,IsPosInt]);


#############################################################################
##
## LevelOfCongruenceSubgroup( <G> )
##
## The (arithmetic) level of a congruence subgroup G is the smallest positive
## number N such that G contains the principal congruence subgroup of level N
##
DeclareAttribute( "LevelOfCongruenceSubgroup", IsCongruenceSubgroup );


#############################################################################
##
## LevelOfCongruenceSubgroupGammaMN( <G> )
##
## For the congruence subgroup GammaMN we need to store additionally
## two integers determining the 1st and 2nd lines of the matrix
##
DeclareAttribute( "LevelOfCongruenceSubgroupGammaMN", IsCongruenceSubgroup );


#############################################################################
##
## IndexInSL2Z( <G> )
##
## The index of a congruence subgroup in SL_2(Z) will be stored as its 
## attribute. This also will allow us to install a method for Index(G,H) when
## G is SL_2(Z) and H is a congruence subgroup. You should remember that we
## are working with the SL_2(Z), because it is available in GAP, and not with
## the PSL_2(Z) since the latter is not implemented in GAP.
##
DeclareAttribute( "IndexInSL2Z", IsCongruenceSubgroup );


#############################################################################
##
## IntersectionOfCongruenceSubgroups( <list of subgroups> )
##
## We declare special type of congruence subgroups that are intersections of
## a finite number congruence subgroups of types CongruenceSubgroupGamma, 
## CongruenceSubgroupGamma_0, CongruenceSubgroupGamma^0, CongruenceSubgroupGamma_1 
## and CongruenceSubgroupGamma^1. The list of subgroups defining this 
##  intersection will be stored in the attribute "DefiningCongruenceSubgroups".
##
DeclareGlobalFunction("IntersectionOfCongruenceSubgroups");
DeclareAttribute( "DefiningCongruenceSubgroups", 
                  IsCongruenceSubgroup );
                  
#############################################################################
#
# CanEasilyCompareCongruenceSubgroups( G, H )
#
DeclareOperation( "CanEasilyCompareCongruenceSubgroups", [ IsCongruenceSubgroup, IsCongruenceSubgroup ] );


#############################################################################
#
# CanReduceIntersectionOfCongruenceSubgroups( G, H )
#
# This function mimics the structure of the method for Intersection for
# congruence subgroups. It returns true, if their intersection can be reduced
# to one of the canonical congruence subgroups, and false otherwise, i.e. the
# intersection can be expressed only as IntersectionOfCongruenceSubgroups.
# This is used in IntersectionOfCongruenceSubgroups to reduce the list of
# canonical subgroups forming the intersection.
#
DeclareOperation( "CanReduceIntersectionOfCongruenceSubgroups", [ IsCongruenceSubgroup, IsCongruenceSubgroup ] );


#############################################################################
#
# NumeratorOfGFSElement( gfs, i )
#
# Returns the numerator of the i-th term of the generalised Farey sequence 
# gfs: for the 1st infinite entry returns -1, for the last one returns 1,
# for all other entries returns usual numerator.
#  
DeclareGlobalFunction( "NumeratorOfGFSElement" );


#############################################################################
#
# DenominatorOfGFSElement( gfs, i )
#
# Returns the denominator of the i-th term of the generalised Farey sequence 
# gfs: for both infinite entries returns 0, for the other ones returns usual 
# denominator.
# 
DeclareGlobalFunction( "DenominatorOfGFSElement" );


#############################################################################
#
# IsValidFareySymbol( fs )
#
# This function is used in FareySymbolByData to validate its output
# 
DeclareGlobalFunction( "IsValidFareySymbol" );


#############################################################################
#
# MatrixByEvenInterval( gfs, i )
#
DeclareGlobalFunction( "MatrixByEvenInterval" );


#############################################################################
#
# MatrixByOddInterval( gfs, i ) 
#
DeclareGlobalFunction( "MatrixByOddInterval" );


#############################################################################
#
# MatrixByFreePairOfIntervals( gfs, k, kp )
#
DeclareGlobalFunction( "MatrixByFreePairOfIntervals" );


#############################################################################
##
#E
##