This file is indexed.

/usr/share/gap/lib/ctbllatt.gd is in gap-libs 4r7p9-1.

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
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
#############################################################################
##
#W  ctbllatt.gd                 GAP library                     Thomas Breuer
#W                                                                Ansgar Kaup
##
##
#Y  Copyright (C)  1997,  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 declaration of functions that mainly deal with
##  lattices in the context of character tables.
##


#############################################################################
##
#F  LLL( <tbl>, <characters>[, <y>][, "sort"][, "linearcomb"] )
##
##  <#GAPDoc Label="LLL">
##  <ManSection>
##  <Func Name="LLL" Arg='tbl, characters[, y][, "sort"][, "linearcomb"]'/>
##
##  <Description>
##  <Index Subkey="for virtual characters">LLL algorithm</Index>
##  <Index>short vectors spanning a lattice</Index>
##  <Index Subkey="for virtual characters">lattice basis reduction</Index>
##  <Ref Func="LLL"/> calls the LLL algorithm
##  (see&nbsp;<Ref Func="LLLReducedBasis"/>) in the case of
##  lattices spanned by the virtual characters <A>characters</A>
##  of the ordinary character table <A>tbl</A>
##  (see&nbsp;<Ref Func="ScalarProduct" Label="for characters"/>).
##  By finding shorter vectors in the lattice spanned by <A>characters</A>,
##  i.e., virtual characters of smaller norm,
##  in some cases <Ref Func="LLL"/> is able to find irreducible characters.
##  <P/>
##  <Ref Func="LLL"/> returns a record with at least components
##  <C>irreducibles</C> (the list of found irreducible characters),
##  <C>remainders</C> (a list of reducible virtual characters),
##  and <C>norms</C> (the list of norms of the vectors in <C>remainders</C>).
##  <C>irreducibles</C> together with <C>remainders</C> form a basis of the
##  <M>&ZZ;</M>-lattice spanned by <A>characters</A>.
##  <P/>
##  Note that the vectors in the <C>remainders</C> list are in general
##  <E>not</E> orthogonal (see&nbsp;<Ref Func="ReducedClassFunctions"/>)
##  to the irreducible characters in <C>irreducibles</C>.
##  <P/>
##  Optional arguments of <Ref Func="LLL"/> are
##  <P/>
##  <List>
##  <Mark><A>y</A></Mark>
##  <Item>
##      controls the sensitivity of the algorithm,
##      see&nbsp;<Ref Func="LLLReducedBasis"/>,
##  </Item>
##  <Mark><A>"sort"</A></Mark>
##  <Item>
##      <Ref Func="LLL"/> sorts <A>characters</A> and the <C>remainders</C>
##      component of the result according to the degrees,
##  </Item>
##  <Mark><A>"linearcomb"</A></Mark>
##  <Item>
##      the returned record contains components <C>irreddecomp</C>
##      and <C>reddecomp</C>, which are decomposition matrices of
##      <C>irreducibles</C> and <C>remainders</C>,
##      with respect to <A>characters</A>.
##  </Item>
##  </List>
##  <P/>
##  <Example><![CDATA[
##  gap> s4:= CharacterTable( "Symmetric", 4 );;
##  gap> chars:= [ [ 8, 0, 0, -1, 0 ], [ 6, 0, 2, 0, 2 ],
##  >     [ 12, 0, -4, 0, 0 ], [ 6, 0, -2, 0, 0 ], [ 24, 0, 0, 0, 0 ],
##  >     [ 12, 0, 4, 0, 0 ], [ 6, 0, 2, 0, -2 ], [ 12, -2, 0, 0, 0 ],
##  >     [ 8, 0, 0, 2, 0 ], [ 12, 2, 0, 0, 0 ], [ 1, 1, 1, 1, 1 ] ];;
##  gap> LLL( s4, chars );
##  rec( 
##    irreducibles := 
##      [ Character( CharacterTable( "Sym(4)" ), [ 2, 0, 2, -1, 0 ] ), 
##        Character( CharacterTable( "Sym(4)" ), [ 1, 1, 1, 1, 1 ] ), 
##        Character( CharacterTable( "Sym(4)" ), [ 3, 1, -1, 0, -1 ] ), 
##        Character( CharacterTable( "Sym(4)" ), [ 3, -1, -1, 0, 1 ] ), 
##        Character( CharacterTable( "Sym(4)" ), [ 1, -1, 1, 1, -1 ] ) ], 
##    norms := [  ], remainders := [  ] )
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareGlobalFunction( "LLL" );


