File: classic.gd

package info (click to toggle)
gap 4r4p12-2
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 29,584 kB
  • ctags: 7,113
  • sloc: ansic: 98,786; sh: 3,299; perl: 2,263; makefile: 498; asm: 63; awk: 6
file content (513 lines) | stat: -rw-r--r-- 18,299 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
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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
#############################################################################
##
#W  classic.gd                  GAP Library                      Frank Celler
##
#H  @(#)$Id: classic.gd,v 4.16 2002/09/05 14:40:23 gap Exp $
##
#Y  Copyright (C)  1996,  Lehrstuhl D fuer Mathematik,  RWTH Aachen,  Germany
##
##  This file contains the operations for the construction of the classical
##  group types.
##
Revision.classic_gd :=
    "@(#)$Id: classic.gd,v 4.16 2002/09/05 14:40:23 gap Exp $";


#############################################################################
#1
##  The following functions return classical groups.
##  For the linear, symplectic, and unitary groups (the latter in dimension
##  at least $3$), the generators are taken from~\cite{Tay87};
##  for the unitary groups in dimension 2, the isomorphism of $SU(2,q)$ and
##  $SL(2,q)$ is used, see for example~\cite{Hup67}.
##  The generators of the orthogonal groups are taken
##  from~\cite{IshibashiEarnest94} and~\cite{KleidmanLiebeck90},
##  except that the generators of the orthogonal groups in odd dimension in
##  even characteristic are constructed via the isomorphism to a symplectic
##  group, see for example~\cite{Car72a}.
##
##  For symplectic and orthogonal matrix groups returned by the functions
##  described below, the invariant bilinear form is stored as the value of
##  the attribute `InvariantBilinearForm' (see~"InvariantBilinearForm").
##  Analogously, the invariant sesquilinear form defining the unitary groups
##  is stored as the value of the attribute `InvariantSesquilinearForm'
##  (see~"InvariantSesquilinearForm").
##  The defining quadratic form of orthogonal groups is stored as the value
##  of the attribute `InvariantQuadraticForm' (see~"InvariantQuadraticForm").
##


#############################################################################
##
#O  GeneralLinearGroupCons( <filter>, <d>, <R> )
##
DeclareConstructor( "GeneralLinearGroupCons", [ IsGroup, IsInt, IsRing ] );


#############################################################################
##
#F  GeneralLinearGroup( [<filt>, ]<d>, <R> )  . . . . .  general linear group
#F  GL( [<filt>, ]<d>, <R> )
#F  GeneralLinearGroup( [<filt>, ]<d>, <q> )
#F  GL( [<filt>, ]<d>, <q> )
##
##  The first two forms construct a group isomorphic to the general linear
##  group GL( <d>, <R> ) of all $<d> \times <d>$ matrices that are invertible
##  over the ring <R>, in the category given by the filter <filt>.
##
##  The third and the fourth form construct the general linear group over the
##  finite field with <q> elements.
##  
##  If <filt> is not given it defaults to `IsMatrixGroup',
##  and the returned group is the general linear group as a matrix group in
##  its natural action (see also~"IsNaturalGL", "IsNaturalGLnZ").
##
##  Currently supported rings <R> are finite fields, the ring `Integers',
##  and residue class rings `Integers mod <m>'.
##
BindGlobal( "GeneralLinearGroup", function ( arg )
  if Length( arg ) = 2 then
    if IsRing( arg[2] ) then
      return GeneralLinearGroupCons( IsMatrixGroup, arg[1], arg[2] );
    elif IsPrimePowerInt( arg[2] ) then
      return GeneralLinearGroupCons( IsMatrixGroup, arg[1], GF( arg[2] ) );
    fi;
  elif Length( arg ) = 3 and IsOperation( arg[1] ) then
    if IsRing( arg[2] ) then
      return GeneralLinearGroupCons( arg[1], arg[2], arg[3] );
    elif IsPrimePowerInt( arg[3] ) then
      return GeneralLinearGroupCons( arg[1], arg[2], GF( arg[3] ) );
    fi;
  fi;
  Error( "usage: GeneralLinearGroup( [<filter>, ]<d>, <R> )" );
end );

DeclareSynonym( "GL", GeneralLinearGroup );


