This file is indexed.

/usr/share/gap/lib/csetgrp.gd is in gap-libs 4r6p5-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
402
403
404
405
406
407
408
409
410
411
412
413
414
415
#############################################################################
##
#W  csetgrp.gd                      GAP library              Alexander Hulpke
##
##
#Y  Copyright (C)  1996,  Lehrstuhl D für Mathematik,  RWTH Aachen,  Germany
#Y  (C) 1998 School Math and Comp. Sci., University of St Andrews, Scotland
#Y  Copyright (C) 2002 The GAP Group
##
##  This file contains the declarations of operations for cosets.
##

#############################################################################
##
#V  InfoCoset
##
##  <#GAPDoc Label="InfoCoset">
##  <ManSection>
##  <InfoClass Name="InfoCoset"/>
##
##  <Description>
##  The information function for coset and double coset operations is
##  <Ref InfoClass="InfoCoset"/>.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareInfoClass("InfoCoset");

#############################################################################
##
#F  AscendingChain( <G>, <U> )  .  chain of subgroups G = G_1 > ... > G_n = U
##
##  <#GAPDoc Label="AscendingChain">
##  <ManSection>
##  <Func Name="AscendingChain" Arg='G, U'/>
##
##  <Description>
##  This function computes an ascending chain of subgroups from <A>U</A> to
##  <A>G</A>.
##  This chain is given as a list whose first entry is <A>U</A> and the last
##  entry is <A>G</A>.
##  The function tries to make the links in this chain small.
##  <P/>
##  The option <C>refineIndex</C> can be used to give a bound for refinements
##  of steps to avoid &GAP; trying to enforce too small steps.
##  The option <C>cheap</C> (if set to <K>true</K>) will overall limit the
##  amount of heuristic searches.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareGlobalFunction("AscendingChain");

#############################################################################
##
#O  AscendingChainOp(<G>,<U>)  chain of subgroups
##
##  <ManSection>
##  <Oper Name="AscendingChainOp" Arg='G,U'/>
##
##  <Description>
##  This operation does the actual work of computing ascending chains. It
##  gets called from <C>AscendingChain</C> if no chain is found stored in
##  <C>ComputedAscendingChains</C>.
##  </Description>
##  </ManSection>
##
DeclareOperation("AscendingChainOp",[IsGroup,IsGroup]);

#############################################################################
##
#A  ComputedAscendingChains(<U>)    list of already computed ascending chains
##
##  <ManSection>
##  <Attr Name="ComputedAscendingChains" Arg='U'/>
##
##  <Description>
##  This attribute stores ascending chains. It is a list whose entries are
##  of the form [<A>G</A>,<A>chain</A>] where <A>chain</A> is an ascending chain from <A>U</A> up
##  to <A>G</A>. This storage is used by <C>AscendingChain</C> to avoid duplicate
##  calculations.
##  </Description>
##  </ManSection>
##
DeclareAttribute("ComputedAscendingChains",IsGroup,
                                        "mutable");

#############################################################################
##
#F  RefinedChain(<G>,<c>) . . . . . . . . . . . . . . . .  refine chain links
##
##  <ManSection>
##  <Func Name="RefinedChain" Arg='G,c'/>
##
##  <Description>
##  <A>c</A> is an ascending chain in the Group <A>G</A>. The task of this routine is
##  to refine <A>c</A>, i.e., if there is a "link" <M>U>L</M> in <A>c</A> with <M>[U:L]</M> too big,
##  this procedure tries to find subgroups <M>G_0,...,G_n</M> of <A>G</A>; such that 
##  <M>U=G_0>...>G_n=L</M>. This is done by extending L inductively: Since normal
##  steps can help in further calculations, the routine first tries to
##  extend to the normalizer in U. If the subgroup is self-normalizing,
##  the group is extended via a random element. If this results in a step
##  too big, it is repeated several times to find hopefully a small
##  extension!
##  <P/>
##  The option <C>refineIndex</C> can be used to tell &GAP; that a specified
##  step index is good enough. The option <C>refineChainActionLimit</C> can be
##  used to give an upper limit up to which index guaranteed refinement
##  should be tried.
##  </Description>
##  </ManSection>
##
DeclareGlobalFunction("RefinedChain");