#############################################################################
##
#F  Extract( <tbl>, <reducibles>, <grammat>[, <missing> ] )
##
##  <#GAPDoc Label="Extract">
##  <ManSection>
##  <Func Name="Extract" Arg='tbl, reducibles, grammat[, missing ]'/>
##
##  <Description>
##  Let <A>tbl</A> be an ordinary character table,
##  <A>reducibles</A> a list of characters of <A>tbl</A>,
##  and <A>grammat</A> the matrix of scalar products of <A>reducibles</A>
##  (see&nbsp;<Ref Func="MatScalarProducts"/>).
##  <Ref Func="Extract"/> tries to find irreducible characters by drawing
##  conclusions out of the scalar products,
##  using combinatorial and backtrack means.
##  <P/>
##  The optional argument <A>missing</A> is the maximal number of irreducible
##  characters that occur as constituents of <A>reducibles</A>.
##  Specification of <A>missing</A> may accelerate <Ref Func="Extract"/>.
##  <P/>
##  <Ref Func="Extract"/> returns a record <A>ext</A> with the components
##  <C>solution</C> and <C>choice</C>,
##  where the value of <C>solution</C> is a list <M>[ M_1, \ldots, M_n ]</M>
##  of decomposition matrices <M>M_i</M> (up to permutations of rows)
##  with the property that <M>M_i^{tr} \cdot X</M> is equal to
##  the sublist at the positions <A>ext</A><C>.choice[i]</C> of
##  <A>reducibles</A>,
##  for a matrix <M>X</M> of irreducible characters;
##  the value of <C>choice</C> is a list of length <M>n</M> whose entries are
##  lists of indices.
##  <P/>
##  So the <M>j</M>-th column in each matrix <M>M_i</M> corresponds to
##  <M><A>reducibles</A>[j]</M>, and each row in <M>M_i</M> corresponds to an
##  irreducible character.
##  <Ref Func="Decreased"/> can be used to examine the solution for
##  computable irreducibles.
##  <P/>
##  <Example><![CDATA[
##  gap> s4:= CharacterTable( "Symmetric", 4 );;
##  gap> red:= [ [ 5, 1, 5, 2, 1 ], [ 2, 0, 2, 2, 0 ], [ 3, -1, 3, 0, -1 ],
##  >            [ 6, 0, -2, 0, 0 ], [ 4, 0, 0, 1, 2 ] ];;
##  gap> gram:= MatScalarProducts( s4, red, red );
##  [ [ 6, 3, 2, 0, 2 ], [ 3, 2, 1, 0, 1 ], [ 2, 1, 2, 0, 0 ], 
##    [ 0, 0, 0, 2, 1 ], [ 2, 1, 0, 1, 2 ] ]
##  gap> ext:= Extract( s4, red, gram, 5 );
##  rec( choice := [ [ 2, 5, 3, 4, 1 ] ], 
##    solution := 
##      [ 
##        [ [ 1, 1, 0, 0, 2 ], [ 1, 0, 1, 0, 1 ], [ 0, 1, 0, 1, 0 ], 
##            [ 0, 0, 1, 0, 1 ], [ 0, 0, 0, 1, 0 ] ] ] )
##  gap> dec:= Decreased( s4, red, ext.solution[1], ext.choice[1] );
##  rec( 
##    irreducibles := 
##      [ Character( CharacterTable( "Sym(4)" ), [ 1, 1, 1, 1, 1 ] ), 
##        Character( CharacterTable( "Sym(4)" ), [ 3, -1, -1, 0, 1 ] ), 
##        Character( CharacterTable( "Sym(4)" ), [ 1, -1, 1, 1, -1 ] ), 
##        Character( CharacterTable( "Sym(4)" ), [ 3, 1, -1, 0, -1 ] ), 
##        Character( CharacterTable( "Sym(4)" ), [ 2, 0, 2, -1, 0 ] ) ], 
##    matrix := [  ], remainders := [  ] )
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareGlobalFunction( "Extract" );


