## <#GAPDoc Label="HomHom"> ## ## HomHom ## The following example is taken from Section 2 of .

## The computation takes place over the residue class ring R=&ZZ;/2^8&ZZ; ## using the generic support for residue class rings provided by ## the subpackage &ResidueClassRingForHomalg; of the &MatricesForHomalg; package. ## For a native support of the rings R=&ZZ;/p^n&ZZ; use the &GaussForHomalg; package.

## Here we compute the (infinite) long exact homology sequence of the ## covariant functor Hom(Hom(-,&ZZ;/2^7&ZZ;),&ZZ;/2^4&ZZ;) (and its left derived functors) ## applied to the short exact sequence

## 0 \longrightarrow M\_=&ZZ;/2^2&ZZ; \stackrel{\alpha_1}{\longrightarrow} ## M=&ZZ;/2^5&ZZ; \stackrel{\alpha_2}{\longrightarrow} \_M=&ZZ;/2^3&ZZ; \longrightarrow 0 ## 0 -> M_=&ZZ;/2^2&ZZ; --alpha_1--> M=&ZZ;/2^5&ZZ; --alpha_2--> \_M=&ZZ;/2^3&ZZ; -> 0. ## ZZ := HomalgRingOfIntegers( ); ## Z ## gap> Display( ZZ ); ## ## gap> R := ZZ / 2^8; ## ## gap> Display( R ); ## Z/( 256 ) ## gap> M := LeftPresentation( [ 2^5 ], R ); ## ## gap> Display( M ); ## Z/( 256 )/< |[ 32 ]| > ## gap> _M := LeftPresentation( [ 2^3 ], R ); ## ## gap> Display( _M ); ## Z/( 256 )/< |[ 8 ]| > ## gap> alpha2 := HomalgMap( [ 1 ], M, _M ); ## ## gap> IsMorphism( alpha2 ); ## true ## gap> alpha2; ## ## gap> Display( alpha2 ); ## [ [ 1 ] ] ## ## modulo [ 256 ] ## ## the map is currently represented by the above 1 x 1 matrix ## gap> M_ := Kernel( alpha2 ); ## ## gap> alpha1 := KernelEmb( alpha2 ); ## ## gap> seq := HomalgComplex( alpha2 ); ## ## gap> Add( seq, alpha1 ); ## gap> seq; ## ## gap> IsShortExactSequence( seq ); ## true ## gap> seq; ## ## gap> Display( seq ); ## ------------------------- ## at homology degree: 2 ## Z/( 256 )/< |[ 4 ]| > ## ------------------------- ## [ [ 24 ] ] ## ## modulo [ 256 ] ## ## the map is currently represented by the above 1 x 1 matrix ## ------------v------------ ## at homology degree: 1 ## Z/( 256 )/< |[ 32 ]| > ## ------------------------- ## [ [ 1 ] ] ## ## modulo [ 256 ] ## ## the map is currently represented by the above 1 x 1 matrix ## ------------v------------ ## at homology degree: 0 ## Z/( 256 )/< |[ 8 ]| > ## ------------------------- ## gap> K := LeftPresentation( [ 2^7 ], R ); ## ## gap> L := RightPresentation( [ 2^4 ], R ); ## ## gap> triangle := LHomHom( 4, seq, K, L, "t" ); ## ## gap> lehs := LongSequence( triangle ); ## ## gap> ByASmallerPresentation( lehs ); ## ## gap> IsExactSequence( lehs ); ## false ## gap> lehs; ## ## gap> Assert( 0, IsLeftAcyclic( lehs ) ); ## gap> Display( lehs ); ## ------------------------- ## at homology degree: 14 ## Z/( 256 )/< |[ 4 ]| > ## ------------------------- ## [ [ 4 ] ] ## ## modulo [ 256 ] ## ## the map is currently represented by the above 1 x 1 matrix ## ------------v------------ ## at homology degree: 13 ## Z/( 256 )/< |[ 8 ]| > ## ------------------------- ## [ [ 2 ] ] ## ## modulo [ 256 ] ## ## the map is currently represented by the above 1 x 1 matrix ## ------------v------------ ## at homology degree: 12 ## Z/( 256 )/< |[ 8 ]| > ## ------------------------- ## [ [ 2 ] ] ## ## modulo [ 256 ] ## ## the map is currently represented by the above 1 x 1 matrix ## ------------v------------ ## at homology degree: 11 ## Z/( 256 )/< |[ 4 ]| > ## ------------------------- ## [ [ 4 ] ] ## ## modulo [ 256 ] ## ## the map is currently represented by the above 1 x 1 matrix ## ------------v------------ ## at homology degree: 10 ## Z/( 256 )/< |[ 8 ]| > ## ------------------------- ## [ [ 2 ] ] ## ## modulo [ 256 ] ## ## the map is currently represented by the above 1 x 1 matrix ## ------------v------------ ## at homology degree: 9 ## Z/( 256 )/< |[ 8 ]| > ## ------------------------- ## [ [ 2 ] ] ## ## modulo [ 256 ] ## ## the map is currently represented by the above 1 x 1 matrix ## ------------v------------ ## at homology degree: 8 ## Z/( 256 )/< |[ 4 ]| > ## ------------------------- ## [ [ 4 ] ] ## ## modulo [ 256 ] ## ## the map is currently represented by the above 1 x 1 matrix ## ------------v------------ ## at homology degree: 7 ## Z/( 256 )/< |[ 8 ]| > ## ------------------------- ## [ [ 2 ] ] ## ## modulo [ 256 ] ## ## the map is currently represented by the above 1 x 1 matrix ## ------------v------------ ## at homology degree: 6 ## Z/( 256 )/< |[ 8 ]| > ## ------------------------- ## [ [ 2 ] ] ## ## modulo [ 256 ] ## ## the map is currently represented by the above 1 x 1 matrix ## ------------v------------ ## at homology degree: 5 ## Z/( 256 )/< |[ 4 ]| > ## ------------------------- ## [ [ 4 ] ] ## ## modulo [ 256 ] ## ## the map is currently represented by the above 1 x 1 matrix ## ------------v------------ ## at homology degree: 4 ## Z/( 256 )/< |[ 8 ]| > ## ------------------------- ## [ [ 2 ] ] ## ## modulo [ 256 ] ## ## the map is currently represented by the above 1 x 1 matrix ## ------------v------------ ## at homology degree: 3 ## Z/( 256 )/< |[ 8 ]| > ## ------------------------- ## [ [ 2 ] ] ## ## modulo [ 256 ] ## ## the map is currently represented by the above 1 x 1 matrix ## ------------v------------ ## at homology degree: 2 ## Z/( 256 )/< |[ 4 ]| > ## ------------------------- ## [ [ 8 ] ] ## ## modulo [ 256 ] ## ## the map is currently represented by the above 1 x 1 matrix ## ------------v------------ ## at homology degree: 1 ## Z/( 256 )/< |[ 16 ]| > ## ------------------------- ## [ [ 1 ] ] ## ## modulo [ 256 ] ## ## the map is currently represented by the above 1 x 1 matrix ## ------------v------------ ## at homology degree: 0 ## Z/( 256 )/< |[ 8 ]| > ## ------------------------- ## ]]> ## ## <#/GAPDoc> LoadPackage( "Modules" ); LoadPackage( "Modules" ); ZZ := HomalgRingOfIntegers( ); R := ZZ / 2^8; M := LeftPresentation( [ 2^5 ], R ); _M := LeftPresentation( [ 2^3 ], R ); alpha2 := HomalgMap( [ 1 ], M, _M ); M_ := Kernel( alpha2 ); alpha1 := KernelEmb( alpha2 ); seq := HomalgComplex( alpha2 ); Add( seq, alpha1 ); IsShortExactSequence( seq ); K := LeftPresentation( [ 2^7 ], R ); L := RightPresentation( [ 2^4 ], R ); triangle := LHomHom( 4, seq, K, L, "t" ); lehs := LongSequence( triangle ); ByASmallerPresentation( lehs ); IsExactSequence( lehs ); Assert( 0, IsLeftAcyclic( lehs ) );