Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

563574 views
1
2
10 Functors
3
4
5
10.1 Functors: Category and Representations
6
7
8
10.2 Functors: Constructors
9
10
11
10.3 Functors: Attributes
12
13
14
10.4 Basic Functors
15
16
10.4-1 functor_Cokernel
17
18
functor_Cokernel global variable
19
20
The functor that associates to a map its cokernel.
21
22
 Code 
23
InstallValue( functor_Cokernel_for_fp_modules,
24
 CreateHomalgFunctor(
25
 [ "name", "Cokernel" ],
26
 [ "category", HOMALG_MODULES.category ],
27
 [ "operation", "Cokernel" ],
28
 [ "natural_transformation", "CokernelEpi" ],
29
 [ "special", true ],
30
 [ "number_of_arguments", 1 ],
31
 [ "1", [ [ "covariant" ],
32
 [ IsMapOfFinitelyGeneratedModulesRep,
33
 [ IsHomalgChainMorphism, IsImageSquare ] ] ] ],
34
 [ "OnObjects", _Functor_Cokernel_OnModules ]
35
 )
36
 );
37

38
39
10.4-2 Cokernel
40
41
Cokernel( phi )  operation
42
43
The following example also makes use of the natural transformation
44
CokernelEpi.
45
46
 Example 
47
gap> ZZ := HomalgRingOfIntegers( );
48
Z
49
gap> M := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );;
50
gap> M := LeftPresentation( M );
51
<A non-torsion left module presented by 2 relations for 3 generators>
52
gap> N := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7, 8, 9 ]", 2, 4, ZZ );;
53
gap> N := LeftPresentation( N );
54
<A non-torsion left module presented by 2 relations for 4 generators>
55
gap> mat := HomalgMatrix( "[ \
56
> 1, 0, -3, -6, \
57
> 0, 1, 6, 11, \
58
> 1, 0, -3, -6 \
59
> ]", 3, 4, ZZ );;
60
gap> phi := HomalgMap( mat, M, N );;
61
gap> IsMorphism( phi );
62
true
63
gap> phi;
64
<A homomorphism of left modules>
65
gap> coker := Cokernel( phi );
66
<A left module presented by 5 relations for 4 generators>
67
gap> ByASmallerPresentation( coker );
68
<A rank 1 left module presented by 1 relation for 2 generators>
69
gap> Display( coker );
70
Z/< 8 > + Z^(1 x 1)
71
gap> nu := CokernelEpi( phi );
72
<An epimorphism of left modules>
73
gap> Display( nu );
74
[ [ -5, 0 ],
75
 [ -6, 1 ],
76
 [ 1, -2 ],
77
 [ 0, 1 ] ]
78

79
the map is currently represented by the above 4 x 2 matrix
80
gap> DefectOfExactness( phi, nu );
81
<A zero left module>
82
gap> ByASmallerPresentation( nu );
83
<A non-zero epimorphism of left modules>
84
gap> Display( nu );
85
[ [ 2, 0 ],
86
 [ 1, -2 ],
87
 [ 0, 1 ] ]
88

89
the map is currently represented by the above 3 x 2 matrix
90
gap> PreInverse( nu );
91
false
92

93
94
10.4-3 functor_ImageObject
95
96
functor_ImageObject global variable
97
98
The functor that associates to a map its image.
99
100
 Code 
101
InstallValue( functor_ImageObject_for_fp_modules,
102
 CreateHomalgFunctor(
103
 [ "name", "ImageObject for modules" ],
104
 [ "category", HOMALG_MODULES.category ],
105
 [ "operation", "ImageObject" ],
106
 [ "natural_transformation", "ImageObjectEmb" ],
107
 [ "number_of_arguments", 1 ],
108
 [ "1", [ [ "covariant" ],
109
 [ IsMapOfFinitelyGeneratedModulesRep and
110
 AdmissibleInputForHomalgFunctors ] ] ],
111
 [ "OnObjects", _Functor_ImageObject_OnModules ]
112
 )
113
 );
114

115
116
10.4-4 ImageObject
117
118
ImageObject( phi )  operation
119
120
The following example also makes use of the natural transformations
121
ImageObjectEpi and ImageObjectEmb.
122
123
 Example 
124
gap> ZZ := HomalgRingOfIntegers( );
125
Z
126
gap> M := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );;
127
gap> M := LeftPresentation( M );
128
<A non-torsion left module presented by 2 relations for 3 generators>
129
gap> N := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7, 8, 9 ]", 2, 4, ZZ );;
130
gap> N := LeftPresentation( N );
131
<A non-torsion left module presented by 2 relations for 4 generators>
132
gap> mat := HomalgMatrix( "[ \
133
> 1, 0, -3, -6, \
134
> 0, 1, 6, 11, \
135
> 1, 0, -3, -6 \
136
> ]", 3, 4, ZZ );;
137
gap> phi := HomalgMap( mat, M, N );;
138
gap> IsMorphism( phi );
139
true
140
gap> phi;
141
<A homomorphism of left modules>
142
gap> im := ImageObject( phi );
143
<A left module presented by yet unknown relations for 3 generators>
144
gap> ByASmallerPresentation( im );
145
<A free left module of rank 1 on a free generator>
146
gap> pi := ImageObjectEpi( phi );
147
<A non-zero split epimorphism of left modules>
148
gap> epsilon := ImageObjectEmb( phi );
149
<A monomorphism of left modules>
150
gap> phi = pi * epsilon;
151
true
152

