GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
1[1X10 [33X[0;0YFunctors[133X[101X234[1X10.1 [33X[0;0YFunctors: Category and Representations[133X[101X567[1X10.2 [33X[0;0YFunctors: Constructors[133X[101X8910[1X10.3 [33X[0;0YFunctors: Attributes[133X[101X111213[1X10.4 [33X[0;0YBasic Functors[133X[101X1415[1X10.4-1 functor_Cokernel[101X1617[29X[2Xfunctor_Cokernel[102X[32X global variable1819[33X[0;0YThe functor that associates to a map its cokernel.[133X2021[4X[32X Code [32X[104X22[4XInstallValue( functor_Cokernel_for_fp_modules,[104X23[4X CreateHomalgFunctor([104X24[4X [ "name", "Cokernel" ],[104X25[4X [ "category", HOMALG_MODULES.category ],[104X26[4X [ "operation", "Cokernel" ],[104X27[4X [ "natural_transformation", "CokernelEpi" ],[104X28[4X [ "special", true ],[104X29[4X [ "number_of_arguments", 1 ],[104X30[4X [ "1", [ [ "covariant" ],[104X31[4X [ IsMapOfFinitelyGeneratedModulesRep,[104X32[4X [ IsHomalgChainMorphism, IsImageSquare ] ] ] ],[104X33[4X [ "OnObjects", _Functor_Cokernel_OnModules ][104X34[4X )[104X35[4X );[104X36[4X[32X[104X3738[1X10.4-2 Cokernel[101X3940[29X[2XCokernel[102X( [3Xphi[103X ) [32X operation4142[33X[0;0YThe following example also makes use of the natural transformation43[10XCokernelEpi[110X.[133X4445[4X[32X Example [32X[104X46[4X[25Xgap>[125X [27XZZ := HomalgRingOfIntegers( );[127X[104X47[4X[28XZ[128X[104X48[4X[25Xgap>[125X [27XM := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );;[127X[104X49[4X[25Xgap>[125X [27XM := LeftPresentation( M );[127X[104X50[4X[28X<A non-torsion left module presented by 2 relations for 3 generators>[128X[104X51[4X[25Xgap>[125X [27XN := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7, 8, 9 ]", 2, 4, ZZ );;[127X[104X52[4X[25Xgap>[125X [27XN := LeftPresentation( N );[127X[104X53[4X[28X<A non-torsion left module presented by 2 relations for 4 generators>[128X[104X54[4X[25Xgap>[125X [27Xmat := HomalgMatrix( "[ \[127X[104X55[4X[25X>[125X [27X1, 0, -3, -6, \[127X[104X56[4X[25X>[125X [27X0, 1, 6, 11, \[127X[104X57[4X[25X>[125X [27X1, 0, -3, -6 \[127X[104X58[4X[25X>[125X [27X]", 3, 4, ZZ );;[127X[104X59[4X[25Xgap>[125X [27Xphi := HomalgMap( mat, M, N );;[127X[104X60[4X[25Xgap>[125X [27XIsMorphism( phi );[127X[104X61[4X[28Xtrue[128X[104X62[4X[25Xgap>[125X [27Xphi;[127X[104X63[4X[28X<A homomorphism of left modules>[128X[104X64[4X[25Xgap>[125X [27Xcoker := Cokernel( phi );[127X[104X65[4X[28X<A left module presented by 5 relations for 4 generators>[128X[104X66[4X[25Xgap>[125X [27XByASmallerPresentation( coker );[127X[104X67[4X[28X<A rank 1 left module presented by 1 relation for 2 generators>[128X[104X68[4X[25Xgap>[125X [27XDisplay( coker );[127X[104X69[4X[28XZ/< 8 > + Z^(1 x 1)[128X[104X70[4X[25Xgap>[125X [27Xnu := CokernelEpi( phi );[127X[104X71[4X[28X<An epimorphism of left modules>[128X[104X72[4X[25Xgap>[125X [27XDisplay( nu );[127X[104X73[4X[28X[ [ -5, 0 ],[128X[104X74[4X[28X [ -6, 1 ],[128X[104X75[4X[28X [ 1, -2 ],[128X[104X76[4X[28X [ 0, 1 ] ][128X[104X77[4X[28X[128X[104X78[4X[28Xthe map is currently represented by the above 4 x 2 matrix[128X[104X79[4X[25Xgap>[125X [27XDefectOfExactness( phi, nu );[127X[104X80[4X[28X<A zero left module>[128X[104X81[4X[25Xgap>[125X [27XByASmallerPresentation( nu );[127X[104X82[4X[28X<A non-zero epimorphism of left modules>[128X[104X83[4X[25Xgap>[125X [27XDisplay( nu );[127X[104X84[4X[28X[ [ 2, 0 ],[128X[104X85[4X[28X [ 1, -2 ],[128X[104X86[4X[28X [ 0, 1 ] ][128X[104X87[4X[28X[128X[104X88[4X[28Xthe map is currently represented by the above 3 x 2 matrix[128X[104X89[4X[25Xgap>[125X [27XPreInverse( nu );[127X[104X90[4X[28Xfalse[128X[104X91[4X[32X[104X9293[1X10.4-3 functor_ImageObject[101X9495[29X[2Xfunctor_ImageObject[102X[32X global variable9697[33X[0;0YThe functor that associates to a map its image.[133X9899[4X[32X Code [32X[104X100[4XInstallValue( functor_ImageObject_for_fp_modules,[104X101[4X CreateHomalgFunctor([104X102[4X [ "name", "ImageObject for modules" ],[104X103[4X [ "category", HOMALG_MODULES.category ],[104X104[4X [ "operation", "ImageObject" ],[104X105[4X [ "natural_transformation", "ImageObjectEmb" ],[104X106[4X [ "number_of_arguments", 1 ],[104X107[4X [ "1", [ [ "covariant" ],[104X108[4X [ IsMapOfFinitelyGeneratedModulesRep and[104X109[4X AdmissibleInputForHomalgFunctors ] ] ],[104X110[4X [ "OnObjects", _Functor_ImageObject_OnModules ][104X111[4X )[104X112[4X );[104X113[4X[32X[104X114115[1X10.4-4 ImageObject[101X116117[29X[2XImageObject[102X( [3Xphi[103X ) [32X operation118119[33X[0;0YThe following example also makes use of the natural transformations120[10XImageObjectEpi[110X and [10XImageObjectEmb[110X.[133X121122[4X[32X Example [32X[104X123[4X[25Xgap>[125X [27XZZ := HomalgRingOfIntegers( );[127X[104X124[4X[28XZ[128X[104X125[4X[25Xgap>[125X [27XM := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );;[127X[104X126[4X[25Xgap>[125X [27XM := LeftPresentation( M );[127X[104X127[4X[28X<A non-torsion left module presented by 2 relations for 3 generators>[128X[104X128[4X[25Xgap>[125X [27XN := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7, 8, 9 ]", 2, 4, ZZ );;[127X[104X129[4X[25Xgap>[125X [27XN := LeftPresentation( N );[127X[104X130[4X[28X<A non-torsion left module presented by 2 relations for 4 generators>[128X[104X131[4X[25Xgap>[125X [27Xmat := HomalgMatrix( "[ \[127X[104X132[4X[25X>[125X [27X1, 0, -3, -6, \[127X[104X133[4X[25X>[125X [27X0, 1, 6, 11, \[127X[104X134[4X[25X>[125X [27X1, 0, -3, -6 \[127X[104X135[4X[25X>[125X [27X]", 3, 4, ZZ );;[127X[104X136[4X[25Xgap>[125X [27Xphi := HomalgMap( mat, M, N );;[127X[104X137[4X[25Xgap>[125X [27XIsMorphism( phi );[127X[104X138[4X[28Xtrue[128X[104X139[4X[25Xgap>[125X [27Xphi;[127X[104X140[4X[28X<A homomorphism of left modules>[128X[104X141[4X[25Xgap>[125X [27Xim := ImageObject( phi );[127X[104X142[4X[28X<A left module presented by yet unknown relations for 3 generators>[128X[104X143[4X[25Xgap>[125X [27XByASmallerPresentation( im );[127X[104X144[4X[28X<A free left module of rank 1 on a free generator>[128X[104X145[4X[25Xgap>[125X [27Xpi := ImageObjectEpi( phi );[127X[104X146[4X[28X<A non-zero split epimorphism of left modules>[128X[104X147[4X[25Xgap>[125X [27Xepsilon := ImageObjectEmb( phi );[127X[104X148[4X[28X<A monomorphism of left modules>[128X[104X149[4X[25Xgap>[125X [27Xphi = pi * epsilon;[127X[104X150[4X[28Xtrue[128X[104X151[4X[32X[104X152153[1X10.4-5 Kernel[101X154155[29X[2XKernel[102X( [3Xphi[103X ) [32X operation156157[33X[0;0YThe following example also makes use of the natural transformation158[10XKernelEmb[110X.[133X159160[4X[32X Example [32X[104X161[4X[25Xgap>[125X [27XZZ := HomalgRingOfIntegers( );[127X[104X162[4X[28XZ[128X[104X163[4X[25Xgap>[125X [27XM := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );;[127X[104X164[4X[25Xgap>[125X [27XM := LeftPresentation( M );[127X[104X165[4X[28X<A non-torsion left module presented by 2 relations for 3 generators>[128X[104X166[4X[25Xgap>[125X [27XN := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7, 8, 9 ]", 2, 4, ZZ );;[127X[104X167[4X[25Xgap>[125X [27XN := LeftPresentation( N );[127X[104X168[4X[28X<A non-torsion left module presented by 2 relations for 4 generators>[128X[104X169[4X[25Xgap>[125X [27Xmat := HomalgMatrix( "[ \[127X[104X170[4X[25X>[125X [27X1, 0, -3, -6, \[127X[104X171[4X[25X>[125X [27X0, 1, 6, 11, \[127X[104X172[4X[25X>[125X [27X1, 0, -3, -6 \[127X[104X173[4X[25X>[125X [27X]", 3, 4, ZZ );;[127X[104X174[4X[25Xgap>[125X [27Xphi := HomalgMap( mat, M, N );;[127X[104X175[4X[25Xgap>[125X [27XIsMorphism( phi );[127X[104X176[4X[28Xtrue[128X[104X177[4X[25Xgap>[125X [27Xphi;[127X[104X178[4X[28X<A homomorphism of left modules>[128X[104X179[4X[25Xgap>[125X [27Xker := Kernel( phi );[127X[104X180[4X[28X<A cyclic left module presented by yet unknown relations for a cyclic generato\[128X[104X181[4X[28Xr>[128X[104X182[4X[25Xgap>[125X [27XDisplay( ker );[127X[104X183[4X[28XZ/< -3 >[128X[104X184[4X[25Xgap>[125X [27XByASmallerPresentation( last );[127X[104X185[4X[28X<A cyclic torsion left module presented by 1 relation for a cyclic generator>[128X[104X186[4X[25Xgap>[125X [27XDisplay( ker );[127X[104X187[4X[28XZ/< 3 >[128X[104X188[4X[25Xgap>[125X [27Xiota := KernelEmb( phi );[127X[104X189[4X[28X<A monomorphism of left modules>[128X[104X190[4X[25Xgap>[125X [27XDisplay( iota );[127X[104X191[4X[28X[ [ 0, 2, 4 ] ][128X[104X192[4X[28X[128X[104X193[4X[28Xthe map is currently represented by the above 1 x 3 matrix[128X[104X194[4X[25Xgap>[125X [27XDefectOfExactness( iota, phi );[127X[104X195[4X[28X<A zero left module>[128X[104X196[4X[25Xgap>[125X [27XByASmallerPresentation( iota );[127X[104X197[4X[28X<A non-zero monomorphism of left modules>[128X[104X198[4X[25Xgap>[125X [27XDisplay( iota );[127X[104X199[4X[28X[ [ 2, 0 ] ][128X[104X200[4X[28X[128X[104X201[4X[28Xthe map is currently represented by the above 1 x 2 matrix[128X[104X202[4X[25Xgap>[125X [27XPostInverse( iota );[127X[104X203[4X[28Xfail[128X[104X204[4X[32X[104X205206[1X10.4-6 DefectOfExactness[101X207208[29X[2XDefectOfExactness[102X( [3Xphi[103X, [3Xpsi[103X ) [32X operation209210[33X[0;0YWe follow the associative convention for applying maps. For left modules [3Xphi[103X211is applied first and from the right. For right modules [3Xpsi[103X is applied first212and from the left.[133X213214[33X[0;0YThe following example also makes use of the natural transformation215[10XKernelEmb[110X.[133X216217[4X[32X Example [32X[104X218[4X[25Xgap>[125X [27XZZ := HomalgRingOfIntegers( );[127X[104X219[4X[28XZ[128X[104X220[4X[25Xgap>[125X [27XM := HomalgMatrix( "[ 2, 3, 4, 0, 5, 6, 7, 0 ]", 2, 4, ZZ );;[127X[104X221[4X[25Xgap>[125X [27XM := LeftPresentation( M );[127X[104X222[4X[28X<A non-torsion left module presented by 2 relations for 4 generators>[128X[104X223[4X[25Xgap>[125X [27XN := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7, 8, 9 ]", 2, 4, ZZ );;[127X[104X224[4X[25Xgap>[125X [27XN := LeftPresentation( N );[127X[104X225[4X[28X<A non-torsion left module presented by 2 relations for 4 generators>[128X[104X226[4X[25Xgap>[125X [27Xmat := HomalgMatrix( "[ \[127X[104X227[4X[25X>[125X [27X1, 3, 3, 3, \[127X[104X228[4X[25X>[125X [27X0, 3, 10, 17, \[127X[104X229[4X[25X>[125X [27X1, 3, 3, 3, \[127X[104X230[4X[25X>[125X [27X0, 0, 0, 0 \[127X[104X231[4X[25X>[125X [27X]", 4, 4, ZZ );;[127X[104X232[4X[25Xgap>[125X [27Xphi := HomalgMap( mat, M, N );;[127X[104X233[4X[25Xgap>[125X [27XIsMorphism( phi );[127X[104X234[4X[28Xtrue[128X[104X235[4X[25Xgap>[125X [27Xphi;[127X[104X236[4X[28X<A homomorphism of left modules>[128X[104X237[4X[25Xgap>[125X [27Xiota := KernelEmb( phi );[127X[104X238[4X[28X<A monomorphism of left modules>[128X[104X239[4X[25Xgap>[125X [27XDefectOfExactness( iota, phi );[127X[104X240[4X[28X<A zero left module>[128X[104X241[4X[25Xgap>[125X [27Xhom_iota := Hom( iota ); ## a shorthand for Hom( iota, ZZ );[127X[104X242[4X[28X<A homomorphism of right modules>[128X[104X243[4X[25Xgap>[125X [27Xhom_phi := Hom( phi ); ## a shorthand for Hom( phi, ZZ );[127X[104X244[4X[28X<A homomorphism of right modules>[128X[104X245[4X[25Xgap>[125X [27XDefectOfExactness( hom_iota, hom_phi );[127X[104X246[4X[28X<A cyclic right module on a cyclic generator satisfying yet unknown relations>[128X[104X247[4X[25Xgap>[125X [27XByASmallerPresentation( last );[127X[104X248[4X[28X<A cyclic torsion right module on a cyclic generator satisfying 1 relation>[128X[104X249[4X[25Xgap>[125X [27XDisplay( last );[127X[104X250[4X[28XZ/< 2 >[128X[104X251[4X[32X[104X252253[1X10.4-7 Functor_Hom[101X254255[29X[2XFunctor_Hom[102X[32X global variable256257[33X[0;0YThe bifunctor [10XHom[110X.[133X258259[4X[32X Code [32X[104X260[4XInstallValue( Functor_Hom_for_fp_modules,[104X261[4X CreateHomalgFunctor([104X262[4X [ "name", "Hom" ],[104X263[4X [ "category", HOMALG_MODULES.category ],[104X264[4X [ "operation", "Hom" ],[104X265[4X [ "number_of_arguments", 2 ],[104X266[4X [ "1", [ [ "contravariant", "right adjoint", "distinguished" ] ] ],[104X267[4X [ "2", [ [ "covariant", "left exact" ] ] ],[104X268[4X [ "OnObjects", _Functor_Hom_OnModules ],[104X269[4X [ "OnMorphisms", _Functor_Hom_OnMaps ],[104X270[4X [ "MorphismConstructor", HOMALG_MODULES.category.MorphismConstructor ][104X271[4X )[104X272[4X );[104X273[4X[32X[104X274275[1X10.4-8 Hom[101X276277[29X[2XHom[102X( [3Xo1[103X, [3Xo2[103X ) [32X operation278279[33X[0;0Y[3Xo1[103X resp. [3Xo2[103X could be a module, a map, a complex (of modules or of again of280complexes), or a chain morphism.[133X281282[33X[0;0YEach generator of a module of homomorphisms is displayed as a matrix of283appropriate dimensions.[133X284285[4X[32X Example [32X[104X286[4X[25Xgap>[125X [27XZZ := HomalgRingOfIntegers( );[127X[104X287[4X[28XZ[128X[104X288[4X[25Xgap>[125X [27XM := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );;[127X[104X289[4X[25Xgap>[125X [27XM := LeftPresentation( M );[127X[104X290[4X[28X<A non-torsion left module presented by 2 relations for 3 generators>[128X[104X291[4X[25Xgap>[125X [27XN := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7, 8, 9 ]", 2, 4, ZZ );;[127X[104X292[4X[25Xgap>[125X [27XN := LeftPresentation( N );[127X[104X293[4X[28X<A non-torsion left module presented by 2 relations for 4 generators>[128X[104X294[4X[25Xgap>[125X [27Xmat := HomalgMatrix( "[ \[127X[104X295[4X[25X>[125X [27X1, 0, -3, -6, \[127X[104X296[4X[25X>[125X [27X0, 1, 6, 11, \[127X[104X297[4X[25X>[125X [27X1, 0, -3, -6 \[127X[104X298[4X[25X>[125X [27X]", 3, 4, ZZ );;[127X[104X299[4X[25Xgap>[125X [27Xphi := HomalgMap( mat, M, N );;[127X[104X300[4X[25Xgap>[125X [27XIsMorphism( phi );[127X[104X301[4X[28Xtrue[128X[104X302[4X[25Xgap>[125X [27Xphi;[127X[104X303[4X[28X<A homomorphism of left modules>[128X[104X304[4X[25Xgap>[125X [27Xpsi := Hom( phi, M );[127X[104X305[4X[28X<A homomorphism of right modules>[128X[104X306[4X[25Xgap>[125X [27XByASmallerPresentation( psi );[127X[104X307[4X[28X<A non-zero homomorphism of right modules>[128X[104X308[4X[25Xgap>[125X [27XDisplay( psi );[127X[104X309[4X[28X[ [ 1, 1, 0, 1 ],[128X[104X310[4X[28X [ 2, 2, 0, 0 ],[128X[104X311[4X[28X [ 0, 0, 6, 10 ] ][128X[104X312[4X[28X[128X[104X313[4X[28Xthe map is currently represented by the above 3 x 4 matrix[128X[104X314[4X[25Xgap>[125X [27XhomNM := Source( psi );[127X[104X315[4X[28X<A rank 2 right module on 4 generators satisfying 2 relations>[128X[104X316[4X[25Xgap>[125X [27XIsIdenticalObj( homNM, Hom( N, M ) ); ## the caching at work[127X[104X317[4X[28Xtrue[128X[104X318[4X[25Xgap>[125X [27XhomMM := Range( psi );[127X[104X319[4X[28X<A rank 1 right module on 3 generators satisfying 2 relations>[128X[104X320[4X[25Xgap>[125X [27XIsIdenticalObj( homMM, Hom( M, M ) ); ## the caching at work[127X[104X321[4X[28Xtrue[128X[104X322[4X[25Xgap>[125X [27XDisplay( homNM );[127X[104X323[4X[28XZ/< 3 > + Z/< 3 > + Z^(2 x 1)[128X[104X324[4X[25Xgap>[125X [27XDisplay( homMM );[127X[104X325[4X[28XZ/< 3 > + Z/< 3 > + Z^(1 x 1)[128X[104X326[4X[25Xgap>[125X [27XIsMonomorphism( psi );[127X[104X327[4X[28Xfalse[128X[104X328[4X[25Xgap>[125X [27XIsEpimorphism( psi );[127X[104X329[4X[28Xfalse[128X[104X330[4X[25Xgap>[125X [27XGeneratorsOfModule( homMM );[127X[104X331[4X[28X<A set of 3 generators of a homalg right module>[128X[104X332[4X[25Xgap>[125X [27XDisplay( last );[127X[104X333[4X[28X[ [ 0, 0, 0 ],[128X[104X334[4X[28X [ 0, 1, 2 ],[128X[104X335[4X[28X [ 0, 0, 0 ] ][128X[104X336[4X[28X[128X[104X337[4X[28Xthe map is currently represented by the above 3 x 3 matrix[128X[104X338[4X[28X[128X[104X339[4X[28X[ [ 0, 2, 4 ],[128X[104X340[4X[28X [ 0, 0, 0 ],[128X[104X341[4X[28X [ 0, 2, 4 ] ][128X[104X342[4X[28X[128X[104X343[4X[28Xthe map is currently represented by the above 3 x 3 matrix[128X[104X344[4X[28X[128X[104X345[4X[28X[ [ 0, 1, 3 ],[128X[104X346[4X[28X [ 0, 0, -2 ],[128X[104X347[4X[28X [ 0, 1, 3 ] ][128X[104X348[4X[28X[128X[104X349[4X[28Xthe map is currently represented by the above 3 x 3 matrix[128X[104X350[4X[28X[128X[104X351[4X[28Xa set of 3 generators given by the the above matrices[128X[104X352[4X[25Xgap>[125X [27XGeneratorsOfModule( homNM );[127X[104X353[4X[28X<A set of 4 generators of a homalg right module>[128X[104X354[4X[25Xgap>[125X [27XDisplay( last );[127X[104X355[4X[28X[ [ 0, 1, 2 ],[128X[104X356[4X[28X [ 0, 1, 2 ],[128X[104X357[4X[28X [ 0, 1, 2 ],[128X[104X358[4X[28X [ 0, 0, 0 ] ][128X[104X359[4X[28X[128X[104X360[4X[28Xthe map is currently represented by the above 4 x 3 matrix[128X[104X361[4X[28X[128X[104X362[4X[28X[ [ 0, 1, 2 ],[128X[104X363[4X[28X [ 0, 0, 0 ],[128X[104X364[4X[28X [ 0, 0, 0 ],[128X[104X365[4X[28X [ 0, 2, 4 ] ][128X[104X366[4X[28X[128X[104X367[4X[28Xthe map is currently represented by the above 4 x 3 matrix[128X[104X368[4X[28X[128X[104X369[4X[28X[ [ 0, 0, -3 ],[128X[104X370[4X[28X [ 0, 0, 7 ],[128X[104X371[4X[28X [ 0, 0, -5 ],[128X[104X372[4X[28X [ 0, 0, 1 ] ][128X[104X373[4X[28X[128X[104X374[4X[28Xthe map is currently represented by the above 4 x 3 matrix[128X[104X375[4X[28X[128X[104X376[4X[28X[ [ 0, 1, -3 ],[128X[104X377[4X[28X [ 0, 0, 12 ],[128X[104X378[4X[28X [ 0, 0, -9 ],[128X[104X379[4X[28X [ 0, 2, 6 ] ][128X[104X380[4X[28X[128X[104X381[4X[28Xthe map is currently represented by the above 4 x 3 matrix[128X[104X382[4X[28X[128X[104X383[4X[28Xa set of 4 generators given by the the above matrices[128X[104X384[4X[32X[104X385386[33X[0;0YIf for example the source [22XN[122X gets a new presentation, you will see the effect387on the generators:[133X388389[4X[32X Example [32X[104X390[4X[25Xgap>[125X [27XByASmallerPresentation( N );[127X[104X391[4X[28X<A rank 2 left module presented by 1 relation for 3 generators>[128X[104X392[4X[25Xgap>[125X [27XGeneratorsOfModule( homNM );[127X[104X393[4X[28X<A set of 4 generators of a homalg right module>[128X[104X394[4X[25Xgap>[125X [27XDisplay( last );[127X[104X395[4X[28X[ [ 0, 3, 6 ],[128X[104X396[4X[28X [ 0, 1, 2 ],[128X[104X397[4X[28X [ 0, 0, 0 ] ][128X[104X398[4X[28X[128X[104X399[4X[28Xthe map is currently represented by the above 3 x 3 matrix[128X[104X400[4X[28X[128X[104X401[4X[28X[ [ 0, 9, 18 ],[128X[104X402[4X[28X [ 0, 0, 0 ],[128X[104X403[4X[28X [ 0, 2, 4 ] ][128X[104X404[4X[28X[128X[104X405[4X[28Xthe map is currently represented by the above 3 x 3 matrix[128X[104X406[4X[28X[128X[104X407[4X[28X[ [ 0, 0, 0 ],[128X[104X408[4X[28X [ 0, 0, -5 ],[128X[104X409[4X[28X [ 0, 0, 1 ] ][128X[104X410[4X[28X[128X[104X411[4X[28Xthe map is currently represented by the above 3 x 3 matrix[128X[104X412[4X[28X[128X[104X413[4X[28X[ [ 0, 9, 18 ],[128X[104X414[4X[28X [ 0, 0, -9 ],[128X[104X415[4X[28X [ 0, 2, 6 ] ][128X[104X416[4X[28X[128X[104X417[4X[28Xthe map is currently represented by the above 3 x 3 matrix[128X[104X418[4X[28X[128X[104X419[4X[28Xa set of 4 generators given by the the above matrices[128X[104X420[4X[32X[104X421422[33X[0;0YNow we compute a certain natural filtration on [10XHom[110X[22X(M,M)[122X:[133X423424[4X[32X Example [32X[104X425[4X[25Xgap>[125X [27XdM := Resolution( M );[127X[104X426[4X[28X<A non-zero right acyclic complex containing a single morphism of left modules\[128X[104X427[4X[28X at degrees [ 0 .. 1 ]>[128X[104X428[4X[25Xgap>[125X [27XhMM := Hom( dM, dM );[127X[104X429[4X[28X<A non-zero acyclic cocomplex containing a single morphism of right complexes \[128X[104X430[4X[28Xat degrees [ 0 .. 1 ]>[128X[104X431[4X[25Xgap>[125X [27XBMM := HomalgBicomplex( hMM );[127X[104X432[4X[28X<A non-zero bicocomplex containing right modules at bidegrees [ 0 .. 1 ]x[128X[104X433[4X[28X[ -1 .. 0 ]>[128X[104X434[4X[25Xgap>[125X [27XII_E := SecondSpectralSequenceWithFiltration( BMM );[127X[104X435[4X[28X<A stable cohomological spectral sequence with sheets at levels [128X[104X436[4X[28X[ 0 .. 2 ] each consisting of right modules at bidegrees [ -1 .. 0 ]x[128X[104X437[4X[28X[ 0 .. 1 ]>[128X[104X438[4X[25Xgap>[125X [27XDisplay( II_E );[127X[104X439[4X[28XThe associated transposed spectral sequence:[128X[104X440[4X[28X[128X[104X441[4X[28Xa cohomological spectral sequence at bidegrees[128X[104X442[4X[28X[ [ 0 .. 1 ], [ -1 .. 0 ] ][128X[104X443[4X[28X---------[128X[104X444[4X[28XLevel 0:[128X[104X445[4X[28X[128X[104X446[4X[28X * *[128X[104X447[4X[28X * *[128X[104X448[4X[28X---------[128X[104X449[4X[28XLevel 1:[128X[104X450[4X[28X[128X[104X451[4X[28X * *[128X[104X452[4X[28X . .[128X[104X453[4X[28X---------[128X[104X454[4X[28XLevel 2:[128X[104X455[4X[28X[128X[104X456[4X[28X s s[128X[104X457[4X[28X . .[128X[104X458[4X[28X[128X[104X459[4X[28XNow the spectral sequence of the bicomplex:[128X[104X460[4X[28X[128X[104X461[4X[28Xa cohomological spectral sequence at bidegrees[128X[104X462[4X[28X[ [ -1 .. 0 ], [ 0 .. 1 ] ][128X[104X463[4X[28X---------[128X[104X464[4X[28XLevel 0:[128X[104X465[4X[28X[128X[104X466[4X[28X * *[128X[104X467[4X[28X * *[128X[104X468[4X[28X---------[128X[104X469[4X[28XLevel 1:[128X[104X470[4X[28X[128X[104X471[4X[28X * *[128X[104X472[4X[28X * *[128X[104X473[4X[28X---------[128X[104X474[4X[28XLevel 2:[128X[104X475[4X[28X[128X[104X476[4X[28X s s[128X[104X477[4X[28X . s[128X[104X478[4X[25Xgap>[125X [27Xfilt := FiltrationBySpectralSequence( II_E );[127X[104X479[4X[28X<A descending filtration with degrees [ -1 .. 0 ] and graded parts:[128X[104X480[4X[28X [128X[104X481[4X[28X-1: <A non-zero cyclic torsion right module on a cyclic generator satisfying[128X[104X482[4X[28X yet unknown relations>[128X[104X483[4X[28X 0: <A rank 1 right module on 3 generators satisfying 2 relations>[128X[104X484[4X[28Xof[128X[104X485[4X[28X<A right module on 4 generators satisfying yet unknown relations>>[128X[104X486[4X[25Xgap>[125X [27XByASmallerPresentation( filt );[127X[104X487[4X[28X<A descending filtration with degrees [ -1 .. 0 ] and graded parts:[128X[104X488[4X[28X [128X[104X489[4X[28X-1: <A non-zero cyclic torsion right module on a cyclic generator satisfying 1\[128X[104X490[4X[28X relation>[128X[104X491[4X[28X 0: <A rank 1 right module on 2 generators satisfying 1 relation>[128X[104X492[4X[28Xof[128X[104X493[4X[28X<A rank 1 right module on 3 generators satisfying 2 relations>>[128X[104X494[4X[25Xgap>[125X [27XDisplay( filt );[127X[104X495[4X[28XDegree -1:[128X[104X496[4X[28X[128X[104X497[4X[28XZ/< 3 >[128X[104X498[4X[28X----------[128X[104X499[4X[28XDegree 0:[128X[104X500[4X[28X[128X[104X501[4X[28XZ/< 3 > + Z^(1 x 1)[128X[104X502[4X[25Xgap>[125X [27XDisplay( homMM );[127X[104X503[4X[28XZ/< 3 > + Z/< 3 > + Z^(1 x 1)[128X[104X504[4X[32X[104X505506[1X10.4-9 Functor_TensorProduct[101X507508[29X[2XFunctor_TensorProduct[102X[32X global variable509510[33X[0;0YThe tensor product bifunctor.[133X511512[4X[32X Code [32X[104X513[4XInstallValue( Functor_TensorProduct_for_fp_modules,[104X514[4X CreateHomalgFunctor([104X515[4X [ "name", "TensorProduct" ],[104X516[4X [ "category", HOMALG_MODULES.category ],[104X517[4X [ "operation", "TensorProductOp" ],[104X518[4X [ "number_of_arguments", 2 ],[104X519[4X [ "1", [ [ "covariant", "left adjoint", "distinguished" ] ] ],[104X520[4X [ "2", [ [ "covariant", "left adjoint" ] ] ],[104X521[4X [ "OnObjects", _Functor_TensorProduct_OnModules ],[104X522[4X [ "OnMorphisms", _Functor_TensorProduct_OnMaps ],[104X523[4X [ "MorphismConstructor", HOMALG_MODULES.category.MorphismConstructor ][104X524[4X )[104X525[4X );[104X526[4X[32X[104X527528[1X10.4-10 TensorProduct[101X529530[29X[2XTensorProduct[102X( [3Xo1[103X, [3Xo2[103X ) [32X operation531[29X[2X\*[102X( [3Xo1[103X, [3Xo2[103X ) [32X operation532533[33X[0;0Y[3Xo1[103X resp. [3Xo2[103X could be a module, a map, a complex (of modules or of again of534complexes), or a chain morphism.[133X535536[33X[0;0YThe symbol [10X*[110X is a shorthand for several operations associated with the537functor [10XFunctor_TensorProduct_for_fp_modules[110X installed under the name538[10XTensorProduct[110X.[133X539540[4X[32X Example [32X[104X541[4X[25Xgap>[125X [27XZZ := HomalgRingOfIntegers( );[127X[104X542[4X[28XZ[128X[104X543[4X[25Xgap>[125X [27XM := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );[127X[104X544[4X[28X<A 2 x 3 matrix over an internal ring>[128X[104X545[4X[25Xgap>[125X [27XM := LeftPresentation( M );[127X[104X546[4X[28X<A non-torsion left module presented by 2 relations for 3 generators>[128X[104X547[4X[25Xgap>[125X [27XN := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7, 8, 9 ]", 2, 4, ZZ );[127X[104X548[4X[28X<A 2 x 4 matrix over an internal ring>[128X[104X549[4X[25Xgap>[125X [27XN := LeftPresentation( N );[127X[104X550[4X[28X<A non-torsion left module presented by 2 relations for 4 generators>[128X[104X551[4X[25Xgap>[125X [27Xmat := HomalgMatrix( "[ \[127X[104X552[4X[25X>[125X [27X1, 0, -3, -6, \[127X[104X553[4X[25X>[125X [27X0, 1, 6, 11, \[127X[104X554[4X[25X>[125X [27X1, 0, -3, -6 \[127X[104X555[4X[25X>[125X [27X]", 3, 4, ZZ );[127X[104X556[4X[28X<A 3 x 4 matrix over an internal ring>[128X[104X557[4X[25Xgap>[125X [27Xphi := HomalgMap( mat, M, N );[127X[104X558[4X[28X<A "homomorphism" of left modules>[128X[104X559[4X[25Xgap>[125X [27XIsMorphism( phi );[127X[104X560[4X[28Xtrue[128X[104X561[4X[25Xgap>[125X [27Xphi;[127X[104X562[4X[28X<A homomorphism of left modules>[128X[104X563[4X[25Xgap>[125X [27XL := Hom( ZZ, M );[127X[104X564[4X[28X<A rank 1 right module on 3 generators satisfying yet unknown relations>[128X[104X565[4X[25Xgap>[125X [27XByASmallerPresentation( L );[127X[104X566[4X[28X<A rank 1 right module on 2 generators satisfying 1 relation>[128X[104X567[4X[25Xgap>[125X [27XDisplay( L );[127X[104X568[4X[28XZ/< 3 > + Z^(1 x 1)[128X[104X569[4X[25Xgap>[125X [27XL;[127X[104X570[4X[28X<A rank 1 right module on 2 generators satisfying 1 relation>[128X[104X571[4X[25Xgap>[125X [27Xpsi := phi * L;[127X[104X572[4X[28X<A homomorphism of right modules>[128X[104X573[4X[25Xgap>[125X [27XByASmallerPresentation( psi );[127X[104X574[4X[28X<A non-zero homomorphism of right modules>[128X[104X575[4X[25Xgap>[125X [27XDisplay( psi );[127X[104X576[4X[28X[ [ 0, 0, 1, 1 ],[128X[104X577[4X[28X [ 0, 0, 8, 1 ],[128X[104X578[4X[28X [ 0, 0, 0, -2 ],[128X[104X579[4X[28X [ 0, 0, 0, 2 ] ][128X[104X580[4X[28X[128X[104X581[4X[28Xthe map is currently represented by the above 4 x 4 matrix[128X[104X582[4X[25Xgap>[125X [27XML := Source( psi );[127X[104X583[4X[28X<A rank 1 right module on 4 generators satisfying 3 relations>[128X[104X584[4X[25Xgap>[125X [27XIsIdenticalObj( ML, M * L ); ## the caching at work[127X[104X585[4X[28Xtrue[128X[104X586[4X[25Xgap>[125X [27XNL := Range( psi );[127X[104X587[4X[28X<A rank 2 right module on 4 generators satisfying 2 relations>[128X[104X588[4X[25Xgap>[125X [27XIsIdenticalObj( NL, N * L ); ## the caching at work[127X[104X589[4X[28Xtrue[128X[104X590[4X[25Xgap>[125X [27XDisplay( ML );[127X[104X591[4X[28XZ/< 3 > + Z/< 3 > + Z/< 3 > + Z^(1 x 1)[128X[104X592[4X[25Xgap>[125X [27XDisplay( NL );[127X[104X593[4X[28XZ/< 3 > + Z/< 12 > + Z^(2 x 1)[128X[104X594[4X[32X[104X595596[33X[0;0YNow we compute a certain natural filtration on the tensor product [22XM[122X[10X*[110X[22XL[122X:[133X597598[4X[32X Example [32X[104X599[4X[25Xgap>[125X [27XP := Resolution( M );[127X[104X600[4X[28X<A non-zero right acyclic complex containing a single morphism of left modules\[128X[104X601[4X[28X at degrees [ 0 .. 1 ]>[128X[104X602[4X[25Xgap>[125X [27XGP := Hom( P );[127X[104X603[4X[28X<A non-zero acyclic cocomplex containing a single morphism of right modules at\[128X[104X604[4X[28X degrees [ 0 .. 1 ]>[128X[104X605[4X[25Xgap>[125X [27XCE := Resolution( GP );[127X[104X606[4X[28X<An acyclic cocomplex containing a single morphism of right complexes at degre\[128X[104X607[4X[28Xes [ 0 .. 1 ]>[128X[104X608[4X[25Xgap>[125X [27XFCE := Hom( CE, L );[127X[104X609[4X[28X<A non-zero acyclic complex containing a single morphism of left cocomplexes a\[128X[104X610[4X[28Xt degrees [ 0 .. 1 ]>[128X[104X611[4X[25Xgap>[125X [27XBC := HomalgBicomplex( FCE );[127X[104X612[4X[28X<A non-zero bicomplex containing left modules at bidegrees [ 0 .. 1 ]x[128X[104X613[4X[28X[ -1 .. 0 ]>[128X[104X614[4X[25Xgap>[125X [27XII_E := SecondSpectralSequenceWithFiltration( BC );[127X[104X615[4X[28X<A stable homological spectral sequence with sheets at levels [128X[104X616[4X[28X[ 0 .. 2 ] each consisting of left modules at bidegrees [ -1 .. 0 ]x[128X[104X617[4X[28X[ 0 .. 1 ]>[128X[104X618[4X[25Xgap>[125X [27XDisplay( II_E );[127X[104X619[4X[28XThe associated transposed spectral sequence:[128X[104X620[4X[28X[128X[104X621[4X[28Xa homological spectral sequence at bidegrees[128X[104X622[4X[28X[ [ 0 .. 1 ], [ -1 .. 0 ] ][128X[104X623[4X[28X---------[128X[104X624[4X[28XLevel 0:[128X[104X625[4X[28X[128X[104X626[4X[28X * *[128X[104X627[4X[28X * *[128X[104X628[4X[28X---------[128X[104X629[4X[28XLevel 1:[128X[104X630[4X[28X[128X[104X631[4X[28X * *[128X[104X632[4X[28X . .[128X[104X633[4X[28X---------[128X[104X634[4X[28XLevel 2:[128X[104X635[4X[28X[128X[104X636[4X[28X s s[128X[104X637[4X[28X . .[128X[104X638[4X[28X[128X[104X639[4X[28XNow the spectral sequence of the bicomplex:[128X[104X640[4X[28X[128X[104X641[4X[28Xa homological spectral sequence at bidegrees[128X[104X642[4X[28X[ [ -1 .. 0 ], [ 0 .. 1 ] ][128X[104X643[4X[28X---------[128X[104X644[4X[28XLevel 0:[128X[104X645[4X[28X[128X[104X646[4X[28X * *[128X[104X647[4X[28X * *[128X[104X648[4X[28X---------[128X[104X649[4X[28XLevel 1:[128X[104X650[4X[28X[128X[104X651[4X[28X * *[128X[104X652[4X[28X . s[128X[104X653[4X[28X---------[128X[104X654[4X[28XLevel 2:[128X[104X655[4X[28X[128X[104X656[4X[28X s s[128X[104X657[4X[28X . s[128X[104X658[4X[25Xgap>[125X [27Xfilt := FiltrationBySpectralSequence( II_E );[127X[104X659[4X[28X<An ascending filtration with degrees [ -1 .. 0 ] and graded parts:[128X[104X660[4X[28X 0: <A rank 1 left module presented by 1 relation for 2 generators>[128X[104X661[4X[28X -1: <A non-zero left module presented by 2 relations for 2 generators>[128X[104X662[4X[28Xof[128X[104X663[4X[28X<A non-zero left module presented by 10 relations for 6 generators>>[128X[104X664[4X[25Xgap>[125X [27XByASmallerPresentation( filt );[127X[104X665[4X[28X<An ascending filtration with degrees [ -1 .. 0 ] and graded parts:[128X[104X666[4X[28X 0: <A rank 1 left module presented by 1 relation for 2 generators>[128X[104X667[4X[28X -1: <A non-zero torsion left module presented by 2 relations[128X[104X668[4X[28X for 2 generators>[128X[104X669[4X[28Xof[128X[104X670[4X[28X<A rank 1 left module presented by 3 relations for 4 generators>>[128X[104X671[4X[25Xgap>[125X [27XDisplay( filt );[127X[104X672[4X[28XDegree 0:[128X[104X673[4X[28X[128X[104X674[4X[28XZ/< 3 > + Z^(1 x 1)[128X[104X675[4X[28X----------[128X[104X676[4X[28XDegree -1:[128X[104X677[4X[28X[128X[104X678[4X[28XZ/< 3 > + Z/< 3 >[128X[104X679[4X[25Xgap>[125X [27XDisplay( ML );[127X[104X680[4X[28XZ/< 3 > + Z/< 3 > + Z/< 3 > + Z^(1 x 1)[128X[104X681[4X[32X[104X682683[1X10.4-11 Functor_Ext[101X684685[29X[2XFunctor_Ext[102X[32X global variable686687[33X[0;0YThe bifunctor [10XExt[110X.[133X688689[33X[0;0YBelow is the only [13Xspecific[113X line of code used to define690[10XFunctor_Ext_for_fp_modules[110X and all the different operations [10XExt[110X in [5Xhomalg[105X.[133X691692[4X[32X Code [32X[104X693[4XRightSatelliteOfCofunctor( Functor_Hom_for_fp_modules, "Ext" );[104X694[4X[32X[104X695696[1X10.4-12 Ext[101X697698[29X[2XExt[102X( [[3Xc[103X, ][3Xo1[103X, [3Xo2[103X[, [3Xstr[103X] ) [32X operation699700[33X[0;0YCompute the [3Xc[103X-th extension object of [3Xo1[103X with [3Xo2[103X where [3Xc[103X is a nonnegative701integer and [3Xo1[103X resp. [3Xo2[103X could be a module, a map, a complex (of modules or702of again of complexes), or a chain morphism. If [3Xstr[103X=[21Xa[121X then the703(cohomologically) graded object [22XExt^i([122X[3Xo1[103X,[3Xo2[103X[22X)[122X for [22X0 ≤ i ≤[122X[3Xc[103X is computed. If704neither [3Xc[103X nor [3Xstr[103X is specified then the cohomologically graded object705[22XExt^i([122X[3Xo1[103X,[3Xo2[103X[22X)[122X for [22X0 ≤ i ≤ d[122X is computed, where [22Xd[122X is the length of the706internally computed free resolution of [3Xo1[103X.[133X707708[33X[0;0YEach generator of a module of extensions is displayed as a matrix of709appropriate dimensions.[133X710711[4X[32X Example [32X[104X712[4X[25Xgap>[125X [27XZZ := HomalgRingOfIntegers( );[127X[104X713[4X[28XZ[128X[104X714[4X[25Xgap>[125X [27XM := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );;[127X[104X715[4X[25Xgap>[125X [27XM := LeftPresentation( M );[127X[104X716[4X[28X<A non-torsion left module presented by 2 relations for 3 generators>[128X[104X717[4X[25Xgap>[125X [27XN := TorsionObject( M );[127X[104X718[4X[28X<A cyclic torsion left module presented by yet unknown relations for a cyclic \[128X[104X719[4X[28Xgenerator>[128X[104X720[4X[25Xgap>[125X [27Xiota := TorsionObjectEmb( M );[127X[104X721[4X[28X<A monomorphism of left modules>[128X[104X722[4X[25Xgap>[125X [27Xpsi := Ext( 1, iota, N );[127X[104X723[4X[28X<A homomorphism of right modules>[128X[104X724[4X[25Xgap>[125X [27XByASmallerPresentation( psi );[127X[104X725[4X[28X<A non-zero homomorphism of right modules>[128X[104X726[4X[25Xgap>[125X [27XDisplay( psi );[127X[104X727[4X[28X[ [ 2 ] ][128X[104X728[4X[28X[128X[104X729[4X[28Xthe map is currently represented by the above 1 x 1 matrix[128X[104X730[4X[25Xgap>[125X [27XextNN := Range( psi );[127X[104X731[4X[28X<A non-zero cyclic torsion right module on a cyclic generator satisfying 1 rel\[128X[104X732[4X[28Xation>[128X[104X733[4X[25Xgap>[125X [27XIsIdenticalObj( extNN, Ext( 1, N, N ) ); ## the caching at work[127X[104X734[4X[28Xtrue[128X[104X735[4X[25Xgap>[125X [27XextMN := Source( psi );[127X[104X736[4X[28X<A non-zero cyclic torsion right module on a cyclic generator satisfying 1 rel\[128X[104X737[4X[28Xation>[128X[104X738[4X[25Xgap>[125X [27XIsIdenticalObj( extMN, Ext( 1, M, N ) ); ## the caching at work[127X[104X739[4X[28Xtrue[128X[104X740[4X[25Xgap>[125X [27XDisplay( extNN );[127X[104X741[4X[28XZ/< 3 >[128X[104X742[4X[25Xgap>[125X [27XDisplay( extMN );[127X[104X743[4X[28XZ/< 3 >[128X[104X744[4X[32X[104X745746[1X10.4-13 Functor_Tor[101X747748[29X[2XFunctor_Tor[102X[32X global variable749750[33X[0;0YThe bifunctor [10XTor[110X.[133X751752[33X[0;0YBelow is the only [13Xspecific[113X line of code used to define753[10XFunctor_Tor_for_fp_modules[110X and all the different operations [10XTor[110X in [5Xhomalg[105X.[133X754755[4X[32X Code [32X[104X756[4XLeftSatelliteOfFunctor( Functor_TensorProduct_for_fp_modules, "Tor" );[104X757[4X[32X[104X758759[1X10.4-14 Tor[101X760761[29X[2XTor[102X( [[3Xc[103X, ][3Xo1[103X, [3Xo2[103X[, [3Xstr[103X] ) [32X operation762763[33X[0;0YCompute the [3Xc[103X-th torsion object of [3Xo1[103X with [3Xo2[103X where [3Xc[103X is a nonnegative764integer and [3Xo1[103X resp. [3Xo2[103X could be a module, a map, a complex (of modules or765of again of complexes), or a chain morphism. If [3Xstr[103X=[21Xa[121X then the766(cohomologically) graded object [22XTor_i([122X[3Xo1[103X,[3Xo2[103X[22X)[122X for [22X0 ≤ i ≤[122X[3Xc[103X is computed. If767neither [3Xc[103X nor [3Xstr[103X is specified then the cohomologically graded object768[22XTor_i([122X[3Xo1[103X,[3Xo2[103X[22X)[122X for [22X0 ≤ i ≤ d[122X is computed, where [22Xd[122X is the length of the769internally computed free resolution of [3Xo1[103X.[133X770771[4X[32X Example [32X[104X772[4X[25Xgap>[125X [27XZZ := HomalgRingOfIntegers( );[127X[104X773[4X[28XZ[128X[104X774[4X[25Xgap>[125X [27XM := HomalgMatrix( "[ 2, 3, 4, 5, 6, 7 ]", 2, 3, ZZ );;[127X[104X775[4X[25Xgap>[125X [27XM := LeftPresentation( M );[127X[104X776[4X[28X<A non-torsion left module presented by 2 relations for 3 generators>[128X[104X777[4X[25Xgap>[125X [27XN := TorsionObject( M );[127X[104X778[4X[28X<A cyclic torsion left module presented by yet unknown relations for a cyclic \[128X[104X779[4X[28Xgenerator>[128X[104X780[4X[25Xgap>[125X [27Xiota := TorsionObjectEmb( M );[127X[104X781[4X[28X<A monomorphism of left modules>[128X[104X782[4X[25Xgap>[125X [27Xpsi := Tor( 1, iota, N );[127X[104X783[4X[28X<A homomorphism of left modules>[128X[104X784[4X[25Xgap>[125X [27XByASmallerPresentation( psi );[127X[104X785[4X[28X<A non-zero homomorphism of left modules>[128X[104X786[4X[25Xgap>[125X [27XDisplay( psi );[127X[104X787[4X[28X[ [ 1 ] ][128X[104X788[4X[28X[128X[104X789[4X[28Xthe map is currently represented by the above 1 x 1 matrix[128X[104X790[4X[25Xgap>[125X [27XtorNN := Source( psi );[127X[104X791[4X[28X<A non-zero cyclic torsion left module presented by 1 relation for a cyclic ge\[128X[104X792[4X[28Xnerator>[128X[104X793[4X[25Xgap>[125X [27XIsIdenticalObj( torNN, Tor( 1, N, N ) ); ## the caching at work[127X[104X794[4X[28Xtrue[128X[104X795[4X[25Xgap>[125X [27XtorMN := Range( psi );[127X[104X796[4X[28X<A non-zero cyclic torsion left module presented by 1 relation for a cyclic ge\[128X[104X797[4X[28Xnerator>[128X[104X798[4X[25Xgap>[125X [27XIsIdenticalObj( torMN, Tor( 1, M, N ) ); ## the caching at work[127X[104X799[4X[28Xtrue[128X[104X800[4X[25Xgap>[125X [27XDisplay( torNN );[127X[104X801[4X[28XZ/< 3 >[128X[104X802[4X[25Xgap>[125X [27XDisplay( torMN );[127X[104X803[4X[28XZ/< 3 >[128X[104X804[4X[32X[104X805806[1X10.4-15 Functor_RHom[101X807808[29X[2XFunctor_RHom[102X[32X global variable809810[33X[0;0YThe bifunctor [10XRHom[110X.[133X811812[33X[0;0YBelow is the only [13Xspecific[113X line of code used to define813[10XFunctor_RHom_for_fp_modules[110X and all the different operations [10XRHom[110X in [5Xhomalg[105X.[133X814815[4X[32X Code [32X[104X816[4XRightDerivedCofunctor( Functor_Hom_for_fp_modules );[104X817[4X[32X[104X818819[1X10.4-16 RHom[101X820821[29X[2XRHom[102X( [[3Xc[103X, ][3Xo1[103X, [3Xo2[103X[, [3Xstr[103X] ) [32X operation822823[33X[0;0YCompute the [3Xc[103X-th extension object of [3Xo1[103X with [3Xo2[103X where [3Xc[103X is a nonnegative824integer and [3Xo1[103X resp. [3Xo2[103X could be a module, a map, a complex (of modules or825of again of complexes), or a chain morphism. The string [3Xstr[103X may take826different values:[133X827828[30X [33X[0;6YIf [3Xstr[103X=[21Xa[121X then [22XR^i Hom([122X[3Xo1[103X,[3Xo2[103X[22X)[122X for [22X0 ≤ i ≤[122X[3Xc[103X is computed.[133X829830[30X [33X[0;6YIf [3Xstr[103X=[21Xc[121X then the [3Xc[103X-th connecting homomorphism with respect to the831short exact sequence [3Xo1[103X is computed.[133X832833[30X [33X[0;6YIf [3Xstr[103X=[21Xt[121X then the exact triangle upto cohomological degree [3Xc[103X with834respect to the short exact sequence [3Xo1[103X is computed.[133X835836[33X[0;0YIf neither [3Xc[103X nor [3Xstr[103X is specified then the cohomologically graded object [22XR^i837Hom([122X[3Xo1[103X,[3Xo2[103X[22X)[122X for [22X0 ≤ i ≤ d[122X is computed, where [22Xd[122X is the length of the838internally computed free resolution of [3Xo1[103X.[133X839840[33X[0;0YEach generator of a module of derived homomorphisms is displayed as a matrix841of appropriate dimensions.[133X842843[4X[32X Example [32X[104X844[4X[25Xgap>[125X [27XZZ := HomalgRingOfIntegers( );[127X[104X845[4X[28XZ[128X[104X846[4X[25Xgap>[125X [27Xm := HomalgMatrix( [ [ 8, 0 ], [ 0, 2 ] ], ZZ );;[127X[104X847[4X[25Xgap>[125X [27XM := LeftPresentation( m );[127X[104X848[4X[28X<A left module presented by 2 relations for 2 generators>[128X[104X849[4X[25Xgap>[125X [27XDisplay( M );[127X[104X850[4X[28XZ/< 8 > + Z/< 2 >[128X[104X851[4X[25Xgap>[125X [27XM;[127X[104X852[4X[28X<A torsion left module presented by 2 relations for 2 generators>[128X[104X853[4X[25Xgap>[125X [27Xa := HomalgMatrix( [ [ 2, 0 ] ], ZZ );;[127X[104X854[4X[25Xgap>[125X [27Xalpha := HomalgMap( a, "free", M );[127X[104X855[4X[28X<A homomorphism of left modules>[128X[104X856[4X[25Xgap>[125X [27Xpi := CokernelEpi( alpha );[127X[104X857[4X[28X<An epimorphism of left modules>[128X[104X858[4X[25Xgap>[125X [27XDisplay( pi );[127X[104X859[4X[28X[ [ 1, 0 ],[128X[104X860[4X[28X [ 0, 1 ] ][128X[104X861[4X[28X[128X[104X862[4X[28Xthe map is currently represented by the above 2 x 2 matrix[128X[104X863[4X[25Xgap>[125X [27Xiota := KernelEmb( pi );[127X[104X864[4X[28X<A monomorphism of left modules>[128X[104X865[4X[25Xgap>[125X [27XDisplay( iota );[127X[104X866[4X[28X[ [ 2, 0 ] ][128X[104X867[4X[28X[128X[104X868[4X[28Xthe map is currently represented by the above 1 x 2 matrix[128X[104X869[4X[25Xgap>[125X [27XN := Kernel( pi );[127X[104X870[4X[28X<A cyclic torsion left module presented by yet unknown relations for a cyclic \[128X[104X871[4X[28Xgenerator>[128X[104X872[4X[25Xgap>[125X [27XDisplay( N );[127X[104X873[4X[28XZ/< 4 >[128X[104X874[4X[25Xgap>[125X [27XC := HomalgComplex( pi );[127X[104X875[4X[28X<A left acyclic complex containing a single morphism of left modules at degree\[128X[104X876[4X[28Xs [ 0 .. 1 ]>[128X[104X877[4X[25Xgap>[125X [27XAdd( C, iota );[127X[104X878[4X[25Xgap>[125X [27XByASmallerPresentation( C );[127X[104X879[4X[28X<A non-zero short exact sequence containing[128X[104X880[4X[28X2 morphisms of left modules at degrees [ 0 .. 2 ]>[128X[104X881[4X[25Xgap>[125X [27XDisplay( C );[127X[104X882[4X[28X-------------------------[128X[104X883[4X[28Xat homology degree: 2[128X[104X884[4X[28XZ/< 4 >[128X[104X885[4X[28X-------------------------[128X[104X886[4X[28X[ [ 0, 6 ] ][128X[104X887[4X[28X[128X[104X888[4X[28Xthe map is currently represented by the above 1 x 2 matrix[128X[104X889[4X[28X------------v------------[128X[104X890[4X[28Xat homology degree: 1[128X[104X891[4X[28XZ/< 2 > + Z/< 8 >[128X[104X892[4X[28X-------------------------[128X[104X893[4X[28X[ [ 0, 1 ],[128X[104X894[4X[28X [ 1, 1 ] ][128X[104X895[4X[28X[128X[104X896[4X[28Xthe map is currently represented by the above 2 x 2 matrix[128X[104X897[4X[28X------------v------------[128X[104X898[4X[28Xat homology degree: 0[128X[104X899[4X[28XZ/< 2 > + Z/< 2 >[128X[104X900[4X[28X-------------------------[128X[104X901[4X[25Xgap>[125X [27XT := RHom( C, N );[127X[104X902[4X[28X<An exact cotriangle containing 3 morphisms of right cocomplexes at degrees[128X[104X903[4X[28X[ 0, 1, 2, 0 ]>[128X[104X904[4X[25Xgap>[125X [27XByASmallerPresentation( T );[127X[104X905[4X[28X<A non-zero exact cotriangle containing[128X[104X906[4X[28X3 morphisms of right cocomplexes at degrees [ 0, 1, 2, 0 ]>[128X[104X907[4X[25Xgap>[125X [27XL := LongSequence( T );[127X[104X908[4X[28X<A cosequence containing 5 morphisms of right modules at degrees [ 0 .. 5 ]>[128X[104X909[4X[25Xgap>[125X [27XDisplay( L );[127X[104X910[4X[28X-------------------------[128X[104X911[4X[28Xat cohomology degree: 5[128X[104X912[4X[28XZ/< 4 >[128X[104X913[4X[28X------------^------------[128X[104X914[4X[28X[ [ 0, 3 ] ][128X[104X915[4X[28X[128X[104X916[4X[28Xthe map is currently represented by the above 1 x 2 matrix[128X[104X917[4X[28X-------------------------[128X[104X918[4X[28Xat cohomology degree: 4[128X[104X919[4X[28XZ/< 2 > + Z/< 4 >[128X[104X920[4X[28X------------^------------[128X[104X921[4X[28X[ [ 0, 1 ],[128X[104X922[4X[28X [ 0, 0 ] ][128X[104X923[4X[28X[128X[104X924[4X[28Xthe map is currently represented by the above 2 x 2 matrix[128X[104X925[4X[28X-------------------------[128X[104X926[4X[28Xat cohomology degree: 3[128X[104X927[4X[28XZ/< 2 > + Z/< 2 >[128X[104X928[4X[28X------------^------------[128X[104X929[4X[28X[ [ 1 ],[128X[104X930[4X[28X [ 0 ] ][128X[104X931[4X[28X[128X[104X932[4X[28Xthe map is currently represented by the above 2 x 1 matrix[128X[104X933[4X[28X-------------------------[128X[104X934[4X[28Xat cohomology degree: 2[128X[104X935[4X[28XZ/< 4 >[128X[104X936[4X[28X------------^------------[128X[104X937[4X[28X[ [ 0, 2 ] ][128X[104X938[4X[28X[128X[104X939[4X[28Xthe map is currently represented by the above 1 x 2 matrix[128X[104X940[4X[28X-------------------------[128X[104X941[4X[28Xat cohomology degree: 1[128X[104X942[4X[28XZ/< 2 > + Z/< 4 >[128X[104X943[4X[28X------------^------------[128X[104X944[4X[28X[ [ 0, 1 ],[128X[104X945[4X[28X [ 2, 0 ] ][128X[104X946[4X[28X[128X[104X947[4X[28Xthe map is currently represented by the above 2 x 2 matrix[128X[104X948[4X[28X-------------------------[128X[104X949[4X[28Xat cohomology degree: 0[128X[104X950[4X[28XZ/< 2 > + Z/< 2 >[128X[104X951[4X[28X-------------------------[128X[104X952[4X[25Xgap>[125X [27XIsExactSequence( L );[127X[104X953[4X[28Xtrue[128X[104X954[4X[25Xgap>[125X [27XL;[127X[104X955[4X[28X<An exact cosequence containing 5 morphisms of right modules at degrees[128X[104X956[4X[28X[ 0 .. 5 ]>[128X[104X957[4X[32X[104X958959[1X10.4-17 Functor_LTensorProduct[101X960961[29X[2XFunctor_LTensorProduct[102X[32X global variable962963[33X[0;0YThe bifunctor [10XLTensorProduct[110X.[133X964965[33X[0;0YBelow is the only [13Xspecific[113X line of code used to define966[10XFunctor_LTensorProduct_for_fp_modules[110X and all the different operations967[10XLTensorProduct[110X in [5Xhomalg[105X.[133X968969[4X[32X Code [32X[104X970[4XLeftDerivedFunctor( Functor_TensorProduct_for_fp_modules );[104X971[4X[32X[104X972973[1X10.4-18 LTensorProduct[101X974975[29X[2XLTensorProduct[102X( [[3Xc[103X, ][3Xo1[103X, [3Xo2[103X[, [3Xstr[103X] ) [32X operation976977[33X[0;0YCompute the [3Xc[103X-th torsion object of [3Xo1[103X with [3Xo2[103X where [3Xc[103X is a nonnegative978integer and [3Xo1[103X resp. [3Xo2[103X could be a module, a map, a complex (of modules or979of again of complexes), or a chain morphism. The string [3Xstr[103X may take980different values:[133X981982[30X [33X[0;6YIf [3Xstr[103X=[21Xa[121X then [22XL_i TensorProduct([122X[3Xo1[103X,[3Xo2[103X[22X)[122X for [22X0 ≤ i ≤[122X[3Xc[103X is computed.[133X983984[30X [33X[0;6YIf [3Xstr[103X=[21Xc[121X then the [3Xc[103X-th connecting homomorphism with respect to the985short exact sequence [3Xo1[103X is computed.[133X986987[30X [33X[0;6YIf [3Xstr[103X=[21Xt[121X then the exact triangle upto cohomological degree [3Xc[103X with988respect to the short exact sequence [3Xo1[103X is computed.[133X989990[33X[0;0YIf neither [3Xc[103X nor [3Xstr[103X is specified then the cohomologically graded object [22XL_i991TensorProduct([122X[3Xo1[103X,[3Xo2[103X[22X)[122X for [22X0 ≤ i ≤ d[122X is computed, where [22Xd[122X is the length of the992internally computed free resolution of [3Xo1[103X.[133X993994[33X[0;0YEach generator of a module of derived homomorphisms is displayed as a matrix995of appropriate dimensions.[133X996997[4X[32X Example [32X[104X998[4X[25Xgap>[125X [27XZZ := HomalgRingOfIntegers( );[127X[104X999[4X[28XZ[128X[104X1000[4X[25Xgap>[125X [27Xm := HomalgMatrix( [ [ 8, 0 ], [ 0, 2 ] ], ZZ );;[127X[104X1001[4X[25Xgap>[125X [27XM := LeftPresentation( m );[127X[104X1002[4X[28X<A left module presented by 2 relations for 2 generators>[128X[104X1003[4X[25Xgap>[125X [27XDisplay( M );[127X[104X1004[4X[28XZ/< 8 > + Z/< 2 >[128X[104X1005[4X[25Xgap>[125X [27XM;[127X[104X1006[4X[28X<A torsion left module presented by 2 relations for 2 generators>[128X[104X1007[4X[25Xgap>[125X [27Xa := HomalgMatrix( [ [ 2, 0 ] ], ZZ );;[127X[104X1008[4X[25Xgap>[125X [27Xalpha := HomalgMap( a, "free", M );[127X[104X1009[4X[28X<A homomorphism of left modules>[128X[104X1010[4X[25Xgap>[125X [27Xpi := CokernelEpi( alpha );[127X[104X1011[4X[28X<An epimorphism of left modules>[128X[104X1012[4X[25Xgap>[125X [27XDisplay( pi );[127X[104X1013[4X[28X[ [ 1, 0 ],[128X[104X1014[4X[28X [ 0, 1 ] ][128X[104X1015[4X[28X[128X[104X1016[4X[28Xthe map is currently represented by the above 2 x 2 matrix[128X[104X1017[4X[25Xgap>[125X [27Xiota := KernelEmb( pi );[127X[104X1018[4X[28X<A monomorphism of left modules>[128X[104X1019[4X[25Xgap>[125X [27XDisplay( iota );[127X[104X1020[4X[28X[ [ 2, 0 ] ][128X[104X1021[4X[28X[128X[104X1022[4X[28Xthe map is currently represented by the above 1 x 2 matrix[128X[104X1023[4X[25Xgap>[125X [27XN := Kernel( pi );[127X[104X1024[4X[28X<A cyclic torsion left module presented by yet unknown relations for a cyclic \[128X[104X1025[4X[28Xgenerator>[128X[104X1026[4X[25Xgap>[125X [27XDisplay( N );[127X[104X1027[4X[28XZ/< 4 >[128X[104X1028[4X[25Xgap>[125X [27XC := HomalgComplex( pi );[127X[104X1029[4X[28X<A left acyclic complex containing a single morphism of left modules at degree\[128X[104X1030[4X[28Xs [ 0 .. 1 ]>[128X[104X1031[4X[25Xgap>[125X [27XAdd( C, iota );[127X[104X1032[4X[25Xgap>[125X [27XByASmallerPresentation( C );[127X[104X1033[4X[28X<A non-zero short exact sequence containing[128X[104X1034[4X[28X2 morphisms of left modules at degrees [ 0 .. 2 ]>[128X[104X1035[4X[25Xgap>[125X [27XDisplay( C );[127X[104X1036[4X[28X-------------------------[128X[104X1037[4X[28Xat homology degree: 2[128X[104X1038[4X[28XZ/< 4 >[128X[104X1039[4X[28X-------------------------[128X[104X1040[4X[28X[ [ 0, 6 ] ][128X[104X1041[4X[28X[128X[104X1042[4X[28Xthe map is currently represented by the above 1 x 2 matrix[128X[104X1043[4X[28X------------v------------[128X[104X1044[4X[28Xat homology degree: 1[128X[104X1045[4X[28XZ/< 2 > + Z/< 8 >[128X[104X1046[4X[28X-------------------------[128X[104X1047[4X[28X[ [ 0, 1 ],[128X[104X1048[4X[28X [ 1, 1 ] ][128X[104X1049[4X[28X[128X[104X1050[4X[28Xthe map is currently represented by the above 2 x 2 matrix[128X[104X1051[4X[28X------------v------------[128X[104X1052[4X[28Xat homology degree: 0[128X[104X1053[4X[28XZ/< 2 > + Z/< 2 >[128X[104X1054[4X[28X-------------------------[128X[104X1055[4X[25Xgap>[125X [27XT := LTensorProduct( C, N );[127X[104X1056[4X[28X<An exact triangle containing 3 morphisms of left complexes at degrees[128X[104X1057[4X[28X[ 1, 2, 3, 1 ]>[128X[104X1058[4X[25Xgap>[125X [27XByASmallerPresentation( T );[127X[104X1059[4X[28X<A non-zero exact triangle containing[128X[104X1060[4X[28X3 morphisms of left complexes at degrees [ 1, 2, 3, 1 ]>[128X[104X1061[4X[25Xgap>[125X [27XL := LongSequence( T );[127X[104X1062[4X[28X<A sequence containing 5 morphisms of left modules at degrees [ 0 .. 5 ]>[128X[104X1063[4X[25Xgap>[125X [27XDisplay( L );[127X[104X1064[4X[28X-------------------------[128X[104X1065[4X[28Xat homology degree: 5[128X[104X1066[4X[28XZ/< 4 >[128X[104X1067[4X[28X-------------------------[128X[104X1068[4X[28X[ [ 1, 3 ] ][128X[104X1069[4X[28X[128X[104X1070[4X[28Xthe map is currently represented by the above 1 x 2 matrix[128X[104X1071[4X[28X------------v------------[128X[104X1072[4X[28Xat homology degree: 4[128X[104X1073[4X[28XZ/< 2 > + Z/< 4 >[128X[104X1074[4X[28X-------------------------[128X[104X1075[4X[28X[ [ 0, 1 ],[128X[104X1076[4X[28X [ 0, 1 ] ][128X[104X1077[4X[28X[128X[104X1078[4X[28Xthe map is currently represented by the above 2 x 2 matrix[128X[104X1079[4X[28X------------v------------[128X[104X1080[4X[28Xat homology degree: 3[128X[104X1081[4X[28XZ/< 2 > + Z/< 2 >[128X[104X1082[4X[28X-------------------------[128X[104X1083[4X[28X[ [ 2 ],[128X[104X1084[4X[28X [ 0 ] ][128X[104X1085[4X[28X[128X[104X1086[4X[28Xthe map is currently represented by the above 2 x 1 matrix[128X[104X1087[4X[28X------------v------------[128X[104X1088[4X[28Xat homology degree: 2[128X[104X1089[4X[28XZ/< 4 >[128X[104X1090[4X[28X-------------------------[128X[104X1091[4X[28X[ [ 0, 2 ] ][128X[104X1092[4X[28X[128X[104X1093[4X[28Xthe map is currently represented by the above 1 x 2 matrix[128X[104X1094[4X[28X------------v------------[128X[104X1095[4X[28Xat homology degree: 1[128X[104X1096[4X[28XZ/< 2 > + Z/< 4 >[128X[104X1097[4X[28X-------------------------[128X[104X1098[4X[28X[ [ 0, 1 ],[128X[104X1099[4X[28X [ 1, 1 ] ][128X[104X1100[4X[28X[128X[104X1101[4X[28Xthe map is currently represented by the above 2 x 2 matrix[128X[104X1102[4X[28X------------v------------[128X[104X1103[4X[28Xat homology degree: 0[128X[104X1104[4X[28XZ/< 2 > + Z/< 2 >[128X[104X1105[4X[28X-------------------------[128X[104X1106[4X[25Xgap>[125X [27XIsExactSequence( L );[127X[104X1107[4X[28Xtrue[128X[104X1108[4X[25Xgap>[125X [27XL;[127X[104X1109[4X[28X<An exact sequence containing 5 morphisms of left modules at degrees[128X[104X1110[4X[28X[ 0 .. 5 ]>[128X[104X1111[4X[32X[104X11121113[1X10.4-19 Functor_HomHom[101X11141115[29X[2XFunctor_HomHom[102X[32X global variable11161117[33X[0;0YThe bifunctor [10XHomHom[110X.[133X11181119[33X[0;0YBelow is the only [13Xspecific[113X line of code used to define1120[10XFunctor_HomHom_for_fp_modules[110X and all the different operations [10XHomHom[110X in1121[5Xhomalg[105X.[133X11221123[4X[32X Code [32X[104X1124[4XFunctor_Hom_for_fp_modules * Functor_Hom_for_fp_modules;[104X1125[4X[32X[104X11261127[1X10.4-20 Functor_LHomHom[101X11281129[29X[2XFunctor_LHomHom[102X[32X global variable11301131[33X[0;0YThe bifunctor [10XLHomHom[110X.[133X11321133[33X[0;0YBelow is the only [13Xspecific[113X line of code used to define1134[10XFunctor_LHomHom_for_fp_modules[110X and all the different operations [10XLHomHom[110X in1135[5Xhomalg[105X.[133X11361137[4X[32X Code [32X[104X1138[4XLeftDerivedFunctor( Functor_HomHom_for_fp_modules );[104X1139[4X[32X[104X114011411142[1X10.5 [33X[0;0YTool Functors[133X[101X114311441145[1X10.6 [33X[0;0YOther Functors[133X[101X114611471148[1X10.7 [33X[0;0YFunctors: Operations and Functions[133X[101X1149115011511152