This file is indexed.

/usr/share/gap/lib/vspchom.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
#############################################################################
##
#W  vspchom.gd                  GAP library                     Thomas Breuer
##
##
#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
##
##  1. Single Linear Mappings
##  2. Vector Spaces of Linear Mappings
##


#############################################################################
##
##  <#GAPDoc Label="[1]{vspchom}">
##  <E>Vector space homomorphisms</E> (or <E>linear mappings</E>) are defined
##  in Section&nbsp;<Ref Sect="Linear Mappings"/>.
##  &GAP; provides special functions to construct a particular linear
##  mapping from images of given elements in the source,
##  from a matrix of coefficients, or as a natural epimorphism.
##  <P/>
##  <M>F</M>-linear mappings with same source and same range can be added,
##  so one can form vector spaces of linear mappings.
##  <#/GAPDoc>
##


#############################################################################
##
##  1. Single Linear Mappings
##


#############################################################################
##
#O  LeftModuleGeneralMappingByImages( <V>, <W>, <gens>, <imgs> )
##
##  <#GAPDoc Label="LeftModuleGeneralMappingByImages">
##  <ManSection>
##  <Oper Name="LeftModuleGeneralMappingByImages" Arg='V, W, gens, imgs'/>
##
##  <Description>
##  Let <A>V</A> and <A>W</A> be two left modules over the same left acting
##  domain <M>R</M>, say, and <A>gens</A> and <A>imgs</A> lists
##  (of the same length) of elements in <A>V</A> and <A>W</A>, respectively.
##  <Ref Oper="LeftModuleGeneralMappingByImages"/> returns
##  the general mapping with source <A>V</A> and range <A>W</A>
##  that is defined by mapping the elements in <A>gens</A> to the
##  corresponding elements in <A>imgs</A>,
##  and taking the <M>R</M>-linear closure.
##  <P/>
##  <A>gens</A> need not generate <A>V</A> as a left <M>R</M>-module,
##  and if the specification does not define a linear mapping then the result
##  will be multi-valued; hence in general it is not a mapping
##  (see&nbsp;<Ref Func="IsMapping"/>).
##  <Example><![CDATA[
##  gap> V:= Rationals^2;;
##  gap> W:= VectorSpace( Rationals, [ [1,2,3], [1,0,1] ] );;
##  gap> f:= LeftModuleGeneralMappingByImages( V, W,
##  >                                [[1,0],[2,0]], [[1,0,1],[1,0,1] ] );
##  [ [ 1, 0 ], [ 2, 0 ] ] -> [ [ 1, 0, 1 ], [ 1, 0, 1 ] ]
##  gap> IsMapping( f );
##  false
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareOperation( "LeftModuleGeneralMappingByImages",
    [ IsLeftModule, IsLeftModule, IsHomogeneousList, IsHomogeneousList ] );


#############################################################################
##
#F  LeftModuleHomomorphismByImages( <V>, <W>, <gens>, <imgs> )
#O  LeftModuleHomomorphismByImagesNC( <V>, <W>, <gens>, <imgs> )
##
##  <#GAPDoc Label="LeftModuleHomomorphismByImages">
##  <ManSection>
##  <Func Name="LeftModuleHomomorphismByImages" Arg='V, W, gens, imgs'/>
##  <Oper Name="LeftModuleHomomorphismByImagesNC" Arg='V, W, gens, imgs'/>
##
##  <Description>
##  Let <A>V</A> and <A>W</A> be two left modules over the same left acting
##  domain <M>R</M>, say, and <A>gens</A> and <A>imgs</A> lists (of the same
##  length) of elements in <A>V</A> and <A>W</A>, respectively.
##  <Ref Func="LeftModuleHomomorphismByImages"/> returns
##  the left <M>R</M>-module homomorphism with source <A>V</A> and range
##  <A>W</A> that is defined by mapping the elements in <A>gens</A> to the
##  corresponding elements in <A>imgs</A>.
##  <P/>
##  If <A>gens</A> does not generate <A>V</A> or if the homomorphism does not
##  exist (i.e., if mapping the generators describes only a multi-valued
##  mapping) then <K>fail</K> is returned.
##  For creating a possibly multi-valued mapping from <A>V</A> to <A>W</A>
##  that respects addition, multiplication, and scalar multiplication,
##  <Ref Func="LeftModuleGeneralMappingByImages"/> can be used.
##  <P/>
##  <Ref Oper="LeftModuleHomomorphismByImagesNC"/> does the same as
##  <Ref Func="LeftModuleHomomorphismByImages"/>,
##  except that it omits all checks.
##  <Example><![CDATA[
##  gap> V:=Rationals^2;;
##  gap> W:=VectorSpace( Rationals, [ [ 1, 0, 1 ], [ 1, 2, 3 ] ] );;
##  gap> f:=LeftModuleHomomorphismByImages( V, W,
##  > [ [ 1, 0 ], [ 0, 1 ] ], [ [ 1, 0, 1 ], [ 1, 2, 3 ] ] );
##  [ [ 1, 0 ], [ 0, 1 ] ] -> [ [ 1, 0, 1 ], [ 1, 2, 3 ] ]
##  gap> Image( f, [1,1] );
##  [ 2, 2, 4 ]
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareGlobalFunction( "LeftModuleHomomorphismByImages" );