153
154
10.4-5 Kernel
155
156
Kernel( phi )  operation
157
158
The following example also makes use of the natural transformation
159
KernelEmb.
160
161
 Example 
162
gap> ZZ := HomalgRingOfIntegers( );
163
Z
164
gap> M := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );;
165
gap> M := LeftPresentation( M );
166
<A non-torsion left module presented by 2 relations for 3 generators>
167
gap> N := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7, 8, 9 ]", 2, 4, ZZ );;
168
gap> N := LeftPresentation( N );
169
<A non-torsion left module presented by 2 relations for 4 generators>
170
gap> mat := HomalgMatrix( "[ \
171
> 1, 0, -3, -6, \
172
> 0, 1, 6, 11, \
173
> 1, 0, -3, -6 \
174
> ]", 3, 4, ZZ );;
175
gap> phi := HomalgMap( mat, M, N );;
176
gap> IsMorphism( phi );
177
true
178
gap> phi;
179
<A homomorphism of left modules>
180
gap> ker := Kernel( phi );
181
<A cyclic left module presented by yet unknown relations for a cyclic generato\
182
r>
183
gap> Display( ker );
184
Z/< -3 >
185
gap> ByASmallerPresentation( last );
186
<A cyclic torsion left module presented by 1 relation for a cyclic generator>
187
gap> Display( ker );
188
Z/< 3 >
189
gap> iota := KernelEmb( phi );
190
<A monomorphism of left modules>
191
gap> Display( iota );
192
[ [ 0, 2, 4 ] ]
193

194
the map is currently represented by the above 1 x 3 matrix
195
gap> DefectOfExactness( iota, phi );
196
<A zero left module>
197
gap> ByASmallerPresentation( iota );
198
<A non-zero monomorphism of left modules>
199
gap> Display( iota );
200
[ [ 2, 0 ] ]
201

202
the map is currently represented by the above 1 x 2 matrix
203
gap> PostInverse( iota );
204
fail
205

206
207
10.4-6 DefectOfExactness
208
209
DefectOfExactness( phi, psi )  operation
210
211
We follow the associative convention for applying maps. For left modules phi
212
is applied first and from the right. For right modules psi is applied first
213
and from the left.
214
215
The following example also makes use of the natural transformation
216
KernelEmb.
217
218
 Example 
219
gap> ZZ := HomalgRingOfIntegers( );
220
Z
221
gap> M := HomalgMatrix( "[ 2, 3, 4, 0, 5, 6, 7, 0 ]", 2, 4, ZZ );;
222
gap> M := LeftPresentation( M );
223
<A non-torsion left module presented by 2 relations for 4 generators>
224
gap> N := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7, 8, 9 ]", 2, 4, ZZ );;
225
gap> N := LeftPresentation( N );
226
<A non-torsion left module presented by 2 relations for 4 generators>
227
gap> mat := HomalgMatrix( "[ \
228
> 1, 3, 3, 3, \
229
> 0, 3, 10, 17, \
230
> 1, 3, 3, 3, \
231
> 0, 0, 0, 0 \
232
> ]", 4, 4, ZZ );;
233
gap> phi := HomalgMap( mat, M, N );;
234
gap> IsMorphism( phi );
235
true
236
gap> phi;
237
<A homomorphism of left modules>
238
gap> iota := KernelEmb( phi );
239
<A monomorphism of left modules>
240
gap> DefectOfExactness( iota, phi );
241
<A zero left module>
242
gap> hom_iota := Hom( iota ); ## a shorthand for Hom( iota, ZZ );
243
<A homomorphism of right modules>
244
gap> hom_phi := Hom( phi ); ## a shorthand for Hom( phi, ZZ );
245
<A homomorphism of right modules>
246
gap> DefectOfExactness( hom_iota, hom_phi );
247
<A cyclic right module on a cyclic generator satisfying yet unknown relations>
248
gap> ByASmallerPresentation( last );
249
<A cyclic torsion right module on a cyclic generator satisfying 1 relation>
250
gap> Display( last );
251
Z/< 2 >
252

253
254
10.4-7 Functor_Hom
255
256
Functor_Hom global variable
257
258
The bifunctor Hom.
259
260
 Code 
261
InstallValue( Functor_Hom_for_fp_modules,
262
 CreateHomalgFunctor(
263
 [ "name", "Hom" ],
264
 [ "category", HOMALG_MODULES.category ],
265
 [ "operation", "Hom" ],
266
 [ "number_of_arguments", 2 ],
267
 [ "1", [ [ "contravariant", "right adjoint", "distinguished" ] ] ],
268
 [ "2", [ [ "covariant", "left exact" ] ] ],
269
 [ "OnObjects", _Functor_Hom_OnModules ],
270
 [ "OnMorphisms", _Functor_Hom_OnMaps ],
271
 [ "MorphismConstructor", HOMALG_MODULES.category.MorphismConstructor ]
272
 )
273
 );
274

275
276
10.4-8 Hom
277
278
Hom( o1, o2 )  operation
279
280
o1 resp. o2 could be a module, a map, a complex (of modules or of again of
281
complexes), or a chain morphism.
282
283
Each generator of a module of homomorphisms is displayed as a matrix of
284
appropriate dimensions.
285
286
 Example 