#############################################################################
##
#O  CanonicalRightCosetElement( U, g )    canonical representative of U*g 
##
##  <#GAPDoc Label="CanonicalRightCosetElement">
##  <ManSection>
##  <Oper Name="CanonicalRightCosetElement" Arg='U, g'/>
##
##  <Description>
##  returns a <Q>canonical</Q> representative of the right coset
##  <A>U</A> <A>g</A>
##  which is independent of the given representative <A>g</A>.
##  This can be used to compare cosets by comparing their canonical
##  representatives.
##  <P/>
##  The representative chosen to be the <Q>canonical</Q> one
##  is representation dependent and only guaranteed to remain the same
##  within one &GAP; session.
##  <Example><![CDATA[
##  gap> CanonicalRightCosetElement(u,(2,4,3));
##  (3,4)
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareOperation("CanonicalRightCosetElement",
  [IsGroup,IsObject]);

#############################################################################
##
#C  IsDoubleCoset(<obj>)
##
##  <#GAPDoc Label="IsDoubleCoset">
##  <ManSection>
##  <Filt Name="IsDoubleCoset" Arg='obj' Type='Category' Label="operation"/>
##
##  <Description>
##  The category of double cosets.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareCategory("IsDoubleCoset",
    IsDomain and IsExtLSet and IsExtRSet);

#############################################################################
##
#A  LeftActingGroup(<dcos>)
#A  RightActingGroup(<dcos>)
##
##  <ManSection>
##  <Attr Name="LeftActingGroup" Arg='dcos'/>
##  <Attr Name="RightActingGroup" Arg='dcos'/>
##
##  <Description>
##  return the two groups that define a double coset <A>dcos</A>.
##  </Description>
##  </ManSection>
##
DeclareAttribute("LeftActingGroup",IsDoubleCoset);
DeclareAttribute("RightActingGroup",IsDoubleCoset);

#############################################################################
##
#O  DoubleCoset(<U>,<g>,<V>)
##
##  <#GAPDoc Label="DoubleCoset">
##  <ManSection>
##  <Oper Name="DoubleCoset" Arg='U, g, V'/>
##
##  <Description>
##  The groups <A>U</A> and <A>V</A> must be subgroups of a common supergroup
##  <A>G</A> of which <A>g</A> is an element.
##  This command constructs the double coset <A>U</A> <A>g</A> <A>V</A>
##  which is the set of all elements of the form <M>ugv</M> for any
##  <M>u \in <A>U</A></M>, <M>v \in <A>V</A></M>.
##  For element operations such as <K>in</K>, a double coset behaves
##  like a set of group elements. The double coset stores <A>U</A> in the
##  attribute <C>LeftActingGroup</C>,
##  <A>g</A> as <Ref Func="Representative"/>,
##  and <A>V</A> as <C>RightActingGroup</C>.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareOperation("DoubleCoset",[IsGroup,IsObject,IsGroup]);

