## <#GAPDoc Label="RHom_Z"> ## ZZ := HomalgRingOfIntegers( ); ## Z ## gap> m := HomalgMatrix( [ [ 8, 0 ], [ 0, 2 ] ], ZZ );; ## gap> M := LeftPresentation( m ); ## ## gap> Display( M ); ## Z/< 8 > + Z/< 2 > ## gap> M; ## ## gap> a := HomalgMatrix( [ [ 2, 0 ] ], ZZ );; ## gap> alpha := HomalgMap( a, "free", M ); ## ## gap> pi := CokernelEpi( alpha ); ## ## gap> Display( pi ); ## [ [ 1, 0 ], ## [ 0, 1 ] ] ## ## the map is currently represented by the above 2 x 2 matrix ## gap> iota := KernelEmb( pi ); ## ## gap> Display( iota ); ## [ [ 2, 0 ] ] ## ## the map is currently represented by the above 1 x 2 matrix ## gap> N := Kernel( pi ); ## ## gap> Display( N ); ## Z/< 4 > ## gap> C := HomalgComplex( pi ); ## ## gap> Add( C, iota ); ## gap> ByASmallerPresentation( C ); ## ## gap> Display( C ); ## ------------------------- ## at homology degree: 2 ## Z/< 4 > ## ------------------------- ## [ [ 0, 6 ] ] ## ## the map is currently represented by the above 1 x 2 matrix ## ------------v------------ ## at homology degree: 1 ## Z/< 2 > + Z/< 8 > ## ------------------------- ## [ [ 0, 1 ], ## [ 1, 1 ] ] ## ## the map is currently represented by the above 2 x 2 matrix ## ------------v------------ ## at homology degree: 0 ## Z/< 2 > + Z/< 2 > ## ------------------------- ## gap> T := RHom( C, N ); ## ## gap> ByASmallerPresentation( T ); ## ## gap> L := LongSequence( T ); ## ## gap> Display( L ); ## ------------------------- ## at cohomology degree: 5 ## Z/< 4 > ## ------------^------------ ## [ [ 0, 3 ] ] ## ## the map is currently represented by the above 1 x 2 matrix ## ------------------------- ## at cohomology degree: 4 ## Z/< 2 > + Z/< 4 > ## ------------^------------ ## [ [ 0, 1 ], ## [ 0, 0 ] ] ## ## the map is currently represented by the above 2 x 2 matrix ## ------------------------- ## at cohomology degree: 3 ## Z/< 2 > + Z/< 2 > ## ------------^------------ ## [ [ 1 ], ## [ 0 ] ] ## ## the map is currently represented by the above 2 x 1 matrix ## ------------------------- ## at cohomology degree: 2 ## Z/< 4 > ## ------------^------------ ## [ [ 0, 2 ] ] ## ## the map is currently represented by the above 1 x 2 matrix ## ------------------------- ## at cohomology degree: 1 ## Z/< 2 > + Z/< 4 > ## ------------^------------ ## [ [ 0, 1 ], ## [ 2, 0 ] ] ## ## the map is currently represented by the above 2 x 2 matrix ## ------------------------- ## at cohomology degree: 0 ## Z/< 2 > + Z/< 2 > ## ------------------------- ## gap> IsExactSequence( L ); ## true ## gap> L; ## ## ]]> ## <#/GAPDoc> LoadPackage( "Modules" ); ZZ := HomalgRingOfIntegers( ); m := HomalgMatrix( [ [ 8, 0 ], [ 0, 2 ] ], ZZ ); M := LeftPresentation( m ); a := HomalgMatrix( [ [ 2, 0 ] ], ZZ ); alpha := HomalgMap( a, "free", M ); pi := CokernelEpi( alpha ); iota := KernelEmb( pi ); N := Kernel( pi ); C := HomalgComplex( pi ); Add( C, iota ); ByASmallerPresentation( C ); T := RHom( C, N ); ByASmallerPresentation( T ); L := LongSequence( T ); IsExactSequence( L );