287
gap> ZZ := HomalgRingOfIntegers( );
288
Z
289
gap> M := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );;
290
gap> M := LeftPresentation( M );
291
<A non-torsion left module presented by 2 relations for 3 generators>
292
gap> N := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7, 8, 9 ]", 2, 4, ZZ );;
293
gap> N := LeftPresentation( N );
294
<A non-torsion left module presented by 2 relations for 4 generators>
295
gap> mat := HomalgMatrix( "[ \
296
> 1, 0, -3, -6, \
297
> 0, 1, 6, 11, \
298
> 1, 0, -3, -6 \
299
> ]", 3, 4, ZZ );;
300
gap> phi := HomalgMap( mat, M, N );;
301
gap> IsMorphism( phi );
302
true
303
gap> phi;
304
<A homomorphism of left modules>
305
gap> psi := Hom( phi, M );
306
<A homomorphism of right modules>
307
gap> ByASmallerPresentation( psi );
308
<A non-zero homomorphism of right modules>
309
gap> Display( psi );
310
[ [ 1, 1, 0, 1 ],
311
 [ 2, 2, 0, 0 ],
312
 [ 0, 0, 6, 10 ] ]
313

314
the map is currently represented by the above 3 x 4 matrix
315
gap> homNM := Source( psi );
316
<A rank 2 right module on 4 generators satisfying 2 relations>
317
gap> IsIdenticalObj( homNM, Hom( N, M ) ); ## the caching at work
318
true
319
gap> homMM := Range( psi );
320
<A rank 1 right module on 3 generators satisfying 2 relations>
321
gap> IsIdenticalObj( homMM, Hom( M, M ) ); ## the caching at work
322
true
323
gap> Display( homNM );
324
Z/< 3 > + Z/< 3 > + Z^(2 x 1)
325
gap> Display( homMM );
326
Z/< 3 > + Z/< 3 > + Z^(1 x 1)
327
gap> IsMonomorphism( psi );
328
false
329
gap> IsEpimorphism( psi );
330
false
331
gap> GeneratorsOfModule( homMM );
332
<A set of 3 generators of a homalg right module>
333
gap> Display( last );
334
[ [ 0, 0, 0 ],
335
 [ 0, 1, 2 ],
336
 [ 0, 0, 0 ] ]
337

338
the map is currently represented by the above 3 x 3 matrix
339

340
[ [ 0, 2, 4 ],
341
 [ 0, 0, 0 ],
342
 [ 0, 2, 4 ] ]
343

344
the map is currently represented by the above 3 x 3 matrix
345

346
[ [ 0, 1, 3 ],
347
 [ 0, 0, -2 ],
348
 [ 0, 1, 3 ] ]
349

350
the map is currently represented by the above 3 x 3 matrix
351

352
a set of 3 generators given by the the above matrices
353
gap> GeneratorsOfModule( homNM );
354
<A set of 4 generators of a homalg right module>
355
gap> Display( last );
356
[ [ 0, 1, 2 ],
357
 [ 0, 1, 2 ],
358
 [ 0, 1, 2 ],
359
 [ 0, 0, 0 ] ]
360

361
the map is currently represented by the above 4 x 3 matrix
362

363
[ [ 0, 1, 2 ],
364
 [ 0, 0, 0 ],
365
 [ 0, 0, 0 ],
366
 [ 0, 2, 4 ] ]
367

368
the map is currently represented by the above 4 x 3 matrix
369

370
[ [ 0, 0, -3 ],
371
 [ 0, 0, 7 ],
372
 [ 0, 0, -5 ],
373
 [ 0, 0, 1 ] ]
374

375
the map is currently represented by the above 4 x 3 matrix
376

377
[ [ 0, 1, -3 ],
378
 [ 0, 0, 12 ],
379
 [ 0, 0, -9 ],
380
 [ 0, 2, 6 ] ]
381

382
the map is currently represented by the above 4 x 3 matrix
383

384
a set of 4 generators given by the the above matrices
385

386
387
If for example the source N gets a new presentation, you will see the effect
388
on the generators:
389
390
 Example 
391
gap> ByASmallerPresentation( N );
392
<A rank 2 left module presented by 1 relation for 3 generators>
393
gap> GeneratorsOfModule( homNM );
394
<A set of 4 generators of a homalg right module>
395
gap> Display( last );
396
[ [ 0, 3, 6 ],
397
 [ 0, 1, 2 ],
398
 [ 0, 0, 0 ] ]
399

400
the map is currently represented by the above 3 x 3 matrix
401

402
[ [ 0, 9, 18 ],
403
 [ 0, 0, 0 ],
404
 [ 0, 2, 4 ] ]
405

406
the map is currently represented by the above 3 x 3 matrix
407

408
[ [ 0, 0, 0 ],
409
 [ 0, 0, -5 ],
410
 [ 0, 0, 1 ] ]
411

412
the map is currently represented by the above 3 x 3 matrix
413

414
[ [ 0, 9, 18 ],
415
 [ 0, 0, -9 ],
416
 [ 0, 2, 6 ] ]
417

418
the map is currently represented by the above 3 x 3 matrix
419

420
a set of 4 generators given by the the above matrices
421

422
423
Now we compute a certain natural filtration on Hom(M,M):
424
425
 Example 
426
gap> dM := Resolution( M );
427
<A non-zero right acyclic complex containing a single morphism of left modules\
428
 at degrees [ 0 .. 1 ]>