#############################################################################
##
#O  DoubleCosets(<G>,<U>,<V>)
#O  DoubleCosetsNC(<G>,<U>,<V>)
##
##  <#GAPDoc Label="DoubleCosets">
##  <ManSection>
##  <Oper Name="DoubleCosets" Arg='G, U, V'/>
##  <Oper Name="DoubleCosetsNC" Arg='G, U, V'/>
##
##  <Description>
##  computes a duplicate free list of all double cosets
##  <A>U</A> <M>g</M> <A>V</A> for <M>g \in <A>G</A></M>.
##  The groups <A>U</A> and <A>V</A> must be subgroups of the group <A>G</A>.
##  The <C>NC</C> version does not check whether <A>U</A> and <A>V</A> are
##  subgroups of <A>G</A>.
##  <Example><![CDATA[
##  gap> dc:=DoubleCosets(g,u,v);
##  [ DoubleCoset(Group( [ (1,2,3), (1,2) ] ),(),Group( [ (3,4) ] )), 
##    DoubleCoset(Group( [ (1,2,3), (1,2) ] ),(1,3)(2,4),Group( 
##      [ (3,4) ] )), DoubleCoset(Group( [ (1,2,3), (1,2) ] ),(1,4)
##      (2,3),Group( [ (3,4) ] )) ]
##  gap> List(dc,Representative);
##  [ (), (1,3)(2,4), (1,4)(2,3) ]
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareGlobalFunction("DoubleCosets");
DeclareOperation("DoubleCosetsNC",[IsGroup,IsGroup,IsGroup]);

#############################################################################
##
#O  DoubleCosetRepsAndSizes(<G>,<U>,<V>)
##
##  <#GAPDoc Label="DoubleCosetRepsAndSizes">
##  <ManSection>
##  <Oper Name="DoubleCosetRepsAndSizes" Arg='G, U, V'/>
##
##  <Description>
##  returns a list of double coset representatives and their sizes,
##  the entries are lists of the form <M>[ r, n ]</M>
##  where <M>r</M> and <M>n</M> are an element of the double coset and the
##  size of the coset, respectively.
##  This operation is faster than <Ref Func="DoubleCosetsNC"/> because no
##  double coset objects have to be created.
##  <Example><![CDATA[
##  gap> dc:=DoubleCosetRepsAndSizes(g,u,v);
##  [ [ (), 12 ], [ (1,3)(2,4), 6 ], [ (1,4)(2,3), 6 ] ]
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareOperation("DoubleCosetRepsAndSizes",[IsGroup,IsGroup,IsGroup]);

#############################################################################
##
#A  RepresentativesContainedRightCosets(<D>)
##
##  <#GAPDoc Label="RepresentativesContainedRightCosets">
##  <ManSection>
##  <Attr Name="RepresentativesContainedRightCosets" Arg='D'/>
##
##  <Description>
##  A double coset <M><A>D</A> = U g V</M> can be considered as a union of
##  right cosets <M>U h_i</M>.
##  (It is the union of the orbit of <M>U g</M> under right multiplication by
##  <M>V</M>.)
##  For a double coset <A>D</A> this function returns a set
##  of representatives <M>h_i</M> such that
##  <A>D</A> <M>= \bigcup_{{h_i}} U h_i</M>.
##  The representatives returned are canonical for <M>U</M> (see
##  <Ref Func="CanonicalRightCosetElement"/>) and form a set.
##  <Example><![CDATA[
##  gap> u:=Subgroup(g,[(1,2,3),(1,2)]);;v:=Subgroup(g,[(3,4)]);;
##  gap> c:=DoubleCoset(u,(2,4),v);
##  DoubleCoset(Group( [ (1,2,3), (1,2) ] ),(2,4),Group( [ (3,4) ] ))
##  gap> (1,2,3) in c;
##  false
##  gap> (2,3,4) in c;
##  true
##  gap> LeftActingGroup(c);
##  Group([ (1,2,3), (1,2) ])
##  gap> RightActingGroup(c);
##  Group([ (3,4) ])
##  gap> RepresentativesContainedRightCosets(c);
##  [ (2,3,4) ]
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareAttribute( "RepresentativesContainedRightCosets", IsDoubleCoset );

#############################################################################
##
#C  IsRightCoset(<obj>)
##
##  <#GAPDoc Label="IsRightCoset">
##  <ManSection>
##  <Filt Name="IsRightCoset" Arg='obj' Type='Category'/>
##
##  <Description>
##  The category of right cosets.
##  <P/>
##  <Index>left cosets</Index>
##  &GAP; does not provide left cosets as a separate data type, but as the
##  left coset <M>gU</M> consists of exactly the inverses of the elements of
##  the right coset <M>Ug^{{-1}}</M> calculations with left cosets can be
##  emulated using right cosets by inverting the representatives.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareCategory("IsRightCoset", IsDomain and IsExternalOrbit and
  IsMultiplicativeElementWithInverse);