#############################################################################
##
#O  GeneralOrthogonalGroupCons( <filter>, <e>, <d>, <q> )
##
DeclareConstructor( "GeneralOrthogonalGroupCons",
    [ IsGroup, IsInt, IsPosInt, IsPosInt ] );


#############################################################################
##
#F  GeneralOrthogonalGroup( [<filt>, ][<e>, ]<d>, <q> ) .  gen. orthog. group
#F  GO( [<filt>, ][<e>, ]<d>, <q> )
##
##  constructs a group isomorphic to the
##  general orthogonal group GO( <e>, <d>, <q> ) of those $<d> \times <d>$
##  matrices over the field with <q> elements that respect a non-singular
##  quadratic form (see~"InvariantQuadraticForm") specified by <e>,
##  in the category given by the filter <filt>.
##  
##  The value of <e> must be $0$ for odd <d> (and can optionally be 
##  omitted in this case), respectively  one of  $1$ or $-1$ for even <d>.
##  If <filt> is not given it defaults to `IsMatrixGroup',
##  and the returned group is the general orthogonal group itself.
##
##  Note that in~\cite{KleidmanLiebeck90}, GO is defined as the stabilizer
##  $\Delta(V,F,\kappa)$ of the quadratic form, up to scalars,
##  whereas our GO is called $I(V,F,\kappa)$ there.
##
BindGlobal( "GeneralOrthogonalGroup", function ( arg )

  if   Length( arg ) = 2 then
    return GeneralOrthogonalGroupCons( IsMatrixGroup, 0, arg[1], arg[2] );
  elif Length( arg ) = 3 and ForAll( arg, IsInt ) then
    return GeneralOrthogonalGroupCons( IsMatrixGroup,arg[1],arg[2],arg[3] );
  elif IsOperation( arg[1] ) then
    if   Length( arg ) = 3 then
      return GeneralOrthogonalGroupCons( arg[1], 0, arg[2], arg[3] );
    elif Length( arg ) = 4 then
      return GeneralOrthogonalGroupCons( arg[1], arg[2], arg[3], arg[4] );
    fi;
  fi;
  Error( "usage: GeneralOrthogonalGroup( [<filter>, ][<e>, ]<d>, <q> )" );

end );

DeclareSynonym( "GO", GeneralOrthogonalGroup );


#############################################################################
##
#O  GeneralUnitaryGroupCons( <filter>, <d>, <q> )
##
DeclareConstructor( "GeneralUnitaryGroupCons",
    [ IsGroup, IsPosInt, IsPosInt ] );


#############################################################################
##
#F  GeneralUnitaryGroup( [<filt>, ]<d>, <q> ) . . . . . general unitary group
#F  GU( [<filt>, ]<d>, <q> )
##
##  constructs a group isomorphic to the general unitary group GU( <d>, <q> )
##  of those $<d> \times <d>$ matrices over the field with $<q>^2$ elements
##  that respect a fixed nondegenerate sesquilinear form,
##  in the category given by the filter <filt>.
##
##  If <filt> is not given it defaults to `IsMatrixGroup',
##  and the returned group is the general unitary group itself.
##
BindGlobal( "GeneralUnitaryGroup", function ( arg )

  if Length( arg ) = 2 then
    return GeneralUnitaryGroupCons( IsMatrixGroup, arg[1], arg[2] );
  elif IsOperation( arg[1] ) then

    if Length( arg ) = 3 then
      return GeneralUnitaryGroupCons( arg[1], arg[2], arg[3] );
    fi;
  fi;
  Error( "usage: GeneralUnitaryGroup( [<filter>, ]<d>, <q> )" );

end );

DeclareSynonym( "GU", GeneralUnitaryGroup );


#############################################################################
##
#O  SpecialLinearGroupCons( <filter>, <d>, <R> )
##
DeclareConstructor( "SpecialLinearGroupCons", [ IsGroup, IsInt, IsRing ] );