429
gap> hMM := Hom( dM, dM );
430
<A non-zero acyclic cocomplex containing a single morphism of right complexes \
431
at degrees [ 0 .. 1 ]>
432
gap> BMM := HomalgBicomplex( hMM );
433
<A non-zero bicocomplex containing right modules at bidegrees [ 0 .. 1 ]x
434
[ -1 .. 0 ]>
435
gap> II_E := SecondSpectralSequenceWithFiltration( BMM );
436
<A stable cohomological spectral sequence with sheets at levels 
437
[ 0 .. 2 ] each consisting of right modules at bidegrees [ -1 .. 0 ]x
438
[ 0 .. 1 ]>
439
gap> Display( II_E );
440
The associated transposed spectral sequence:
441

442
a cohomological spectral sequence at bidegrees
443
[ [ 0 .. 1 ], [ -1 .. 0 ] ]
444
---------
445
Level 0:
446

447
 * *
448
 * *
449
---------
450
Level 1:
451

452
 * *
453
 . .
454
---------
455
Level 2:
456

457
 s s
458
 . .
459

460
Now the spectral sequence of the bicomplex:
461

462
a cohomological spectral sequence at bidegrees
463
[ [ -1 .. 0 ], [ 0 .. 1 ] ]
464
---------
465
Level 0:
466

467
 * *
468
 * *
469
---------
470
Level 1:
471

472
 * *
473
 * *
474
---------
475
Level 2:
476

477
 s s
478
 . s
479
gap> filt := FiltrationBySpectralSequence( II_E );
480
<A descending filtration with degrees [ -1 .. 0 ] and graded parts:
481
 
482
-1: <A non-zero cyclic torsion right module on a cyclic generator satisfying
483
 yet unknown relations>
484
 0: <A rank 1 right module on 3 generators satisfying 2 relations>
485
of
486
<A right module on 4 generators satisfying yet unknown relations>>
487
gap> ByASmallerPresentation( filt );
488
<A descending filtration with degrees [ -1 .. 0 ] and graded parts:
489
 
490
-1: <A non-zero cyclic torsion right module on a cyclic generator satisfying 1\
491
 relation>
492
 0: <A rank 1 right module on 2 generators satisfying 1 relation>
493
of
494
<A rank 1 right module on 3 generators satisfying 2 relations>>
495
gap> Display( filt );
496
Degree -1:
497

498
Z/< 3 >
499
----------
500
Degree 0:
501

502
Z/< 3 > + Z^(1 x 1)
503
gap> Display( homMM );
504
Z/< 3 > + Z/< 3 > + Z^(1 x 1)
505

506
507
10.4-9 Functor_TensorProduct
508
509
Functor_TensorProduct global variable
510
511
The tensor product bifunctor.
512
513
 Code 
514
InstallValue( Functor_TensorProduct_for_fp_modules,
515
 CreateHomalgFunctor(
516
 [ "name", "TensorProduct" ],
517
 [ "category", HOMALG_MODULES.category ],
518
 [ "operation", "TensorProductOp" ],
519
 [ "number_of_arguments", 2 ],
520
 [ "1", [ [ "covariant", "left adjoint", "distinguished" ] ] ],
521
 [ "2", [ [ "covariant", "left adjoint" ] ] ],
522
 [ "OnObjects", _Functor_TensorProduct_OnModules ],
523
 [ "OnMorphisms", _Functor_TensorProduct_OnMaps ],
524
 [ "MorphismConstructor", HOMALG_MODULES.category.MorphismConstructor ]
525
 )
526
 );
527

528
529
10.4-10 TensorProduct
530
531
TensorProduct( o1, o2 )  operation
532
\*( o1, o2 )  operation
533
534
o1 resp. o2 could be a module, a map, a complex (of modules or of again of
535
complexes), or a chain morphism.
536
537
The symbol * is a shorthand for several operations associated with the
538
functor Functor_TensorProduct_for_fp_modules installed under the name
539
TensorProduct.
540
541
 Example 
542
gap> ZZ := HomalgRingOfIntegers( );
543
Z
544
gap> M := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );
545
<A 2 x 3 matrix over an internal ring>
546
gap> M := LeftPresentation( M );
547
<A non-torsion left module presented by 2 relations for 3 generators>
548
gap> N := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7, 8, 9 ]", 2, 4, ZZ );
549
<A 2 x 4 matrix over an internal ring>
550
gap> N := LeftPresentation( N );
551
<A non-torsion left module presented by 2 relations for 4 generators>
552
gap> mat := HomalgMatrix( "[ \
553
> 1, 0, -3, -6, \
554
> 0, 1, 6, 11, \
555
> 1, 0, -3, -6 \
556
> ]", 3, 4, ZZ );
557
<A 3 x 4 matrix over an internal ring>
558
gap> phi := HomalgMap( mat, M, N );
559
<A "homomorphism" of left modules>
560
gap> IsMorphism( phi );
561
true
562
gap> phi;
563
<A homomorphism of left modules>
564
gap> L := Hom( ZZ, M );
565
<A rank 1 right module on 3 generators satisfying yet unknown relations>
566
gap> ByASmallerPresentation( L );
567
<A rank 1 right module on 2 generators satisfying 1 relation>
568
gap> Display( L );
569
Z/< 3 > + Z^(1 x 1)
570
gap> L;
571
<A rank 1 right module on 2 generators satisfying 1 relation>
572
gap> psi := phi * L;
573
<A homomorphism of right modules>
574
gap> ByASmallerPresentation( psi );
575
<A non-zero homomorphism of right modules>
576
gap> Display( psi );
577
[ [ 0, 0, 1, 1 ],
578
 [ 0, 0, 8, 1 ],
579
 [ 0, 0, 0, -2 ],
580
 [ 0, 0, 0, 2 ] ]
