This file is indexed.

/usr/share/axiom-20170501/src/algebra/PGE.spad is in axiom-source 20170501-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
)abbrev package PGE PermutationGroupExamples
++ Authors: M. Weller, G. Schneider, J. Grabmeier
++ Date Created: 20 February 1990
++ Date Last Updated: 09 June 1990
++ References:
++  J. Conway, R. Curtis, S. Norton, R. Parker, R. Wilson:
++   Atlas of Finite Groups, Oxford, Clarendon Press, 1987
++ Description: 
++ PermutationGroupExamples provides permutation groups for
++ some classes of groups: symmetric, alternating, dihedral, cyclic,
++ direct products of cyclic, which are in fact the finite abelian groups
++ of symmetric groups called Young subgroups.
++ Furthermore, Rubik's group as permutation group of 48 integers and a list
++ of sporadic simple groups derived from the atlas of finite groups.

PermutationGroupExamples() : SIG == CODE where

  L          ==> List
  I          ==> Integer
  PI         ==> PositiveInteger
  NNI        ==> NonNegativeInteger
  PERM       ==> Permutation
  PERMGRP   ==> PermutationGroup

  SIG ==> with

    symmetricGroup : PI -> PERMGRP I
      ++ symmetricGroup(n) constructs the symmetric group Sn
      ++ acting on the integers 1,...,n, generators are the
      ++ n-cycle (1,...,n) and the 2-cycle (1,2).

    symmetricGroup : L I -> PERMGRP I
      ++ symmetricGroup(li) constructs the symmetric group acting on
      ++ the integers in the list li, generators are the
      ++ cycle given by li and the 2-cycle (li.1,li.2).
      ++ Note that duplicates in the list will be removed.

    alternatingGroup : PI -> PERMGRP I
      ++ alternatingGroup(n) constructs the alternating group An
      ++ acting on the integers 1,...,n,  generators are in general the
      ++ n-2-cycle (3,...,n) and the 3-cycle (1,2,3)
      ++ if n is odd and the product of the 2-cycle (1,2) with
      ++ n-2-cycle (3,...,n) and the 3-cycle (1,2,3)
      ++ if n is even.

    alternatingGroup : L I -> PERMGRP I
      ++ alternatingGroup(li) constructs the alternating group acting
      ++ on the integers in the list li, generators are in general the
      ++ n-2-cycle (li.3,...,li.n) and the 3-cycle
      ++ (li.1,li.2,li.3), if n is odd and
      ++ product of the 2-cycle (li.1,li.2) with
      ++ n-2-cycle (li.3,...,li.n) and the 3-cycle
      ++ (li.1,li.2,li.3), if n is even.
      ++ Note that duplicates in the list will be removed.

    abelianGroup : L PI -> PERMGRP I
      ++ abelianGroup([n1,...,nk]) constructs the abelian group that
      ++ is the direct product of cyclic groups with order ni.

    cyclicGroup : PI -> PERMGRP I
      ++ cyclicGroup(n) constructs the cyclic group of order n acting
      ++ on the integers 1,...,n.

    cyclicGroup : L I -> PERMGRP I
      ++ cyclicGroup([i1,...,ik]) constructs the cyclic group of
      ++ order k acting on the integers i1,...,ik.
      ++ Note that duplicates in the list will be removed.

    dihedralGroup : PI -> PERMGRP I
      ++ dihedralGroup(n) constructs the dihedral group of order 2n
      ++ acting on integers 1,...,N.

    dihedralGroup : L I -> PERMGRP I
      ++ dihedralGroup([i1,...,ik]) constructs the dihedral group of
      ++ order 2k acting on the integers out of i1,...,ik.
      ++ Note that duplicates in the list will be removed.

    mathieu11 : L I -> PERMGRP I
      ++ mathieu11(li) constructs the mathieu group acting on the 11
      ++ integers given in the list li.
      ++ Note that duplicates in the list will be removed.
      ++ error, if li has less or more than 11 different entries.

    mathieu11 : () -> PERMGRP I
      ++ mathieu11 constructs the mathieu group acting on the
      ++ integers 1,...,11.

    mathieu12 : L I -> PERMGRP I
      ++ mathieu12(li) constructs the mathieu group acting on the 12
      ++ integers given in the list li.
      ++ Note that duplicates in the list will be removed
      ++ Error: if li has less or more than 12 different entries.

    mathieu12 : () -> PERMGRP I
      ++ mathieu12 constructs the mathieu group acting on the
      ++ integers 1,...,12.

    mathieu22 : L I -> PERMGRP I
      ++ mathieu22(li) constructs the mathieu group acting on the 22
      ++ integers given in the list li.
      ++ Note that duplicates in the list will be removed.
      ++ Error: if li has less or more than 22 different entries.

    mathieu22 : () -> PERMGRP I
      ++ mathieu22 constructs the mathieu group acting on the
      ++ integers 1,...,22.

    mathieu23 : L I -> PERMGRP I
      ++ mathieu23(li) constructs the mathieu group acting on the 23
      ++ integers given in the list li.
      ++ Note that duplicates in the list will be removed.
      ++ Error: if li has less or more than 23 different entries.

    mathieu23 : () -> PERMGRP I
      ++ mathieu23 constructs the mathieu group acting on the
      ++ integers 1,...,23.

    mathieu24 : L I -> PERMGRP I
      ++ mathieu24(li) constructs the mathieu group acting on the 24
      ++ integers given in the list li.
      ++ Note that duplicates in the list will be removed.
      ++ Error: if li has less or more than 24 different entries.

    mathieu24 : () -> PERMGRP I
      ++ mathieu24 constructs the mathieu group acting on the
      ++ integers 1,...,24.

    janko2 : L I -> PERMGRP I
      ++ janko2(li) constructs the janko group acting on the 100
      ++ integers given in the list li.
      ++ Note that duplicates in the list will be removed.
      ++ Error: if li has less or more than 100 different entries

    janko2 : () -> PERMGRP I
      ++ janko2 constructs the janko group acting on the
      ++ integers 1,...,100.

    rubiksGroup : () -> PERMGRP I
      ++ rubiksGroup constructs the permutation group representing
      ++ Rubic's Cube acting on integers 10*i+j for
      ++ 1 <= i <= 6, 1 <= j <= 8.
      ++ The faces of Rubik's Cube are labelled in the obvious way
      ++ Front, Right, Up, Down, Left, Back and numbered from 1 to 6
      ++ in this given ordering, the pieces on each face
      ++ (except the unmoveable center piece) are clockwise numbered
      ++ from 1 to 8 starting with the piece in the upper left
      ++ corner. The moves of the cube are represented as permutations
      ++ on these pieces, represented as a two digit
      ++ integer ij where i is the numer of theface (1 to 6)
      ++ and j is the number of the piece on this face.
      ++ The remaining ambiguities are resolved by looking
      ++ at the 6 generators, which represent a 90 degree turns of the
      ++ faces, or from the following pictorial description.
      ++ Permutation group representing Rubic's Cube acting on integers
      ++ 10*i+j for 1 <= i <= 6, 1 <= j <=8.
      ++
      ++ \begin{verbatim}
      ++ Rubik's Cube:   +-----+ +-- B   where: marks Side # :
      ++                / U   /|/
      ++               /     / |         F(ront)    <->    1
      ++       L -->  +-----+ R|         R(ight)    <->    2
      ++              |     |  +         U(p)       <->    3
      ++              |  F  | /          D(own)     <->    4
      ++              |     |/           L(eft)     <->    5
      ++              +-----+            B(ack)     <->    6
      ++                 ^
      ++                 |
      ++                 D
      ++
      ++ The Cube's surface:
      ++                                The pieces on each side
      ++             +---+              (except the unmoveable center
      ++             |567|              piece) are clockwise numbered
      ++             |4U8|              from 1 to 8 starting with the
      ++             |321|              piece in the upper left
      ++         +---+---+---+          corner (see figure on the
      ++         |781|123|345|          left).  The moves of the cube
      ++         |6L2|8F4|2R6|          are represented as
      ++         |543|765|187|          permutations on these pieces.
      ++         +---+---+---+          Each of the pieces is
      ++             |123|              represented as a two digit
      ++             |8D4|              integer ij where i is the
      ++             |765|              # of the side ( 1 to 6 for
      ++             +---+              F to B (see table above ))
      ++             |567|              and j is the # of the piece.
      ++             |4B8|
      ++             |321|
      ++             +---+
      ++ \end{verbatim}

    youngGroup : L I -> PERMGRP I
      ++ youngGroup([n1,...,nk]) constructs the direct product of the
      ++ symmetric groups Sn1,...,Snk.

    youngGroup : Partition -> PERMGRP I
      ++ youngGroup(lambda) constructs the direct product of the symmetric
      ++ groups given by the parts of the partition lambda.

  CODE ==> add

      -- import the permutation and permutation group domains:

      import PERM I
      import PERMGRP I

      -- import the needed map function:

      import ListFunctions2(L L I,PERM I)
      -- the internal functions:

      llli2gp(l:L L L I):PERMGRP I ==
        --++ Converts an list of permutations each represented by a list
        --++ of cycles ( each of them represented as a list of Integers )
        --++ to the permutation group generated by these permutations.
        (map(cycles,l))::PERMGRP I

      li1n(n:I):L I ==
        --++ constructs the list of integers from 1 to n
        [i for i in 1..n]

      -- definition of the exported functions:
      youngGroup(l:L I):PERMGRP I ==
        gens:= nil()$(L L L I)
        element:I:= 1
        for n in l | n > 1 repeat
          gens:=cons(list [i for i in element..(element+n-1)], gens)
          if n >= 3 then gens := cons([[element,element+1]],gens)
          element:=element+n
        llli2gp
          #gens = 0 => [[[1]]]
          gens

      youngGroup(lambda : Partition):PERMGRP I ==
        youngGroup(convert(lambda)$Partition)

      rubiksGroup():PERMGRP I ==
        -- each generator represents a 90 degree turn of the appropriate
        -- side.
        f:L L I:=
         [[11,13,15,17],[12,14,16,18],[51,31,21,41],_
          [53,33,23,43],[52,32,22,42]]
        r:L L I:=
         [[21,23,25,27],[22,24,26,28],[13,37,67,43],_
          [15,31,61,45],[14,38,68,44]]
        u:L L I:=
         [[31,33,35,37],[32,34,36,38],[13,51,63,25],_
          [11,57,61,23],[12,58,62,24]]
        d:L L I:=
         [[41,43,45,47],[42,44,46,48],[17,21,67,55],_
          [15,27,65,53],[16,28,66,54]]
        l:L L I:=
         [[51,53,55,57],[52,54,56,58],[11,41,65,35],_
          [17,47,63,33],[18,48,64,34]]
        b:L L I:=
         [[61,63,65,67],[62,64,66,68],[45,25,35,55],_
          [47,27,37,57],[46,26,36,56]]
        llli2gp [f,r,u,d,l,b]

      mathieu11(l:L I):PERMGRP I ==
      -- permutations derived from the ATLAS
        l:=removeDuplicates l
        #l ^= 11 => error "Exactly 11 integers for mathieu11 needed !"
        a:L L I:=[[l.1,l.10],[l.2,l.8],[l.3,l.11],[l.5,l.7]]
        llli2gp [a,[[l.1,l.4,l.7,l.6],[l.2,l.11,l.10,l.9]]]

      mathieu11():PERMGRP I == mathieu11 li1n 11

      mathieu12(l:L I):PERMGRP I ==
        -- permutations derived from the ATLAS
        l:=removeDuplicates l
        #l ^= 12 => error "Exactly 12 integers for mathieu12 needed !"
        a:L L I:=
          [[l.1,l.2,l.3,l.4,l.5,l.6,l.7,l.8,l.9,l.10,l.11]]
        llli2gp [a,[[l.1,l.6,l.5,l.8,l.3,l.7,l.4,l.2,l.9,l.10],[l.11,l.12]]]

      mathieu12():PERMGRP I == mathieu12 li1n 12

      mathieu22(l:L I):PERMGRP I ==
        -- permutations derived from the ATLAS
        l:=removeDuplicates l
        #l ^= 22 => error "Exactly 22 integers for mathieu22 needed !"
        a:L L I:=[[l.1,l.2,l.4,l.8,l.16,l.9,l.18,l.13,l.3,l.6,l.12],   _
          [l.5,l.10,l.20,l.17,l.11,l.22,l.21,l.19,l.15,l.7,l.14]]
        b:L L I:= [[l.1,l.2,l.6,l.18],[l.3,l.15],[l.5,l.8,l.21,l.13],   _
          [l.7,l.9,l.20,l.12],[l.10,l.16],[l.11,l.19,l.14,l.22]]
        llli2gp [a,b]

      mathieu22():PERMGRP I == mathieu22 li1n 22

      mathieu23(l:L I):PERMGRP I ==
      -- permutations derived from the ATLAS
        l:=removeDuplicates l
        #l ^= 23 => error "Exactly 23 integers for mathieu23 needed !"
        a:L L I:= [[l.1,l.2,l.3,l.4,l.5,l.6,l.7,l.8,l.9,l.10,_
                   l.11,l.12,l.13,l.14,_
                   l.15,l.16,l.17,l.18,l.19,l.20,l.21,l.22,l.23]]
        b:L L I:= [[l.2,l.16,l.9,l.6,l.8],[l.3,l.12,l.13,l.18,l.4],          _
                   [l.7,l.17,l.10,l.11,l.22],[l.14,l.19,l.21,l.20,l.15]]
        llli2gp [a,b]

      mathieu23():PERMGRP I == mathieu23 li1n 23

      mathieu24(l:L I):PERMGRP I ==
      -- permutations derived from the ATLAS
        l:=removeDuplicates l
        #l ^= 24 => error "Exactly 24 integers for mathieu24 needed !"
        a:L L I:=[[l.1,l.16,l.10,l.22,l.24],[l.2,l.12,l.18,l.21,l.7],        _
                  [l.4,l.5,l.8,l.6,l.17],[l.9,l.11,l.13,l.19,l.15]]
        b:L L I:=[[l.1,l.22,l.13,l.14,l.6,l.20,l.3,l.21,l.8,l.11],[l.2,l.10], _
                  [l.4,l.15,l.18,l.17,l.16,l.5,l.9,l.19,l.12,l.7],[l.23,l.24]]
        llli2gp [a,b]

      mathieu24():PERMGRP I == mathieu24 li1n 24

      janko2(l:L I):PERMGRP I ==
        -- permutations derived from the ATLAS
        l:=removeDuplicates l
        #l ^= 100 => error "Exactly 100 integers for janko2 needed !"
        a:L L I:=[                                                            _
                 [l.2,l.3,l.4,l.5,l.6,l.7,l.8],                               _
                 [l.9,l.10,l.11,l.12,l.13,l.14,l.15],                         _
                 [l.16,l.17,l.18,l.19,l.20,l.21,l.22],                        _
                 [l.23,l.24,l.25,l.26,l.27,l.28,l.29],                        _
                 [l.30,l.31,l.32,l.33,l.34,l.35,l.36],                        _
                 [l.37,l.38,l.39,l.40,l.41,l.42,l.43],                        _
                 [l.44,l.45,l.46,l.47,l.48,l.49,l.50],                        _
                 [l.51,l.52,l.53,l.54,l.55,l.56,l.57],                        _
                 [l.58,l.59,l.60,l.61,l.62,l.63,l.64],                        _
                 [l.65,l.66,l.67,l.68,l.69,l.70,l.71],                        _
                 [l.72,l.73,l.74,l.75,l.76,l.77,l.78],                        _
                 [l.79,l.80,l.81,l.82,l.83,l.84,l.85],                        _
                 [l.86,l.87,l.88,l.89,l.90,l.91,l.92],                        _
                 [l.93,l.94,l.95,l.96,l.97,l.98,l.99] ]
        b:L L I:=[
                [l.1,l.74,l.83,l.21,l.36,l.77,l.44,l.80,l.64,_
                 l.2,l.34,l.75,l.48,l.17,l.100],_
                [l.3,l.15,l.31,l.52,l.19,l.11,l.73,l.79,l.26,_
                 l.56,l.41,l.99,l.39,l.84,l.90],_
                [l.4,l.57,l.86,l.63,l.85,l.95,l.82,l.97,l.98,_
                 l.81,l.8,l.69,l.38,l.43,l.58],_
                [l.5,l.66,l.49,l.59,l.61],_
                [l.6,l.68,l.89,l.94,l.92,l.20,l.13,l.54,l.24,_
                 l.51,l.87,l.27,l.76,l.23,l.67],_
                [l.7,l.72,l.22,l.35,l.30,l.70,l.47,l.62,l.45,_
                 l.46,l.40,l.28,l.65,l.93,l.42],_
                [l.9,l.71,l.37,l.91,l.18,l.55,l.96,l.60,l.16,_
                 l.53,l.50,l.25,l.32,l.14,l.33],_
                [l.10,l.78,l.88,l.29,l.12] ]
        llli2gp [a,b]

      janko2():PERMGRP I == janko2 li1n 100

      abelianGroup(l:L PI):PERMGRP I ==
        gens:= nil()$(L L L I)
        element:I:= 1
        for n in l | n > 1 repeat
          gens:=cons( list [i for i in element..(element+n-1) ], gens )
          element:=element+n
        llli2gp
          #gens = 0 => [[[1]]]
          gens

      alternatingGroup(l:L I):PERMGRP I ==
        l:=removeDuplicates l
        #l = 0 =>
          error "Cannot construct alternating group on empty set"
        #l < 3 => llli2gp [[[l.1]]]
        #l = 3 => llli2gp [[[l.1,l.2,l.3]]]
        tmp:= [l.i for i in 3..(#l)]
        gens:L L L I:=[[tmp],[[l.1,l.2,l.3]]]
        odd?(#l) => llli2gp gens
        gens.1 := cons([l.1,l.2],gens.1)
        llli2gp gens

      alternatingGroup(n:PI):PERMGRP I == alternatingGroup li1n n

      symmetricGroup(l:L I):PERMGRP I ==
        l:=removeDuplicates l
        #l = 0 => error "Cannot construct symmetric group on empty set !"
        #l < 3 => llli2gp [[l]]
        llli2gp [[l],[[l.1,l.2]]]

      symmetricGroup(n:PI):PERMGRP I == symmetricGroup li1n n

      cyclicGroup(l:L I):PERMGRP I ==
        l:=removeDuplicates l
        #l = 0 => error "Cannot construct cyclic group on empty set"
        llli2gp [[l]]

      cyclicGroup(n:PI):PERMGRP I == cyclicGroup li1n n

      dihedralGroup(l:L I):PERMGRP I ==
        l:=removeDuplicates l
        #l < 3 => error "in dihedralGroup: Minimum of 3 elements needed !"
        tmp := [[l.i, l.(#l-i+1) ] for i in 1..(#l quo 2)]
        llli2gp [ [ l ], tmp ]

      dihedralGroup(n:PI):PERMGRP I ==
        n = 1 => symmetricGroup (2::PI)
        n = 2 => llli2gp [[[1,2]],[[3,4]]]
        dihedralGroup li1n n