#############################################################################
##
#F  OrthogonalEmbeddingsSpecialDimension( <tbl>, <reducibles>, <grammat>,
#F                                                   ["positive",] <dim> )
##
##  <#GAPDoc Label="OrthogonalEmbeddingsSpecialDimension">
##  <ManSection>
##  <Func Name="OrthogonalEmbeddingsSpecialDimension"
##  Arg='tbl, reducibles, grammat[, "positive"], dim'/>
##
##  <Description>
##  <Ref Func="OrthogonalEmbeddingsSpecialDimension"/> is a variant of
##  <Ref Func="OrthogonalEmbeddings"/> for the situation
##  that <A>tbl</A> is an ordinary character table,
##  <A>reducibles</A> is a list of virtual characters of <A>tbl</A>,
##  <A>grammat</A> is the matrix of scalar products
##  (see&nbsp;<Ref Func="MatScalarProducts"/>),
##  and <A>dim</A> is an upper bound for the number of irreducible characters
##  of <A>tbl</A> that occur as constituents of <A>reducibles</A>;
##  if the vectors in <A>reducibles</A> are known to be proper characters then
##  the string <C>"positive"</C> may be entered as fourth argument.
##  (See&nbsp;<Ref Func="OrthogonalEmbeddings"/> for information why this may
##  help.)
##  <P/>
##  <Ref Func="OrthogonalEmbeddingsSpecialDimension"/> first uses
##  <Ref Func="OrthogonalEmbeddings"/> to compute all orthogonal embeddings
##  of <A>grammat</A> into a standard lattice of dimension up to <A>dim</A>,
##  and then calls <Ref Func="Decreased"/> in order to find irreducible
##  characters of <A>tbl</A>.
##  <P/>
##  <Ref Func="OrthogonalEmbeddingsSpecialDimension"/> returns a record with
##  the following components.
##  <P/>
##  <List>
##  <Mark><C>irreducibles</C></Mark>
##  <Item>
##    a list of found irreducibles, the intersection of all lists of
##    irreducibles found by <Ref Func="Decreased"/>,
##    for all possible embeddings, and
##  </Item>
##  <Mark><C>remainders</C></Mark>
##  <Item>
##    a list of remaining reducible virtual characters.
##  </Item>
##  </List>
##  <P/>
##  <Example><![CDATA[
##  gap> s6:= CharacterTable( "S6" );;
##  gap> red:= InducedCyclic( s6, "all" );;
##  gap> Add( red, TrivialCharacter( s6 ) );
##  gap> lll:= LLL( s6, red );;
##  gap> irred:= lll.irreducibles;
##  [ Character( CharacterTable( "A6.2_1" ), 
##      [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] ), 
##    Character( CharacterTable( "A6.2_1" ), 
##      [ 9, 1, 0, 0, 1, -1, -3, -3, 1, 0, 0 ] ), 
##    Character( CharacterTable( "A6.2_1" ), 
##      [ 16, 0, -2, -2, 0, 1, 0, 0, 0, 0, 0 ] ) ]
##  gap> Set( Flat( MatScalarProducts( s6, irred, lll.remainders ) ) );
##  [ 0 ]
##  gap> dim:= NrConjugacyClasses( s6 ) - Length( lll.irreducibles );
##  8
##  gap> rem:= lll.remainders;;  Length( rem );
##  8
##  gap> gram:= MatScalarProducts( s6, rem, rem );;  RankMat( gram );
##  8
##  gap> emb1:= OrthogonalEmbeddings( gram, 8 );
##  rec( norms := [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], 
##    solutions := [ [ 1, 2, 3, 7, 11, 12, 13, 15 ], 
##        [ 1, 2, 4, 8, 10, 12, 13, 14 ], [ 1, 2, 5, 6, 9, 12, 13, 16 ] ],
##    vectors := 
##      [ [ -1, 0, 1, 0, 1, 0, 1, 0 ], [ 1, 0, 0, 1, 0, 1, 0, 0 ], 
##        [ 0, 1, 1, 0, 0, 0, 1, 1 ], [ 0, 1, 1, 0, 0, 0, 1, 0 ], 
##        [ 0, 1, 1, 0, 0, 0, 0, 0 ], [ 0, 1, 0, 0, 0, 0, 1, 0 ], 
##        [ 0, -1, 0, 0, 0, 0, 0, 1 ], [ 0, 1, 0, 0, 0, 0, 0, 0 ], 
##        [ 0, 0, 1, 0, 0, 0, 1, 1 ], [ 0, 0, 1, 0, 0, 0, 0, 1 ], 
##        [ 0, 0, 1, 0, 0, 0, 0, 0 ], [ 0, 0, 0, -1, 1, 0, 0, 0 ], 
##        [ 0, 0, 0, 0, 0, 1, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 1, 1 ], 
##        [ 0, 0, 0, 0, 0, 0, 1, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 1 ] ] )
##  ]]></Example>
##  <P/>
##  In the following example we temporarily decrease the line length limit
##  from its default value <M>80</M> to <M>62</M>
##  in order to get a nicer output format.
##  <P/>
##  <Example><![CDATA[
##  gap> emb2:= OrthogonalEmbeddingsSpecialDimension( s6, rem, gram, 8 );
##  rec( 
##    irreducibles := 
##      [ Character( CharacterTable( "A6.2_1" ), 
##          [ 5, 1, -1, 2, -1, 0, 1, -3, -1, 1, 0 ] ), 
##        Character( CharacterTable( "A6.2_1" ), 
##          [ 5, 1, 2, -1, -1, 0, -3, 1, -1, 0, 1 ] ), 
##        Character( CharacterTable( "A6.2_1" ), 
##          [ 10, -2, 1, 1, 0, 0, -2, 2, 0, 1, -1 ] ), 
##        Character( CharacterTable( "A6.2_1" ), 
##          [ 10, -2, 1, 1, 0, 0, 2, -2, 0, -1, 1 ] ) ], 
##    remainders := 
##      [ VirtualCharacter( CharacterTable( "A6.2_1" ), 
##          [ 0, 0, 3, -3, 0, 0, 4, -4, 0, 1, -1 ] ), 
##        VirtualCharacter( CharacterTable( "A6.2_1" ), 
##          [ 6, 2, 3, 0, 0, 1, 2, -2, 0, -1, -2 ] ), 
##        VirtualCharacter( CharacterTable( "A6.2_1" ), 
##          [ 10, 2, 1, 1, 2, 0, 2, 2, -2, -1, -1 ] ), 
##        VirtualCharacter( CharacterTable( "A6.2_1" ), 
##          [ 14, 2, 2, -1, 0, -1, 6, 2, 0, 0, -1 ] ) ] )
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareGlobalFunction( "OrthogonalEmbeddingsSpecialDimension" );