581

582
the map is currently represented by the above 4 x 4 matrix
583
gap> ML := Source( psi );
584
<A rank 1 right module on 4 generators satisfying 3 relations>
585
gap> IsIdenticalObj( ML, M * L ); ## the caching at work
586
true
587
gap> NL := Range( psi );
588
<A rank 2 right module on 4 generators satisfying 2 relations>
589
gap> IsIdenticalObj( NL, N * L ); ## the caching at work
590
true
591
gap> Display( ML );
592
Z/< 3 > + Z/< 3 > + Z/< 3 > + Z^(1 x 1)
593
gap> Display( NL );
594
Z/< 3 > + Z/< 12 > + Z^(2 x 1)
595

596
597
Now we compute a certain natural filtration on the tensor product M*L:
598
599
 Example 
600
gap> P := Resolution( M );
601
<A non-zero right acyclic complex containing a single morphism of left modules\
602
 at degrees [ 0 .. 1 ]>
603
gap> GP := Hom( P );
604
<A non-zero acyclic cocomplex containing a single morphism of right modules at\
605
 degrees [ 0 .. 1 ]>
606
gap> CE := Resolution( GP );
607
<An acyclic cocomplex containing a single morphism of right complexes at degre\
608
es [ 0 .. 1 ]>
609
gap> FCE := Hom( CE, L );
610
<A non-zero acyclic complex containing a single morphism of left cocomplexes a\
611
t degrees [ 0 .. 1 ]>
612
gap> BC := HomalgBicomplex( FCE );
613
<A non-zero bicomplex containing left modules at bidegrees [ 0 .. 1 ]x
614
[ -1 .. 0 ]>
615
gap> II_E := SecondSpectralSequenceWithFiltration( BC );
616
<A stable homological spectral sequence with sheets at levels 
617
[ 0 .. 2 ] each consisting of left modules at bidegrees [ -1 .. 0 ]x
618
[ 0 .. 1 ]>
619
gap> Display( II_E );
620
The associated transposed spectral sequence:
621

622
a homological spectral sequence at bidegrees
623
[ [ 0 .. 1 ], [ -1 .. 0 ] ]
624
---------
625
Level 0:
626

627
 * *
628
 * *
629
---------
630
Level 1:
631

632
 * *
633
 . .
634
---------
635
Level 2:
636

637
 s s
638
 . .
639

640
Now the spectral sequence of the bicomplex:
641

642
a homological spectral sequence at bidegrees
643
[ [ -1 .. 0 ], [ 0 .. 1 ] ]
644
---------
645
Level 0:
646

647
 * *
648
 * *
649
---------
650
Level 1:
651

652
 * *
653
 . s
654
---------
655
Level 2:
656

657
 s s
658
 . s
659
gap> filt := FiltrationBySpectralSequence( II_E );
660
<An ascending filtration with degrees [ -1 .. 0 ] and graded parts:
661
 0: <A rank 1 left module presented by 1 relation for 2 generators>
662
 -1: <A non-zero left module presented by 2 relations for 2 generators>
663
of
664
<A non-zero left module presented by 10 relations for 6 generators>>
665
gap> ByASmallerPresentation( filt );
666
<An ascending filtration with degrees [ -1 .. 0 ] and graded parts:
667
 0: <A rank 1 left module presented by 1 relation for 2 generators>
668
 -1: <A non-zero torsion left module presented by 2 relations
669
 for 2 generators>
670
of
671
<A rank 1 left module presented by 3 relations for 4 generators>>
672
gap> Display( filt );
673
Degree 0:
674

675
Z/< 3 > + Z^(1 x 1)
676
----------
677
Degree -1:
678

679
Z/< 3 > + Z/< 3 >
680
gap> Display( ML );
681
Z/< 3 > + Z/< 3 > + Z/< 3 > + Z^(1 x 1)
682

683
684
10.4-11 Functor_Ext
685
686
Functor_Ext global variable
687
688
The bifunctor Ext.
689
690
Below is the only specific line of code used to define
691
Functor_Ext_for_fp_modules and all the different operations Ext in homalg.
692
693
 Code 
694
RightSatelliteOfCofunctor( Functor_Hom_for_fp_modules, "Ext" );
695

696
697
10.4-12 Ext
698
699
Ext( [c, ]o1, o2[, str] )  operation
700
701
Compute the c-th extension object of o1 with o2 where c is a nonnegative
702
integer and o1 resp. o2 could be a module, a map, a complex (of modules or
703
of again of complexes), or a chain morphism. If str=a then the
704
(cohomologically) graded object Ext^i(o1,o2) for 0 ≤ i ≤c is computed. If
705
neither c nor str is specified then the cohomologically graded object
706
Ext^i(o1,o2) for 0 ≤ i ≤ d is computed, where d is the length of the
707
internally computed free resolution of o1.
708
709
Each generator of a module of extensions is displayed as a matrix of
710
appropriate dimensions.
711
712
 Example 
