GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
1[1X3 [33X[0;0YQuick Start[133X[101X23[33X[0;0YThis chapter should give you a quick guide to create your first example in4[5Xhomalg[105X.[133X567[1X3.1 [33X[0;0YWhy are all examples in this manual over ℤ or [22Xℤ/mℤ[122X[101X[1X?[133X[101X89[33X[0;0YAs the reader might notice, all examples in this manual will be either over10ℤ or over one of its residue class rings [22Xℤ/mℤ[122X. There are two reasons for11this. The first reason is that [5XGAP[105X does not natively support rings other12than ℤ in a [13Xsufficient[113X way (--> [14X1.1-2[114X).[133X1314[33X[0;0YThe second and more important reason is to underline the fact the all15effective homological constructions that are relevant for [5XModules[105X have only16as much to do with the Gröbnerbasis algorithm as they do with the Hermite17algorithm for the ring ℤ; both algorithms are used to effectively solve18inhomogeneous linear systems over the respective ring. And [5XModules[105X is19designed to use rings and matrices over these rings together with all their20operations as a black box. In other words: Because [5XModules[105X works for [22Xℤ[122X, it21works by its design for all other computable rings.[133X222324[1X3.2 [33X[0;0Y[10Xgap> ExamplesForHomalg();[110X[101X[1X[133X[101X2526[33X[0;0YTo quickly create a ring for use with [5XModules[105X enter[133X27[33X[0;0Y[10XExamplesForHomalg();[110X[133X28[33X[0;0Ywhich will load the package [5XExamplesForHomalg[105X (if installed) and provide a29step by step guide to create the ring. For the full core functionality you30need to install the packages [5Xhomalg[105X, [5XHomalgToCAS[105X, [5XIO_ForHomalg[105X,31[5XRingsForHomalg[105X, [5XGauss[105X, and [5XGaussForHomalg[105X. They are part of the [5Xhomalg[105X32project.[133X333435[1X3.3 [33X[0;0YA typical example[133X[101X363738[1X3.3-1 [33X[0;0YHomHom[133X[101X3940[33X[0;0YThe following example is taken from Section 2 of [BR06].[133X41[33X[0;0YThe computation takes place over the residue class ring [22XR=ℤ/2^8ℤ[122X using the42generic support for residue class rings provided by the subpackage43[5XResidueClassRingForHomalg[105X of the [5XMatricesForHomalg[105X package. For a native44support of the rings [22XR=ℤ/p^nℤ[122X use the [5XGaussForHomalg[105X package.[133X4546[33X[0;0YHere we compute the (infinite) long exact homology sequence of the covariant47functor [22XHom(Hom(-,ℤ/2^7ℤ),ℤ/2^4ℤ)[122X (and its left derived functors) applied to48the short exact sequence[133X49[33X[0;0Y[22X0 -> M_=ℤ/2^2ℤ --alpha_1--> M=ℤ/2^5ℤ --alpha_2--> _M=ℤ/2^3ℤ -> 0[122X.[133X5051[4X[32X Example [32X[104X52[4X[25Xgap>[125X [27XZZ := HomalgRingOfIntegers( );[127X[104X53[4X[28XZ[128X[104X54[4X[25Xgap>[125X [27XDisplay( ZZ );[127X[104X55[4X[28X<An internal ring>[128X[104X56[4X[25Xgap>[125X [27XR := ZZ / 2^8;[127X[104X57[4X[28XZ/( 256 )[128X[104X58[4X[25Xgap>[125X [27XDisplay( R );[127X[104X59[4X[28X<A residue class ring>[128X[104X60[4X[25Xgap>[125X [27XM := LeftPresentation( [ 2^5 ], R );[127X[104X61[4X[28X<A cyclic left module presented by 1 relation for a cyclic generator>[128X[104X62[4X[25Xgap>[125X [27XDisplay( M );[127X[104X63[4X[28XZ/( 256 )/< |[ 32 ]| >[128X[104X64[4X[25Xgap>[125X [27X_M := LeftPresentation( [ 2^3 ], R );[127X[104X65[4X[28X<A cyclic left module presented by 1 relation for a cyclic generator>[128X[104X66[4X[25Xgap>[125X [27XDisplay( _M );[127X[104X67[4X[28XZ/( 256 )/< |[ 8 ]| >[128X[104X68[4X[25Xgap>[125X [27Xalpha2 := HomalgMap( [ 1 ], M, _M );[127X[104X69[4X[28X<A "homomorphism" of left modules>[128X[104X70[4X[25Xgap>[125X [27XIsMorphism( alpha2 );[127X[104X71[4X[28Xtrue[128X[104X72[4X[25Xgap>[125X [27Xalpha2;[127X[104X73[4X[28X<A homomorphism of left modules>[128X[104X74[4X[25Xgap>[125X [27XDisplay( alpha2 );[127X[104X75[4X[28X[ [ 1 ] ][128X[104X76[4X[28X[128X[104X77[4X[28Xmodulo [ 256 ][128X[104X78[4X[28X[128X[104X79[4X[28Xthe map is currently represented by the above 1 x 1 matrix[128X[104X80[4X[25Xgap>[125X [27XM_ := Kernel( alpha2 );[127X[104X81[4X[28X<A cyclic left module presented by yet unknown relations for a cyclic generato\[128X[104X82[4X[28Xr>[128X[104X83[4X[25Xgap>[125X [27Xalpha1 := KernelEmb( alpha2 );[127X[104X84[4X[28X<A monomorphism of left modules>[128X[104X85[4X[25Xgap>[125X [27Xseq := HomalgComplex( alpha2 );[127X[104X86[4X[28X<An acyclic complex containing a single morphism of left modules at degrees [128X[104X87[4X[28X[ 0 .. 1 ]>[128X[104X88[4X[25Xgap>[125X [27XAdd( seq, alpha1 );[127X[104X89[4X[25Xgap>[125X [27Xseq;[127X[104X90[4X[28X<A sequence containing 2 morphisms of left modules at degrees [ 0 .. 2 ]>[128X[104X91[4X[25Xgap>[125X [27XIsShortExactSequence( seq );[127X[104X92[4X[28Xtrue[128X[104X93[4X[25Xgap>[125X [27Xseq;[127X[104X94[4X[28X<A short exact sequence containing 2 morphisms of left modules at degrees [128X[104X95[4X[28X[ 0 .. 2 ]>[128X[104X96[4X[25Xgap>[125X [27XDisplay( seq );[127X[104X97[4X[28X-------------------------[128X[104X98[4X[28Xat homology degree: 2[128X[104X99[4X[28XZ/( 256 )/< |[ 4 ]| > [128X[104X100[4X[28X-------------------------[128X[104X101[4X[28X[ [ 24 ] ][128X[104X102[4X[28X[128X[104X103[4X[28Xmodulo [ 256 ][128X[104X104[4X[28X[128X[104X105[4X[28Xthe map is currently represented by the above 1 x 1 matrix[128X[104X106[4X[28X------------v------------[128X[104X107[4X[28Xat homology degree: 1[128X[104X108[4X[28XZ/( 256 )/< |[ 32 ]| > [128X[104X109[4X[28X-------------------------[128X[104X110[4X[28X[ [ 1 ] ][128X[104X111[4X[28X[128X[104X112[4X[28Xmodulo [ 256 ][128X[104X113[4X[28X[128X[104X114[4X[28Xthe map is currently represented by the above 1 x 1 matrix[128X[104X115[4X[28X------------v------------[128X[104X116[4X[28Xat homology degree: 0[128X[104X117[4X[28XZ/( 256 )/< |[ 8 ]| > [128X[104X118[4X[28X-------------------------[128X[104X119[4X[25Xgap>[125X [27XK := LeftPresentation( [ 2^7 ], R );[127X[104X120[4X[28X<A cyclic left module presented by 1 relation for a cyclic generator>[128X[104X121[4X[25Xgap>[125X [27XL := RightPresentation( [ 2^4 ], R );[127X[104X122[4X[28X<A cyclic right module on a cyclic generator satisfying 1 relation>[128X[104X123[4X[25Xgap>[125X [27Xtriangle := LHomHom( 4, seq, K, L, "t" );[127X[104X124[4X[28X<An exact triangle containing 3 morphisms of left complexes at degrees [128X[104X125[4X[28X[ 1, 2, 3, 1 ]>[128X[104X126[4X[25Xgap>[125X [27Xlehs := LongSequence( triangle );[127X[104X127[4X[28X<A sequence containing 14 morphisms of left modules at degrees [ 0 .. 14 ]>[128X[104X128[4X[25Xgap>[125X [27XByASmallerPresentation( lehs );[127X[104X129[4X[28X<A non-zero sequence containing 14 morphisms of left modules at degrees [128X[104X130[4X[28X[ 0 .. 14 ]>[128X[104X131[4X[25Xgap>[125X [27XIsExactSequence( lehs );[127X[104X132[4X[28Xfalse[128X[104X133[4X[25Xgap>[125X [27Xlehs;[127X[104X134[4X[28X<A non-zero left acyclic complex containing [128X[104X135[4X[28X14 morphisms of left modules at degrees [ 0 .. 14 ]>[128X[104X136[4X[25Xgap>[125X [27XAssert( 0, IsLeftAcyclic( lehs ) );[127X[104X137[4X[25Xgap>[125X [27XDisplay( lehs );[127X[104X138[4X[28X-------------------------[128X[104X139[4X[28Xat homology degree: 14[128X[104X140[4X[28XZ/( 256 )/< |[ 4 ]| > [128X[104X141[4X[28X-------------------------[128X[104X142[4X[28X[ [ 4 ] ][128X[104X143[4X[28X[128X[104X144[4X[28Xmodulo [ 256 ][128X[104X145[4X[28X[128X[104X146[4X[28Xthe map is currently represented by the above 1 x 1 matrix[128X[104X147[4X[28X------------v------------[128X[104X148[4X[28Xat homology degree: 13[128X[104X149[4X[28XZ/( 256 )/< |[ 8 ]| > [128X[104X150[4X[28X-------------------------[128X[104X151[4X[28X[ [ 2 ] ][128X[104X152[4X[28X[128X[104X153[4X[28Xmodulo [ 256 ][128X[104X154[4X[28X[128X[104X155[4X[28Xthe map is currently represented by the above 1 x 1 matrix[128X[104X156[4X[28X------------v------------[128X[104X157[4X[28Xat homology degree: 12[128X[104X158[4X[28XZ/( 256 )/< |[ 8 ]| >[128X[104X159[4X[28X-------------------------[128X[104X160[4X[28X[ [ 2 ] ][128X[104X161[4X[28X[128X[104X162[4X[28Xmodulo [ 256 ][128X[104X163[4X[28X[128X[104X164[4X[28Xthe map is currently represented by the above 1 x 1 matrix[128X[104X165[4X[28X------------v------------[128X[104X166[4X[28Xat homology degree: 11[128X[104X167[4X[28XZ/( 256 )/< |[ 4 ]| >[128X[104X168[4X[28X-------------------------[128X[104X169[4X[28X[ [ 4 ] ][128X[104X170[4X[28X[128X[104X171[4X[28Xmodulo [ 256 ][128X[104X172[4X[28X[128X[104X173[4X[28Xthe map is currently represented by the above 1 x 1 matrix[128X[104X174[4X[28X------------v------------[128X[104X175[4X[28Xat homology degree: 10[128X[104X176[4X[28XZ/( 256 )/< |[ 8 ]| >[128X[104X177[4X[28X-------------------------[128X[104X178[4X[28X[ [ 2 ] ][128X[104X179[4X[28X[128X[104X180[4X[28Xmodulo [ 256 ][128X[104X181[4X[28X[128X[104X182[4X[28Xthe map is currently represented by the above 1 x 1 matrix[128X[104X183[4X[28X------------v------------[128X[104X184[4X[28Xat homology degree: 9[128X[104X185[4X[28XZ/( 256 )/< |[ 8 ]| >[128X[104X186[4X[28X-------------------------[128X[104X187[4X[28X[ [ 2 ] ][128X[104X188[4X[28X[128X[104X189[4X[28Xmodulo [ 256 ][128X[104X190[4X[28X[128X[104X191[4X[28Xthe map is currently represented by the above 1 x 1 matrix[128X[104X192[4X[28X------------v------------[128X[104X193[4X[28Xat homology degree: 8[128X[104X194[4X[28XZ/( 256 )/< |[ 4 ]| >[128X[104X195[4X[28X-------------------------[128X[104X196[4X[28X[ [ 4 ] ][128X[104X197[4X[28X[128X[104X198[4X[28Xmodulo [ 256 ][128X[104X199[4X[28X[128X[104X200[4X[28Xthe map is currently represented by the above 1 x 1 matrix[128X[104X201[4X[28X------------v------------[128X[104X202[4X[28Xat homology degree: 7[128X[104X203[4X[28XZ/( 256 )/< |[ 8 ]| >[128X[104X204[4X[28X-------------------------[128X[104X205[4X[28X[ [ 2 ] ][128X[104X206[4X[28X[128X[104X207[4X[28Xmodulo [ 256 ][128X[104X208[4X[28X[128X[104X209[4X[28Xthe map is currently represented by the above 1 x 1 matrix[128X[104X210[4X[28X------------v------------[128X[104X211[4X[28Xat homology degree: 6[128X[104X212[4X[28XZ/( 256 )/< |[ 8 ]| >[128X[104X213[4X[28X-------------------------[128X[104X214[4X[28X[ [ 2 ] ][128X[104X215[4X[28X[128X[104X216[4X[28Xmodulo [ 256 ][128X[104X217[4X[28X[128X[104X218[4X[28Xthe map is currently represented by the above 1 x 1 matrix[128X[104X219[4X[28X------------v------------[128X[104X220[4X[28Xat homology degree: 5[128X[104X221[4X[28XZ/( 256 )/< |[ 4 ]| >[128X[104X222[4X[28X-------------------------[128X[104X223[4X[28X[ [ 4 ] ][128X[104X224[4X[28X[128X[104X225[4X[28Xmodulo [ 256 ][128X[104X226[4X[28X[128X[104X227[4X[28Xthe map is currently represented by the above 1 x 1 matrix[128X[104X228[4X[28X------------v------------[128X[104X229[4X[28Xat homology degree: 4[128X[104X230[4X[28XZ/( 256 )/< |[ 8 ]| >[128X[104X231[4X[28X-------------------------[128X[104X232[4X[28X[ [ 2 ] ][128X[104X233[4X[28X[128X[104X234[4X[28Xmodulo [ 256 ][128X[104X235[4X[28X[128X[104X236[4X[28Xthe map is currently represented by the above 1 x 1 matrix[128X[104X237[4X[28X------------v------------[128X[104X238[4X[28Xat homology degree: 3[128X[104X239[4X[28XZ/( 256 )/< |[ 8 ]| >[128X[104X240[4X[28X-------------------------[128X[104X241[4X[28X[ [ 2 ] ][128X[104X242[4X[28X[128X[104X243[4X[28Xmodulo [ 256 ][128X[104X244[4X[28X[128X[104X245[4X[28Xthe map is currently represented by the above 1 x 1 matrix[128X[104X246[4X[28X------------v------------[128X[104X247[4X[28Xat homology degree: 2[128X[104X248[4X[28XZ/( 256 )/< |[ 4 ]| >[128X[104X249[4X[28X-------------------------[128X[104X250[4X[28X[ [ 8 ] ][128X[104X251[4X[28X[128X[104X252[4X[28Xmodulo [ 256 ][128X[104X253[4X[28X[128X[104X254[4X[28Xthe map is currently represented by the above 1 x 1 matrix[128X[104X255[4X[28X------------v------------[128X[104X256[4X[28Xat homology degree: 1[128X[104X257[4X[28XZ/( 256 )/< |[ 16 ]| >[128X[104X258[4X[28X-------------------------[128X[104X259[4X[28X[ [ 1 ] ][128X[104X260[4X[28X[128X[104X261[4X[28Xmodulo [ 256 ][128X[104X262[4X[28X[128X[104X263[4X[28Xthe map is currently represented by the above 1 x 1 matrix[128X[104X264[4X[28X------------v------------[128X[104X265[4X[28Xat homology degree: 0[128X[104X266[4X[28XZ/( 256 )/< |[ 8 ]| >[128X[104X267[4X[28X-------------------------[128X[104X268[4X[32X[104X269270271272