#############################################################################
##
#F  Decreased( <tbl>, <chars>, <decompmat>[, <choice>] )
##
##  <#GAPDoc Label="Decreased">
##  <ManSection>
##  <Func Name="Decreased" Arg='tbl, chars, decompmat[, choice]'/>
##
##  <Description>
##  Let <A>tbl</A> be an ordinary character table,
##  <A>chars</A> a list of virtual characters of <A>tbl</A>,
##  and <A>decompmat</A> a decomposition matrix, that is,
##  a matrix <M>M</M> with the property that
##  <M>M^{tr} \cdot X = <A>chars</A></M> holds,
##  where <M>X</M> is a list of irreducible characters of <A>tbl</A>.
##  <Ref Func="Decreased"/> tries to compute the irreducibles in <M>X</M> or
##  at least some of them.
##  <P/>
##  Usually <Ref Func="Decreased"/> is applied to the output of
##  <Ref Func="Extract"/> or <Ref Func="OrthogonalEmbeddings"/> or
##  <Ref Func="OrthogonalEmbeddingsSpecialDimension"/>.
##  In the case of <Ref Func="Extract"/>,
##  the choice component corresponding to the decomposition matrix must be
##  entered as argument <A>choice</A> of <Ref Func="Decreased"/>.
##  <P/>
##  <Ref Func="Decreased"/> returns <K>fail</K> if it can prove that no list
##  <M>X</M> of irreducible characters corresponding to the arguments exists;
##  otherwise <Ref Func="Decreased"/> returns a record with the following
##  components.
##  <P/>
##  <List>
##  <Mark><C>irreducibles</C></Mark>
##  <Item>
##      the list of found irreducible characters,
##  </Item>
##  <Mark><C>remainders</C></Mark>
##  <Item>
##      the remaining reducible characters, and
##  </Item>
##  <Mark><C>matrix</C></Mark>
##  <Item>
##      the decomposition matrix of the characters in the <C>remainders</C>
##      component.
##  </Item>
##  </List>
##  <P/>
##  In the following example we temporarily decrease the line length limit
##  from its default value <M>80</M> to <M>62</M>
##  in order to get a nicer output format.
##  <P/>
##  <Example><![CDATA[
##  gap> s4:= CharacterTable( "Symmetric", 4 );;
##  gap> x:= Irr( s4 );;
##  gap> red:= [ x[1]+x[2], -x[1]-x[3], -x[1]+x[3], -x[2]-x[4] ];;
##  gap> mat:= MatScalarProducts( s4, red, red );
##  [ [ 2, -1, -1, -1 ], [ -1, 2, 0, 0 ], [ -1, 0, 2, 0 ], 
##    [ -1, 0, 0, 2 ] ]
##  gap> emb:= OrthogonalEmbeddings( mat );
##  rec( norms := [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], 
##    solutions := [ [ 1, 6, 7, 12 ], [ 2, 5, 8, 11 ], [ 3, 4, 9, 10 ] ], 
##    vectors := [ [ -1, 1, 1, 0 ], [ -1, 1, 0, 1 ], [ 1, -1, 0, 0 ], 
##        [ -1, 0, 1, 1 ], [ -1, 0, 1, 0 ], [ -1, 0, 0, 1 ], 
##        [ 0, -1, 1, 0 ], [ 0, -1, 0, 1 ], [ 0, 1, 0, 0 ], 
##        [ 0, 0, -1, 1 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ] )
##  gap> dec:= Decreased( s4, red, emb.vectors{ emb.solutions[1] } );
##  rec( 
##    irreducibles := 
##      [ Character( CharacterTable( "Sym(4)" ), [ 3, -1, -1, 0, 1 ] ), 
##        Character( CharacterTable( "Sym(4)" ), [ 1, -1, 1, 1, -1 ] ), 
##        Character( CharacterTable( "Sym(4)" ), [ 2, 0, 2, -1, 0 ] ), 
##        Character( CharacterTable( "Sym(4)" ), [ 3, 1, -1, 0, -1 ] ) ], 
##    matrix := [  ], remainders := [  ] )
##  gap> Decreased( s4, red, emb.vectors{ emb.solutions[2] } );
##  fail
##  gap> Decreased( s4, red, emb.vectors{ emb.solutions[3] } );
##  fail
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareGlobalFunction( "Decreased" );