713
gap> ZZ := HomalgRingOfIntegers( );
714
Z
715
gap> M := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );;
716
gap> M := LeftPresentation( M );
717
<A non-torsion left module presented by 2 relations for 3 generators>
718
gap> N := TorsionObject( M );
719
<A cyclic torsion left module presented by yet unknown relations for a cyclic \
720
generator>
721
gap> iota := TorsionObjectEmb( M );
722
<A monomorphism of left modules>
723
gap> psi := Ext( 1, iota, N );
724
<A homomorphism of right modules>
725
gap> ByASmallerPresentation( psi );
726
<A non-zero homomorphism of right modules>
727
gap> Display( psi );
728
[ [ 2 ] ]
729

730
the map is currently represented by the above 1 x 1 matrix
731
gap> extNN := Range( psi );
732
<A non-zero cyclic torsion right module on a cyclic generator satisfying 1 rel\
733
ation>
734
gap> IsIdenticalObj( extNN, Ext( 1, N, N ) ); ## the caching at work
735
true
736
gap> extMN := Source( psi );
737
<A non-zero cyclic torsion right module on a cyclic generator satisfying 1 rel\
738
ation>
739
gap> IsIdenticalObj( extMN, Ext( 1, M, N ) ); ## the caching at work
740
true
741
gap> Display( extNN );
742
Z/< 3 >
743
gap> Display( extMN );
744
Z/< 3 >
745

746
747
10.4-13 Functor_Tor
748
749
Functor_Tor global variable
750
751
The bifunctor Tor.
752
753
Below is the only specific line of code used to define
754
Functor_Tor_for_fp_modules and all the different operations Tor in homalg.
755
756
 Code 
757
LeftSatelliteOfFunctor( Functor_TensorProduct_for_fp_modules, "Tor" );
758

759
760
10.4-14 Tor
761
762
Tor( [c, ]o1, o2[, str] )  operation
763
764
Compute the c-th torsion object of o1 with o2 where c is a nonnegative
765
integer and o1 resp. o2 could be a module, a map, a complex (of modules or
766
of again of complexes), or a chain morphism. If str=a then the
767
(cohomologically) graded object Tor_i(o1,o2) for 0 ≤ i ≤c is computed. If
768
neither c nor str is specified then the cohomologically graded object
769
Tor_i(o1,o2) for 0 ≤ i ≤ d is computed, where d is the length of the
770
internally computed free resolution of o1.
771
772
 Example 
773
gap> ZZ := HomalgRingOfIntegers( );
774
Z
775
gap> M := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );;
776
gap> M := LeftPresentation( M );
777
<A non-torsion left module presented by 2 relations for 3 generators>
778
gap> N := TorsionObject( M );
779
<A cyclic torsion left module presented by yet unknown relations for a cyclic \
780
generator>
781
gap> iota := TorsionObjectEmb( M );
782
<A monomorphism of left modules>
783
gap> psi := Tor( 1, iota, N );
784
<A homomorphism of left modules>
785
gap> ByASmallerPresentation( psi );
786
<A non-zero homomorphism of left modules>
787
gap> Display( psi );
788
[ [ 1 ] ]
789

790
the map is currently represented by the above 1 x 1 matrix
791
gap> torNN := Source( psi );
792
<A non-zero cyclic torsion left module presented by 1 relation for a cyclic ge\
793
nerator>
794
gap> IsIdenticalObj( torNN, Tor( 1, N, N ) ); ## the caching at work
795
true
796
gap> torMN := Range( psi );
797
<A non-zero cyclic torsion left module presented by 1 relation for a cyclic ge\
798
nerator>
799
gap> IsIdenticalObj( torMN, Tor( 1, M, N ) ); ## the caching at work
800
true
801
gap> Display( torNN );
802
Z/< 3 >
803
gap> Display( torMN );
804
Z/< 3 >
805

806
807
10.4-15 Functor_RHom
808
809
Functor_RHom global variable
810
811
The bifunctor RHom.
812
813
Below is the only specific line of code used to define
814
Functor_RHom_for_fp_modules and all the different operations RHom in homalg.
815
816
 Code 
817
RightDerivedCofunctor( Functor_Hom_for_fp_modules );
818

819
820
10.4-16 RHom
821
822
RHom( [c, ]o1, o2[, str] )  operation
823
824
Compute the c-th extension object of o1 with o2 where c is a nonnegative
825
integer and o1 resp. o2 could be a module, a map, a complex (of modules or
826
of again of complexes), or a chain morphism. The string str may take
827
different values:
828
829
 If str=a then R^i Hom(o1,o2) for 0 ≤ i ≤c is computed.
830
831
 If str=c then the c-th connecting homomorphism with respect to the
832
short exact sequence o1 is computed.
833
834
 If str=t then the exact triangle upto cohomological degree c with
835
respect to the short exact sequence o1 is computed.
836
837
If neither c nor str is specified then the cohomologically graded object R^i
838
Hom(o1,o2) for 0 ≤ i ≤ d is computed, where d is the length of the
839
internally computed free resolution of o1.
840
841
Each generator of a module of derived homomorphisms is displayed as a matrix
842
of appropriate dimensions.
843
844
 Example 
845
gap> ZZ := HomalgRingOfIntegers( );
846
Z
847
gap> m := HomalgMatrix( [ [ 8, 0 ], [ 0, 2 ] ], ZZ );;
848
gap> M := LeftPresentation( m );
849
<A left module presented by 2 relations for 2 generators>
850
gap> Display( M );
851
Z/< 8 > + Z/< 2 >
852
gap> M;
853
<A torsion left module presented by 2 relations for 2 generators>
854
gap> a := HomalgMatrix( [ [ 2, 0 ] ], ZZ );;
855
gap> alpha := HomalgMap( a, "free", M );
856
<A homomorphism of left modules>
857
gap> pi := CokernelEpi( alpha );
858
<An epimorphism of left modules>
859
gap> Display( pi );
860
[ [ 1, 0 ],
861
 [ 0, 1 ] ]