#############################################################################
##
#F  SpecialLinearGroup( [<filt>, ]<d>, <R> )  . . . . .  special linear group
#F  SL( [<filt>, ]<d>, <R> )
#F  SpecialLinearGroup( [<filt>, ]<d>, <q> )
#F  SL( [<filt>, ]<d>, <q> )
##
##  The first two forms construct a group isomorphic to the special linear
##  group SL( <d>, <R> ) of all those $<d> \times <d>$ matrices over the
##  ring <R> whose determinant is the identity of <R>,
##  in the category given by the filter <filt>.
##
##  The third and the fourth form construct the special linear group over the
##  finite field with <q> elements.
##
##  If <filt> is not given it defaults to `IsMatrixGroup',
##  and the returned group is the special linear group as a matrix group in
##  its natural action (see also~"IsNaturalSL", "IsNaturalSLnZ").
##
##  Currently supported rings <R> are finite fields, the ring `Integers',
##  and residue class rings `Integers mod <m>'.
##
BindGlobal( "SpecialLinearGroup", function ( arg )
  if Length( arg ) = 2  then
    if IsRing( arg[2] ) then
      return SpecialLinearGroupCons( IsMatrixGroup, arg[1], arg[2] );
    elif IsPrimePowerInt( arg[2] ) then
      return SpecialLinearGroupCons( IsMatrixGroup, arg[1], GF( arg[2] ) );
    fi;
  elif Length( arg ) = 3 and IsOperation( arg[1] ) then
    if IsRing( arg[2] ) then
      return SpecialLinearGroupCons( arg[1], arg[2], arg[3] );
    elif IsPrimePowerInt( arg[3] ) then
      return SpecialLinearGroupCons( arg[1], arg[2], GF( arg[3] ) );
    fi;
  fi;
  Error( "usage: SpecialLinearGroup( [<filter>, ]<d>, <R> )" );

end );

DeclareSynonym( "SL", SpecialLinearGroup );


#############################################################################
##
#O  SpecialOrthogonalGroupCons( <filter>, <e>, <d>, <q> )
##
DeclareConstructor( "SpecialOrthogonalGroupCons",
    [ IsGroup, IsInt, IsPosInt, IsPosInt ] );


#############################################################################
##
#F  SpecialOrthogonalGroup( [<filt>, ][<e>, ]<d>, <q> ) . spec. orthog. group
#F  SO( [<filt>, ][<e>, ]<d>, <q> )
##
##  `SpecialOrthogonalGroup' returns a group isomorphic to the 
##  special orthogonal group SO( <e>, <d>, <q> ), which is the subgroup of
##  all those matrices in the general orthogonal group
##  (see~"GeneralOrthogonalGroup") that have determinant one,
##  in the category given by the filter <filt>.
##  (The index of SO( <e>, <d>, <q> ) in GO( <e>, <d>, <q> ) is $2$ if <q> is
##  odd, and $1$ if <q> is even.)
#T Also interesting is the group Omega( <e>, <d>, <q> ), which is always of
#T index $2$ in SO( <e>, <d>, <q> );
#T this is the subgroup of all matrices with square spinor norm in odd
#T characteristic or Dickson invariant $0$ in even characteristic.
##
##  If <filt> is not given it defaults to `IsMatrixGroup',
##  and the returned group is the special orthogonal group itself.
##
BindGlobal( "SpecialOrthogonalGroup", function ( arg )

  if   Length( arg ) = 2 then
    return SpecialOrthogonalGroupCons( IsMatrixGroup, 0, arg[1], arg[2] );
  elif Length( arg ) = 3 and ForAll( arg, IsInt ) then
    return SpecialOrthogonalGroupCons( IsMatrixGroup,arg[1],arg[2],arg[3] );
  elif IsOperation( arg[1] ) then
    if   Length( arg ) = 3 then
      return SpecialOrthogonalGroupCons( arg[1], 0, arg[2], arg[3] );
    elif Length( arg ) = 4 then
      return SpecialOrthogonalGroupCons( arg[1], arg[2], arg[3], arg[4] );
    fi;
  fi;
  Error( "usage: SpecialOrthogonalGroup( [<filter>, ][<e>, ]<d>, <q> )" );

end );

DeclareSynonym( "SO", SpecialOrthogonalGroup );


#############################################################################
##
#O  SpecialUnitaryGroupCons( <filter>, <d>, <q> )
##
DeclareConstructor( "SpecialUnitaryGroupCons",
    [ IsGroup, IsPosInt, IsPosInt ] );