#############################################################################
##
#F  DnLattice( <tbl>, <grammat>, <reducibles> )
##
##  <#GAPDoc Label="DnLattice">
##  <ManSection>
##  <Func Name="DnLattice" Arg='tbl, grammat, reducibles'/>
##
##  <Description>
##  Let <A>tbl</A> be an ordinary character table,
##  and <A>reducibles</A> a list of virtual characters of <A>tbl</A>.
##  <P/>
##  <Ref Func="DnLattice"/> searches for sublattices isomorphic to root
##  lattices of type <M>D_n</M>, for <M>n \geq 4</M>,
##  in the lattice that is generated by <A>reducibles</A>;
##  each vector in <A>reducibles</A> must have norm <M>2</M>, and the matrix
##  of scalar products (see&nbsp;<Ref Func="MatScalarProducts"/>) of
##  <A>reducibles</A> must be entered as argument <A>grammat</A>.
##  <P/>
##  <Ref Func="DnLattice"/> is able to find irreducible characters if there
##  is a lattice of type <M>D_n</M> with <M>n > 4</M>.
##  In the case <M>n = 4</M>, <Ref Func="DnLattice"/> may fail to determine
##  irreducibles.
##  <P/>
##  <Ref Func="DnLattice"/> returns a record with components
##  <List>
##  <Mark><C>irreducibles</C></Mark>
##  <Item>
##      the list of found irreducible characters,
##  </Item>
##  <Mark><C>remainders</C></Mark>
##  <Item>
##      the list of remaining reducible virtual characters, and
##  </Item>
##  <Mark><C>gram</C></Mark>
##  <Item>
##      the Gram matrix of the vectors in <C>remainders</C>.
##  </Item>
##  </List>
##  <P/>
##  The <C>remainders</C> list is transformed in such a way that the
##  <C>gram</C> matrix is a block diagonal matrix that exhibits the structure
##  of the lattice generated by the vectors in <C>remainders</C>.
##  So <Ref Func="DnLattice"/> might be useful even if it fails to find
##  irreducible characters.
##  <P/>
##  In the following example we temporarily decrease the line length limit
##  from its default value <M>80</M> to <M>62</M>
##  in order to get a nicer output format.
##  <P/>
##  <Example><![CDATA[
##  gap> s4:= CharacterTable( "Symmetric", 4 );;
##  gap> red:= [ [ 2, 0, 2, 2, 0 ], [ 4, 0, 0, 1, 2 ],
##  >            [ 5, -1, 1, -1, 1 ], [ -1, 1, 3, -1, -1 ] ];;
##  gap> gram:= MatScalarProducts( s4, red, red );
##  [ [ 2, 1, 0, 0 ], [ 1, 2, 1, -1 ], [ 0, 1, 2, 0 ], [ 0, -1, 0, 2 ] ]
##  gap> dn:= DnLattice( s4, gram, red );
##  rec( gram := [  ], 
##    irreducibles := 
##      [ Character( CharacterTable( "Sym(4)" ), [ 2, 0, 2, -1, 0 ] ), 
##        Character( CharacterTable( "Sym(4)" ), [ 1, -1, 1, 1, -1 ] ), 
##        Character( CharacterTable( "Sym(4)" ), [ 1, 1, 1, 1, 1 ] ), 
##        Character( CharacterTable( "Sym(4)" ), [ 3, -1, -1, 0, 1 ] ) ], 
##    remainders := [  ] )
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareGlobalFunction( "DnLattice" );