862

863
the map is currently represented by the above 2 x 2 matrix
864
gap> iota := KernelEmb( pi );
865
<A monomorphism of left modules>
866
gap> Display( iota );
867
[ [ 2, 0 ] ]
868

869
the map is currently represented by the above 1 x 2 matrix
870
gap> N := Kernel( pi );
871
<A cyclic torsion left module presented by yet unknown relations for a cyclic \
872
generator>
873
gap> Display( N );
874
Z/< 4 >
875
gap> C := HomalgComplex( pi );
876
<A left acyclic complex containing a single morphism of left modules at degree\
877
s [ 0 .. 1 ]>
878
gap> Add( C, iota );
879
gap> ByASmallerPresentation( C );
880
<A non-zero short exact sequence containing
881
2 morphisms of left modules at degrees [ 0 .. 2 ]>
882
gap> Display( C );
883
-------------------------
884
at homology degree: 2
885
Z/< 4 >
886
-------------------------
887
[ [ 0, 6 ] ]
888

889
the map is currently represented by the above 1 x 2 matrix
890
------------v------------
891
at homology degree: 1
892
Z/< 2 > + Z/< 8 >
893
-------------------------
894
[ [ 0, 1 ],
895
 [ 1, 1 ] ]
896

897
the map is currently represented by the above 2 x 2 matrix
898
------------v------------
899
at homology degree: 0
900
Z/< 2 > + Z/< 2 >
901
-------------------------
902
gap> T := RHom( C, N );
903
<An exact cotriangle containing 3 morphisms of right cocomplexes at degrees
904
[ 0, 1, 2, 0 ]>
905
gap> ByASmallerPresentation( T );
906
<A non-zero exact cotriangle containing
907
3 morphisms of right cocomplexes at degrees [ 0, 1, 2, 0 ]>
908
gap> L := LongSequence( T );
909
<A cosequence containing 5 morphisms of right modules at degrees [ 0 .. 5 ]>
910
gap> Display( L );
911
-------------------------
912
at cohomology degree: 5
913
Z/< 4 >
914
------------^------------
915
[ [ 0, 3 ] ]
916

917
the map is currently represented by the above 1 x 2 matrix
918
-------------------------
919
at cohomology degree: 4
920
Z/< 2 > + Z/< 4 >
921
------------^------------
922
[ [ 0, 1 ],
923
 [ 0, 0 ] ]
924

925
the map is currently represented by the above 2 x 2 matrix
926
-------------------------
927
at cohomology degree: 3
928
Z/< 2 > + Z/< 2 >
929
------------^------------
930
[ [ 1 ],
931
 [ 0 ] ]
932

933
the map is currently represented by the above 2 x 1 matrix
934
-------------------------
935
at cohomology degree: 2
936
Z/< 4 >
937
------------^------------
938
[ [ 0, 2 ] ]
939

940
the map is currently represented by the above 1 x 2 matrix
941
-------------------------
942
at cohomology degree: 1
943
Z/< 2 > + Z/< 4 >
944
------------^------------
945
[ [ 0, 1 ],
946
 [ 2, 0 ] ]
947

948
the map is currently represented by the above 2 x 2 matrix
949
-------------------------
950
at cohomology degree: 0
951
Z/< 2 > + Z/< 2 >
952
-------------------------
953
gap> IsExactSequence( L );
954
true
955
gap> L;
956
<An exact cosequence containing 5 morphisms of right modules at degrees
957
[ 0 .. 5 ]>
958

959
960
10.4-17 Functor_LTensorProduct
961
962
Functor_LTensorProduct global variable
963
964
The bifunctor LTensorProduct.
965
966
Below is the only specific line of code used to define
967
Functor_LTensorProduct_for_fp_modules and all the different operations
968
LTensorProduct in homalg.
969
970
 Code 
971
LeftDerivedFunctor( Functor_TensorProduct_for_fp_modules );
972

973
974
10.4-18 LTensorProduct
975
976
LTensorProduct( [c, ]o1, o2[, str] )  operation
977
978
Compute the c-th torsion object of o1 with o2 where c is a nonnegative
979
integer and o1 resp. o2 could be a module, a map, a complex (of modules or
980
of again of complexes), or a chain morphism. The string str may take
981
different values:
982
983
 If str=a then L_i TensorProduct(o1,o2) for 0 ≤ i ≤c is computed.
984
985
 If str=c then the c-th connecting homomorphism with respect to the
986
short exact sequence o1 is computed.
987
988
 If str=t then the exact triangle upto cohomological degree c with
989
respect to the short exact sequence o1 is computed.
990
991
If neither c nor str is specified then the cohomologically graded object L_i
992
TensorProduct(o1,o2) for 0 ≤ i ≤ d is computed, where d is the length of the
993
internally computed free resolution of o1.
994
995
Each generator of a module of derived homomorphisms is displayed as a matrix
996
of appropriate dimensions.
997
998
 Example 