#############################################################################
##
#F  SpecialUnitaryGroup( [<filt>, ]<d>, <q> ) . . . . . general unitary group
#F  SU( [<filt>, ]<d>, <q> )
##
##  constructs a group isomorphic to the special unitary group `GU(<d>, <q>)'
##  of those $<d> \times <d>$ matrices over the field with $<q>^2$ elements
##  whose determinant is the identity of the field and that respect a fixed
##  nondegenerate sesquilinear form,
##  in the category given by the filter <filt>.
##
##  If <filt> is not given it defaults to `IsMatrixGroup',
##  and the returned group is the special unitary group itself.
##
BindGlobal( "SpecialUnitaryGroup", function ( arg )

  if Length( arg ) = 2 then
    return SpecialUnitaryGroupCons( IsMatrixGroup, arg[1], arg[2] );
  elif IsOperation( arg[1] ) then

    if Length( arg ) = 3 then
      return SpecialUnitaryGroupCons( arg[1], arg[2], arg[3] );
    fi;
  fi;
  Error( "usage: SpecialUnitaryGroup( [<filter>, ]<d>, <q> )" );

end );

DeclareSynonym( "SU", SpecialUnitaryGroup );


#############################################################################
##
#O  SymplecticGroupCons( <filter>, <d>, <q> )
##
DeclareConstructor( "SymplecticGroupCons", [ IsGroup, IsPosInt, IsPosInt ] );


#############################################################################
##
#F  SymplecticGroup( [<filt>, ]<d>, <q> ) . . . . . . . . .  symplectic group
#F  Sp( [<filt>, ]<d>, <q> )
#F  SP( [<filt>, ]<d>, <q> )
##
##  constructs a group isomorphic to the symplectic group Sp( <d>, <q> )
##  of those $<d> \times <d>$ matrices over the field with <q> elements
##  that respect a fixed nondegenerate symplectic form,
##  in the category given by the filter <filt>.
##
##  If <filt> is not given it defaults to `IsMatrixGroup',
##  and the returned group is the symplectic group itself.
##
BindGlobal( "SymplecticGroup", function ( arg )

  if Length( arg ) = 2 then
    return SymplecticGroupCons( IsMatrixGroup, arg[1], arg[2] );
  elif IsOperation( arg[1] ) then

    if Length( arg ) = 3 then
      return SymplecticGroupCons( arg[1], arg[2], arg[3] );
    fi;
  fi;
  Error( "usage: SymplecticGroup( [<filter>, ]<d>, <q> )" );

end );

DeclareSynonym( "Sp", SymplecticGroup );
DeclareSynonym( "SP", SymplecticGroup );


BindGlobal("DECLARE_PROJECTIVE_GROUPS_OPERATION",
  # (<name>,<abbreviation>,<fieldextdeg>,<sizefunc-or-fail>)
  function(nam,abbr,extdeg,szf)
local pnam,cons,opr;
  opr:=VALUE_GLOBAL(nam);
  pnam:=Concatenation("Projective",nam);
  cons:=NewConstructor(Concatenation(pnam,"Cons"),[IsGroup,IsInt,IsInt]);
  BindGlobal(Concatenation(pnam,"Cons"),cons);
  BindGlobal(pnam,function(arg)
    if Length(arg) = 2  then
      return cons( IsPermGroup, arg[1], arg[2] );
    elif IsOperation(arg[1]) then
      if Length(arg) = 3  then
	return cons( arg[1], arg[2], arg[3] );
      fi;
    fi;
    Error( "usage: ",pnam,"( [<filter>, ]<d>, <q> )" );
  end );
  DeclareSynonym(Concatenation("P",abbr),VALUE_GLOBAL(pnam));

  # install a method to get the permutation action on lines
  InstallMethod( cons,"action on lines",
      [ IsPermGroup, IsPosInt,IsPosInt ],
  function(fil,n,q)
  local g,f,p;
    g:=opr(IsMatrixGroup,n,q);
    f:=GF(q^extdeg);
    p:=ProjectiveActionOnFullSpace(g,f,n);
    if szf<>fail then
      SetSize(p,szf(n,q,g));
    fi;
    return p;
  end);

end);


#############################################################################
##
#F  ProjectiveGeneralLinearGroup( [<filt>, ]<d>, <q> )
#F  PGL( [<filt>, ]<d>, <q> )
##
##  constructs a group isomorphic to the projective general linear group
##  PGL( <d>, <q> ) of those $<d> \times <d>$ matrices over the field with
##  <q> elements, modulo the
##  centre, in the category given by the filter <filt>.
##
##  If <filt> is not given it defaults to `IsPermGroup',
##  and the returned group is the action on lines of the underlying vector
##  space.
##