DeclareOperation( "LeftModuleHomomorphismByImagesNC",
    [ IsLeftModule, IsLeftModule, IsList, IsList ] );


#############################################################################
##
#A  AsLeftModuleGeneralMappingByImages( <map> )
##
##  <ManSection>
##  <Attr Name="AsLeftModuleGeneralMappingByImages" Arg='map'/>
##
##  <Description>
##  </Description>
##  </ManSection>
##
DeclareAttribute( "AsLeftModuleGeneralMappingByImages", IsGeneralMapping );


#############################################################################
##
#O  LeftModuleHomomorphismByMatrix( <BS>, <matrix>, <BR> )
##
##  <#GAPDoc Label="LeftModuleHomomorphismByMatrix">
##  <ManSection>
##  <Oper Name="LeftModuleHomomorphismByMatrix" Arg='BS, matrix, BR'/>
##
##  <Description>
##  Let <A>BS</A> and <A>BR</A> be bases of the left <M>R</M>-modules
##  <M>V</M> and <M>W</M>, respectively.
##  <Ref Oper="LeftModuleHomomorphismByMatrix"/> returns the <M>R</M>-linear
##  mapping from <M>V</M> to <M>W</M> that is defined by the matrix
##  <A>matrix</A>, as follows.
##  The image of the <M>i</M>-th basis vector of <A>BS</A> is the linear
##  combination of the basis vectors of <A>BR</A> with coefficients the
##  <M>i</M>-th row of <A>matrix</A>.
##  <Example><![CDATA[
##  gap> V:= Rationals^2;;
##  gap> W:= VectorSpace( Rationals, [ [ 1, 0, 1 ], [ 1, 2, 3 ] ] );;
##  gap> f:= LeftModuleHomomorphismByMatrix( Basis( V ),
##  > [ [ 1, 2 ], [ 3, 1 ] ], Basis( W ) );
##  <linear mapping by matrix, ( Rationals^
##  2 ) -> <vector space over Rationals, with 2 generators>>
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareOperation( "LeftModuleHomomorphismByMatrix",
    [ IsBasis, IsMatrix, IsBasis ] );


#############################################################################
##
#O  NaturalHomomorphismBySubspace( <V>, <W> ) . . . . . map onto factor space
##
##  <#GAPDoc Label="NaturalHomomorphismBySubspace">
##  <ManSection>
##  <Oper Name="NaturalHomomorphismBySubspace" Arg='V, W'/>
##
##  <Description>
##  For an <M>R</M>-vector space <A>V</A> and a subspace <A>W</A> of
##  <A>V</A>,
##  <Ref Oper="NaturalHomomorphismBySubspace"/> returns the <M>R</M>-linear
##  mapping that is the natural projection of <A>V</A> onto the factor space
##  <C><A>V</A> / <A>W</A></C>.
##  <Example><![CDATA[
##  gap> V:= Rationals^3;;
##  gap> W:= VectorSpace( Rationals, [ [ 1, 1, 1 ] ] );;
##  gap> f:= NaturalHomomorphismBySubspace( V, W );
##  <linear mapping by matrix, ( Rationals^3 ) -> ( Rationals^2 )>
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareOperation( "NaturalHomomorphismBySubspace",
    [ IsLeftModule, IsLeftModule ] );


#############################################################################
##
#F  NaturalHomomorphismBySubspaceOntoFullRowSpace( <V>, <W> )
##
##  <ManSection>
##  <Func Name="NaturalHomomorphismBySubspaceOntoFullRowSpace" Arg='V, W'/>
##
##  <Description>
##  returns a vector space homomorphism from the vector space <A>V</A> onto a
##  full row space, with kernel exactly the vector space <A>W</A>,
##  which must be contained in <A>V</A>.
##  </Description>
##  </ManSection>
##
DeclareGlobalFunction( "NaturalHomomorphismBySubspaceOntoFullRowSpace" );


#############################################################################
##
##  2. Vector Spaces of Linear Mappings
##


#############################################################################
##
#P  IsFullHomModule( <M> )
##
##  <#GAPDoc Label="IsFullHomModule">
##  <ManSection>
##  <Prop Name="IsFullHomModule" Arg='M'/>
##
##  <Description>
##  A <E>full hom module</E> is a module of all <M>R</M>-linear mappings
##  between two left <M>R</M>-modules.
##  The function <Ref Oper="Hom"/> can be used to construct a full hom
##  module.
##  <Example><![CDATA[
##  gap> V:= Rationals^2;;
##  gap> W:= VectorSpace( Rationals, [ [ 1, 0, 1 ], [ 1, 2, 3 ] ] );;
##  gap> H:= Hom( Rationals, V, W );;
##  gap> IsFullHomModule( H );
##  true
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareProperty( "IsFullHomModule", IsFreeLeftModule );