999
gap> ZZ := HomalgRingOfIntegers( );
1000
Z
1001
gap> m := HomalgMatrix( [ [ 8, 0 ], [ 0, 2 ] ], ZZ );;
1002
gap> M := LeftPresentation( m );
1003
<A left module presented by 2 relations for 2 generators>
1004
gap> Display( M );
1005
Z/< 8 > + Z/< 2 >
1006
gap> M;
1007
<A torsion left module presented by 2 relations for 2 generators>
1008
gap> a := HomalgMatrix( [ [ 2, 0 ] ], ZZ );;
1009
gap> alpha := HomalgMap( a, "free", M );
1010
<A homomorphism of left modules>
1011
gap> pi := CokernelEpi( alpha );
1012
<An epimorphism of left modules>
1013
gap> Display( pi );
1014
[ [ 1, 0 ],
1015
 [ 0, 1 ] ]
1016

1017
the map is currently represented by the above 2 x 2 matrix
1018
gap> iota := KernelEmb( pi );
1019
<A monomorphism of left modules>
1020
gap> Display( iota );
1021
[ [ 2, 0 ] ]
1022

1023
the map is currently represented by the above 1 x 2 matrix
1024
gap> N := Kernel( pi );
1025
<A cyclic torsion left module presented by yet unknown relations for a cyclic \
1026
generator>
1027
gap> Display( N );
1028
Z/< 4 >
1029
gap> C := HomalgComplex( pi );
1030
<A left acyclic complex containing a single morphism of left modules at degree\
1031
s [ 0 .. 1 ]>
1032
gap> Add( C, iota );
1033
gap> ByASmallerPresentation( C );
1034
<A non-zero short exact sequence containing
1035
2 morphisms of left modules at degrees [ 0 .. 2 ]>
1036
gap> Display( C );
1037
-------------------------
1038
at homology degree: 2
1039
Z/< 4 >
1040
-------------------------
1041
[ [ 0, 6 ] ]
1042

1043
the map is currently represented by the above 1 x 2 matrix
1044
------------v------------
1045
at homology degree: 1
1046
Z/< 2 > + Z/< 8 >
1047
-------------------------
1048
[ [ 0, 1 ],
1049
 [ 1, 1 ] ]
1050

1051
the map is currently represented by the above 2 x 2 matrix
1052
------------v------------
1053
at homology degree: 0
1054
Z/< 2 > + Z/< 2 >
1055
-------------------------
1056
gap> T := LTensorProduct( C, N );
1057
<An exact triangle containing 3 morphisms of left complexes at degrees
1058
[ 1, 2, 3, 1 ]>
1059
gap> ByASmallerPresentation( T );
1060
<A non-zero exact triangle containing
1061
3 morphisms of left complexes at degrees [ 1, 2, 3, 1 ]>
1062
gap> L := LongSequence( T );
1063
<A sequence containing 5 morphisms of left modules at degrees [ 0 .. 5 ]>
1064
gap> Display( L );
1065
-------------------------
1066
at homology degree: 5
1067
Z/< 4 >
1068
-------------------------
1069
[ [ 1, 3 ] ]
1070

1071
the map is currently represented by the above 1 x 2 matrix
1072
------------v------------
1073
at homology degree: 4
1074
Z/< 2 > + Z/< 4 >
1075
-------------------------
1076
[ [ 0, 1 ],
1077
 [ 0, 1 ] ]
1078

1079
the map is currently represented by the above 2 x 2 matrix
1080
------------v------------
1081
at homology degree: 3
1082
Z/< 2 > + Z/< 2 >
1083
-------------------------
1084
[ [ 2 ],
1085
 [ 0 ] ]
1086

1087
the map is currently represented by the above 2 x 1 matrix
1088
------------v------------
1089
at homology degree: 2
1090
Z/< 4 >
1091
-------------------------
1092
[ [ 0, 2 ] ]
1093

1094
the map is currently represented by the above 1 x 2 matrix
1095
------------v------------
1096
at homology degree: 1
1097
Z/< 2 > + Z/< 4 >
1098
-------------------------
1099
[ [ 0, 1 ],
1100
 [ 1, 1 ] ]
1101

1102
the map is currently represented by the above 2 x 2 matrix
1103
------------v------------
1104
at homology degree: 0
1105
Z/< 2 > + Z/< 2 >
1106
-------------------------
1107
gap> IsExactSequence( L );
1108
true
1109
gap> L;
1110
<An exact sequence containing 5 morphisms of left modules at degrees
1111
[ 0 .. 5 ]>
1112

1113
1114
10.4-19 Functor_HomHom
1115
1116
Functor_HomHom global variable
1117
1118
The bifunctor HomHom.
1119
1120
Below is the only specific line of code used to define
1121
Functor_HomHom_for_fp_modules and all the different operations HomHom in
1122
homalg.
1123
1124
 Code 
1125
Functor_Hom_for_fp_modules * Functor_Hom_for_fp_modules;
1126

1127
1128
10.4-20 Functor_LHomHom
1129
1130
Functor_LHomHom global variable
1131
1132
The bifunctor LHomHom.
1133
1134
Below is the only specific line of code used to define
1135
Functor_LHomHom_for_fp_modules and all the different operations LHomHom in
1136
homalg.
1137
1138
 Code 
1139
LeftDerivedFunctor( Functor_HomHom_for_fp_modules );
1140

1141
1142
1143
10.5 Tool Functors
1144
1145
1146
10.6 Other Functors
1147
1148
1149
10.7 Functors: Operations and Functions
1150
1151
1152