#PseudoDeclare("ProjectiveGeneralLinearGroup");
#PseudoDeclare("PGL");
DECLARE_PROJECTIVE_GROUPS_OPERATION("GeneralLinearGroup","GL",1,
  # size function
  function(n,q,g)
    return Size(g)/(q-1);
  end);


#############################################################################
##
#F  ProjectiveSpecialLinearGroup( [<filt>, ]<d>, <q> )
#F  PSL( [<filt>, ]<d>, <q> )
##
##  constructs a group isomorphic to the projective special linear group
##  PSL( <d>, <q> ) of those $<d> \times <d>$ matrices over the field with
##  <q> elements whose determinant is the identity of the field, modulo the
##  centre, in the category given by the filter <filt>.
##
##  If <filt> is not given it defaults to `IsPermGroup',
##  and the returned group is the action on lines of the underlying vector
##  space.
##

#PseudoDeclare("ProjectiveSpecialLinearGroup");
#PseudoDeclare("PSL");
DECLARE_PROJECTIVE_GROUPS_OPERATION("SpecialLinearGroup","SL",1,
  # size function
  function(n,q,g)
    return Size(g)/Gcd(n,q-1);
  end);


#############################################################################
##
#F  ProjectiveGeneralUnitaryGroup( [<filt>, ]<d>, <q> )
#F  PGU( [<filt>, ]<d>, <q> )
##
##  constructs a group isomorphic to the projective general unitary group
##  PGU( <d>, <q> ) of those $<d> \times <d>$ matrices over the field with
##  $<q>^2$ elements that respect a fixed nondegenerate sesquilinear form,
##  modulo the centre, in the category given by the filter <filt>.
##
##  If <filt> is not given it defaults to `IsPermGroup',
##  and the returned group is the action on lines of the underlying vector
##  space.
##

#PseudoDeclare("ProjectiveGeneralUnitaryGroup");
#PseudoDeclare("PGU");
DECLARE_PROJECTIVE_GROUPS_OPERATION("GeneralUnitaryGroup","GU",2,
  # size function
  function(n,q,g)
    return Size(g)/(q+1);
  end);


#############################################################################
##
#F  ProjectiveSpecialUnitaryGroup( [<filt>, ]<d>, <q> )
#F  PSU( [<filt>, ]<d>, <q> )
##
##  constructs a group isomorphic to the projective special unitary group
##  PSU( <d>, <q> ) of those $<d> \times <d>$ matrices over the field with
##  $<q>^2$ elements that respect a fixed nondegenerate sesquilinear form
##  and have determinant 1,
##  modulo the centre, in the category given by the filter <filt>.
##
##  If <filt> is not given it defaults to `IsPermGroup',
##  and the returned group is the action on lines of the underlying vector
##  space.
##

#PseudoDeclare("ProjectiveSpecialUnitaryGroup");
#PseudoDeclare("PSU");
DECLARE_PROJECTIVE_GROUPS_OPERATION("SpecialUnitaryGroup","SU",2,
  # size function
  function(n,q,g)
    return Size(g)/Gcd(n,q+1);
  end);


#############################################################################
##
#F  ProjectiveSymplecticGroup( [<filt>, ]<d>, <q> )
#F  PSP( [<filt>, ]<d>, <q> )
#F  PSp( [<filt>, ]<d>, <q> )
##
##  constructs a group isomorphic to the projective symplectic group
##  PSp(<d>,<q>) of those $<d> \times <d>$ matrices over the field with <q>
##  elements that respect a fixed nondegenerate symplectic form, modulo the
##  centre, in the category given by the filter <filt>.
##
##  If <filt> is not given it defaults to `IsPermGroup',
##  and the returned group is the action on lines of the underlying vector
##  space.
##

#PseudoDeclare("ProjectiveSymplecticGroup");
#PseudoDeclare("PSP");
DECLARE_PROJECTIVE_GROUPS_OPERATION("SymplecticGroup","SP",1,
  # size function
  function(n,q,g)
    return Size(g)/Gcd(2,q-1);
  end);
DeclareSynonym( "PSp", PSP );


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