#############################################################################
##
#P  IsPseudoCanonicalBasisFullHomModule( <B> )
##
##  <#GAPDoc Label="IsPseudoCanonicalBasisFullHomModule">
##  <ManSection>
##  <Prop Name="IsPseudoCanonicalBasisFullHomModule" Arg='B'/>
##
##  <Description>
##  A basis of a full hom module is called pseudo canonical basis
##  if the matrices of its basis vectors w.r.t. the stored bases of source
##  and range contain exactly one identity entry and otherwise zeros.
##  <P/>
##  Note that this is not a canonical basis
##  (see&nbsp;<Ref Func="CanonicalBasis"/>)
##  because it depends on the stored bases of source and range.
##  <Example><![CDATA[
##  gap> IsPseudoCanonicalBasisFullHomModule( Basis( H ) );
##  true
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareProperty( "IsPseudoCanonicalBasisFullHomModule", IsBasis );


#############################################################################
##
#O  Hom( <F>, <V>, <W> )  . . .  space of <F>-linear mappings from <V> to <W>
##
##  <#GAPDoc Label="Hom">
##  <ManSection>
##  <Oper Name="Hom" Arg='F, V, W'/>
##
##  <Description>
##  For a field <A>F</A> and two vector spaces <A>V</A> and <A>W</A>
##  that can be regarded as <A>F</A>-modules
##  (see&nbsp;<Ref Func="AsLeftModule"/>),
##  <Ref Oper="Hom"/> returns the <A>F</A>-vector space of
##  all <A>F</A>-linear mappings from <A>V</A> to <A>W</A>.
##  <Example><![CDATA[
##  gap> V:= Rationals^2;;
##  gap> W:= VectorSpace( Rationals, [ [ 1, 0, 1 ], [ 1, 2, 3 ] ] );;
##  gap> H:= Hom( Rationals, V, W );
##  Hom( Rationals, ( Rationals^2 ), <vector space over Rationals, with 
##  2 generators> )
##  gap> Dimension( H );
##  4
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareOperation( "Hom", [ IsRing, IsLeftModule, IsLeftModule ] );


#############################################################################
##
#O  End( <F>, <V> ) . . . . . .  space of <F>-linear mappings from <V> to <V>
##
##  <#GAPDoc Label="End">
##  <ManSection>
##  <Oper Name="End" Arg='F, V'/>
##
##  <Description>
##  For a field <A>F</A> and a vector space <A>V</A> that can be regarded as
##  an <A>F</A>-module (see&nbsp;<Ref Func="AsLeftModule"/>),
##  <Ref Oper="End"/> returns the <A>F</A>-algebra of all <A>F</A>-linear
##  mappings from <A>V</A> to <A>V</A>.
##  <Example><![CDATA[
##  gap> A:= End( Rationals, Rationals^2 );
##  End( Rationals, ( Rationals^2 ) )
##  gap> Dimension( A );
##  4
##  ]]></Example>
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareOperation( "End", [ IsRing, IsLeftModule ] );


#############################################################################
##
#F  IsLinearMappingsModule( <V> )
##
##  <#GAPDoc Label="IsLinearMappingsModule">
##  <ManSection>
##  <Filt Name="IsLinearMappingsModule" Arg='V'/>
##
##  <Description>
##  If an <M>F</M>-vector space <A>V</A> is in the filter
##  <Ref Filt="IsLinearMappingsModule"/> then
##  this expresses that <A>V</A> consists of linear mappings,
##  and that <A>V</A> is handled via the mechanism of nice bases
##  (see&nbsp;<Ref Sect="Vector Spaces Handled By Nice Bases"/>),
##  in the following way.
##  Let <M>S</M> and <M>R</M> be the source and the range, respectively,
##  of each mapping in <M>V</M>.
##  Then the <Ref Attr="NiceFreeLeftModuleInfo"/> value of <A>V</A> is
##  a record with the components <C>basissource</C> (a basis <M>B_S</M> of
##  <M>S</M>) and <C>basisrange</C> (a basis <M>B_R</M> of <M>R</M>),
##  and the <Ref Func="NiceVector"/> value of <M>v \in <A>V</A></M>
##  is defined as the matrix of the <M>F</M>-linear mapping <M>v</M>
##  w.r.t.&nbsp;the bases <M>B_S</M> and <M>B_R</M>.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##
DeclareHandlingByNiceBasis( "IsLinearMappingsModule",
    "for free left modules of linear mappings" );


#############################################################################
##
#M  IsFiniteDimensional( <A> )  . . . . .  hom FLMLORs are finite dimensional
##
InstallTrueMethod( IsFiniteDimensional, IsLinearMappingsModule );


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