#############################################################################
##
#O  RightCoset( <U>, <g> )
##
##  <#GAPDoc Label="RightCoset">
##  <ManSection>
##  <Oper Name="RightCoset" Arg='U, g'/>
##
##  <Description>
##  returns the right coset of <A>U</A> with representative <A>g</A>,
##  which is the set of all elements of the form <M>ug</M> for all
##  <M>u \in <A>U</A></M>.  <A>g</A> must be an
##  element of a larger group <A>G</A> which contains <A>U</A>. 
##  For element operations such as <K>in</K> a right coset behaves like a set of
##  group elements.
##  <P/>
##  Right cosets are
##  external orbits for the action of <A>U</A> which acts via
##  <Ref Func="OnLeftInverse"/>.
##  Of course the action of a larger group <A>G</A> on right cosets is via
##  <Ref Func="OnRight"/>.
##  <Example><![CDATA[
##  gap> u:=Group((1,2,3), (1,2));;
##  gap> c:=RightCoset(u,(2,3,4));
##  RightCoset(Group( [ (1,2,3), (1,2) ] ),(2,3,4))
##  gap> ActingDomain(c);
##  Group([ (1,2,3), (1,2) ])
##  gap> Representative(c);
##  (2,3,4)
##  gap> Size(c);
##  6
##  gap> AsList(c);
##  [ (2,3,4), (1,4,2), (1,3,4,2), (1,3)(2,4), (2,4), (1,4,2,3) ]
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareOperation("RightCoset",[IsGroup,IsObject]);


#############################################################################
##
#F  RightCosets(<G>,<U>)
#O  RightCosetsNC(<G>,<U>)
##
##  <#GAPDoc Label="RightCosets">
##  <ManSection>
##  <Func Name="RightCosets" Arg='G, U'/>
##  <Oper Name="RightCosetsNC" Arg='G, U'/>
##
##  <Description>
##  computes a duplicate free list of right cosets <A>U</A> <M>g</M> for
##  <M>g \in</M> <A>G</A>.
##  A set of representatives for the elements in this list forms a right
##  transversal of <A>U</A> in <A>G</A>.
##  (By inverting the representatives one obtains
##  a list of representatives of the left cosets of <A>U</A>.)
##  The <C>NC</C> version does not check whether <A>U</A> is a subgroup of
##  <A>G</A>.
##  <Example><![CDATA[
##  gap> RightCosets(g,u);
##  [ RightCoset(Group( [ (1,2,3), (1,2) ] ),()), 
##    RightCoset(Group( [ (1,2,3), (1,2) ] ),(1,3)(2,4)), 
##    RightCoset(Group( [ (1,2,3), (1,2) ] ),(1,4)(2,3)), 
##    RightCoset(Group( [ (1,2,3), (1,2) ] ),(1,2)(3,4)) ]
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareGlobalFunction("RightCosets");
DeclareOperation("RightCosetsNC",[IsGroup,IsGroup]);

#############################################################################
##
#F  IntermediateGroup(<G>,<U>)  . . . . . . . . . subgroup of G containing U
##
##  <#GAPDoc Label="IntermediateGroup">
##  <ManSection>
##  <Func Name="IntermediateGroup" Arg='G, U'/>
##
##  <Description>
##  This routine tries to find a subgroup <M>E</M> of <A>G</A>,
##  such that <M><A>G</A> > E > <A>U</A></M> holds.
##  If <A>U</A> is maximal in <A>G</A>, the function returns <K>fail</K>.
##  This is done by finding minimal blocks for
##  the operation of <A>G</A> on the right cosets of <A>U</A>.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareGlobalFunction("IntermediateGroup");