#############################################################################
##
#F  DnLatticeIterative( <tbl>, <reducibles> )
##
##  <#GAPDoc Label="DnLatticeIterative">
##  <ManSection>
##  <Func Name="DnLatticeIterative" Arg='tbl, reducibles'/>
##
##  <Description>
##  Let <A>tbl</A> be an ordinary character table,
##  and <A>reducibles</A> either a list of virtual characters of <A>tbl</A>
##  or a record with components <C>remainders</C> and <C>norms</C>,
##  for example a record returned by <Ref Func="LLL"/>.
##  <P/>
##  <Ref Func="DnLatticeIterative"/> was designed for iterative use of
##  <Ref Func="DnLattice"/>.
##  <Ref Func="DnLatticeIterative"/> selects the vectors of norm <M>2</M>
##  among the given virtual character, calls <Ref Func="DnLattice"/> for
##  them, reduces the virtual characters with found irreducibles,
##  calls <Ref Func="DnLattice"/> again for the remaining virtual characters,
##  and so on, until no new irreducibles are found.
##  <P/>
##  <Ref Func="DnLatticeIterative"/> returns a record with the same
##  components and meaning of components as <Ref Func="LLL"/>.
##  <P/>
##  In the following example we temporarily decrease the line length limit
##  from its default value <M>80</M> to <M>62</M>
##  in order to get a nicer output format.
##  <P/>
##  <Example><![CDATA[
##  gap> s4:= CharacterTable( "Symmetric", 4 );;
##  gap> red:= [ [ 2, 0, 2, 2, 0 ], [ 4, 0, 0, 1, 2 ],
##  >            [ 5, -1, 1, -1, 1 ], [ -1, 1, 3, -1, -1 ] ];;
##  gap> dn:= DnLatticeIterative( s4, red );
##  rec( 
##    irreducibles := 
##      [ Character( CharacterTable( "Sym(4)" ), [ 2, 0, 2, -1, 0 ] ), 
##        Character( CharacterTable( "Sym(4)" ), [ 1, -1, 1, 1, -1 ] ), 
##        Character( CharacterTable( "Sym(4)" ), [ 1, 1, 1, 1, 1 ] ), 
##        Character( CharacterTable( "Sym(4)" ), [ 3, -1, -1, 0, 1 ] ) ], 
##    norms := [  ], remainders := [  ] )
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareGlobalFunction( "DnLatticeIterative" );


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