  
  [1X3 Quick Start[0X
  
  This  chapter  should give you a quick guide to create your first example in
  [5Xhomalg[0m.
  
  
  [1X3.1 Why are all examples in this manual over ℤ or ℤ/mℤ?[0X
  
  As  the reader might notice, all examples in this manual will be either over
  ℤ  or  over  one  of its residue class rings ℤ/mℤ. There are two reasons for
  this.  The  first  reason  is that [5XGAP[0m does not natively support rings other
  than ℤ in a [13Xsufficient[0m way (--> [14X1.1-4[0m).
  
  The  second  and  more  important  reason  is  to underline the fact the all
  effective  homological  constructions that are relevant for [5Xhomalg[0m have only
  as  much  to  do with the Gröbnerbasis algorithm as they do with the Hermite
  algorithm  for  the  ring  ℤ;  both algorithms are used to effectively solve
  inhomogeneous  linear  systems  over  the  respective  ring.  And  [5Xhomalg[0m is
  designed  to use rings and matrices over these rings together with all their
  operations  as  a  black box. In other words: Because [5Xhomalg[0m works for ℤ, it
  works by its design for all other computable rings (see also [14X1.1-6[0m).
  
  
  [1X3.2 [10Xgap> ExamplesForHomalg();[1X[0X
  
  To quickly create a ring for use with [5Xhomalg[0m enter
  [10XExamplesForHomalg();[0m
  which  will  load the package [5XExamplesForHomalg[0m (if installed) and provide a
  step  by  step guide to create the ring. For the full core functionality you
  need  to  install  the  packages  [5XHomalgToCAS[0m, [5XIO_ForHomalg[0m, [5XRingsForHomalg[0m,
  [5XGauss[0m, and [5XGaussForHomalg[0m. They are part of the [5Xhomalg[0m project.
  
  
  [1X3.3 A typical example[0X
  
  
  [1X3.3-1 HomHom[0X
  
  The following example is taken from Section 2 of [BR06].
  The  computation  takes place over the residue class ring R=ℤ/2^8ℤ using the
  generic   support  for  residue  class  rings  provided  by  the  subpackage
  [5XResidueClassRingForHomalg[0m  (-->  Appendix  [14XF[0m).  For  a native support of the
  rings R=ℤ/p^nℤ use the [5XGaussForHomalg[0m package.
  
  Here we compute the (infinite) long exact homology sequence of the covariant
  functor Hom(Hom(-,ℤ/2^7ℤ),ℤ/2^4ℤ) (and its left derived functors) applied to
  the short exact sequence
  0 -> M_=ℤ/2^2ℤ --alpha_1--> M=ℤ/2^5ℤ --alpha_2--> _M=ℤ/2^3ℤ -> 0.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> ZZ := HomalgRingOfIntegers( );[0X
    [4X<A homalg internal ring>[0X
    [4Xgap> Display( ZZ );[0X
    [4XZ[0X
    [4Xgap> R := ZZ / 2^8;[0X
    [4X<A homalg residue class ring>[0X
    [4Xgap> Display( R );[0X
    [4XZ/( 256 )[0X
    [4Xgap> M := LeftPresentation( [ 2^5 ], R );[0X
    [4X<A cyclic left module presented by 1 relation for a cyclic generator>[0X
    [4Xgap> Display( M );[0X
    [4XZ/( 256 )/< |[ 32 ]| >[0X
    [4Xgap> _M := LeftPresentation( [ 2^3 ], R );[0X
    [4X<A cyclic left module presented by 1 relation for a cyclic generator>[0X
    [4Xgap> Display( _M );[0X
    [4XZ/( 256 )/< |[ 8 ]| >[0X
    [4Xgap> alpha2 := HomalgMap( [ 1 ], M, _M );[0X
    [4X<A "homomorphism" of left modules>[0X
    [4Xgap> IsMorphism( alpha2 );[0X
    [4Xtrue[0X
    [4Xgap> alpha2;[0X
    [4X<A homomorphism of left modules>[0X
    [4Xgap> Display( alpha2 );[0X
    [4X[ [  1 ] ][0X
    [4X[0X
    [4Xmodulo [ 256 ][0X
    [4X[0X
    [4Xthe map is currently represented by the above 1 x 1 matrix[0X
    [4Xgap> M_ := Kernel( alpha2 );[0X
    [4X<A cyclic left module presented by yet unknown relations for a cyclic generato\[0X
    [4Xr>[0X
    [4Xgap> alpha1 := KernelEmb( alpha2 );[0X
    [4X<A monomorphism of left modules>[0X
    [4Xgap> seq := HomalgComplex( alpha2 );[0X
    [4X<An acyclic complex containing a single morphism of left modules at degrees [0X
    [4X[ 0 .. 1 ]>[0X
    [4Xgap> Add( seq, alpha1 );[0X
    [4Xgap> seq;[0X
    [4X<A sequence containing 2 morphisms of left modules at degrees [ 0 .. 2 ]>[0X
    [4Xgap> IsShortExactSequence( seq );[0X
    [4Xtrue[0X
    [4Xgap> seq;[0X
    [4X<A short exact sequence containing 2 morphisms of left modules at degrees [0X
    [4X[ 0 .. 2 ]>[0X
    [4Xgap> Display( seq );[0X
    [4X-------------------------[0X
    [4Xat homology degree: 2[0X
    [4XZ/( 256 )/< |[ 4 ]| > [0X
    [4X-------------------------[0X
    [4X[ [  24 ] ][0X
    [4X[0X
    [4Xmodulo [ 256 ][0X
    [4X[0X
    [4Xthe map is currently represented by the above 1 x 1 matrix[0X
    [4X------------v------------[0X
    [4Xat homology degree: 1[0X
    [4XZ/( 256 )/< |[ 32 ]| > [0X
    [4X-------------------------[0X
    [4X[ [  1 ] ][0X
    [4X[0X
    [4Xmodulo [ 256 ][0X
    [4X[0X
    [4Xthe map is currently represented by the above 1 x 1 matrix[0X
    [4X------------v------------[0X
    [4Xat homology degree: 0[0X
    [4XZ/( 256 )/< |[ 8 ]| > [0X
    [4X-------------------------[0X
    [4Xgap> K := LeftPresentation( [ 2^7 ], R );[0X
    [4X<A cyclic left module presented by 1 relation for a cyclic generator>[0X
    [4Xgap> L := RightPresentation( [ 2^4 ], R );[0X
    [4X<A cyclic right module on a cyclic generator satisfying 1 relation>[0X
    [4Xgap> triangle := LHomHom( 4, seq, K, L, "t" );[0X
    [4X<An exact triangle containing 3 morphisms of left complexes at degrees [0X
    [4X[ 1, 2, 3, 1 ]>[0X
    [4Xgap> lehs := LongSequence( triangle );[0X
    [4X<A sequence containing 14 morphisms of left modules at degrees [ 0 .. 14 ]>[0X
    [4Xgap> ByASmallerPresentation( lehs );[0X
    [4X<A non-zero sequence containing 14 morphisms of left modules at degrees [0X
    [4X[ 0 .. 14 ]>[0X
    [4Xgap> IsExactSequence( lehs );[0X
    [4Xfalse[0X
    [4Xgap> lehs;[0X
    [4X<A non-zero left acyclic complex containing [0X
    [4X14 morphisms of left modules at degrees [ 0 .. 14 ]>[0X
    [4Xgap> Assert( 0, IsLeftAcyclic( lehs ) );[0X
    [4Xgap> Display( lehs );[0X
    [4X-------------------------[0X
    [4Xat homology degree: 14[0X
    [4XZ/( 256 )/< |[ 4 ]| > [0X
    [4X-------------------------[0X
    [4X[ [  4 ] ][0X
    [4X[0X
    [4Xmodulo [ 256 ][0X
    [4X[0X
    [4Xthe map is currently represented by the above 1 x 1 matrix[0X
    [4X------------v------------[0X
    [4Xat homology degree: 13[0X
    [4XZ/( 256 )/< |[ 8 ]| > [0X
    [4X-------------------------[0X
    [4X[ [  6 ] ][0X
    [4X[0X
    [4Xmodulo [ 256 ][0X
    [4X[0X
    [4Xthe map is currently represented by the above 1 x 1 matrix[0X
    [4X------------v------------[0X
    [4Xat homology degree: 12[0X
    [4XZ/( 256 )/< |[ 8 ]| > [0X
    [4X-------------------------[0X
    [4X[ [  2 ] ][0X
    [4X[0X
    [4Xmodulo [ 256 ][0X
    [4X[0X
    [4Xthe map is currently represented by the above 1 x 1 matrix[0X
    [4X------------v------------[0X
    [4Xat homology degree: 11[0X
    [4XZ/( 256 )/< |[ 4 ]| > [0X
    [4X-------------------------[0X
    [4X[ [  4 ] ][0X
    [4X[0X
    [4Xmodulo [ 256 ][0X
    [4X[0X
    [4Xthe map is currently represented by the above 1 x 1 matrix[0X
    [4X------------v------------[0X
    [4Xat homology degree: 10[0X
    [4XZ/( 256 )/< |[ 8 ]| > [0X
    [4X-------------------------[0X
    [4X[ [  6 ] ][0X
    [4X[0X
    [4Xmodulo [ 256 ][0X
    [4X[0X
    [4Xthe map is currently represented by the above 1 x 1 matrix[0X
    [4X------------v------------[0X
    [4Xat homology degree: 9[0X
    [4XZ/( 256 )/< |[ 8 ]| > [0X
    [4X-------------------------[0X
    [4X[ [  2 ] ][0X
    [4X[0X
    [4Xmodulo [ 256 ][0X
    [4X[0X
    [4Xthe map is currently represented by the above 1 x 1 matrix[0X
    [4X------------v------------[0X
    [4Xat homology degree: 8[0X
    [4XZ/( 256 )/< |[ 4 ]| > [0X
    [4X-------------------------[0X
    [4X[ [  4 ] ][0X
    [4X[0X
    [4Xmodulo [ 256 ][0X
    [4X[0X
    [4Xthe map is currently represented by the above 1 x 1 matrix[0X
    [4X------------v------------[0X
    [4Xat homology degree: 7[0X
    [4XZ/( 256 )/< |[ 8 ]| > [0X
    [4X-------------------------[0X
    [4X[ [  6 ] ][0X
    [4X[0X
    [4Xmodulo [ 256 ][0X
    [4X[0X
    [4Xthe map is currently represented by the above 1 x 1 matrix[0X
    [4X------------v------------[0X
    [4Xat homology degree: 6[0X
    [4XZ/( 256 )/< |[ 8 ]| > [0X
    [4X-------------------------[0X
    [4X[ [  2 ] ][0X
    [4X[0X
    [4Xmodulo [ 256 ][0X
    [4X[0X
    [4Xthe map is currently represented by the above 1 x 1 matrix[0X
    [4X------------v------------[0X
    [4Xat homology degree: 5[0X
    [4XZ/( 256 )/< |[ 4 ]| > [0X
    [4X-------------------------[0X
    [4X[ [  4 ] ][0X
    [4X[0X
    [4Xmodulo [ 256 ][0X
    [4X[0X
    [4Xthe map is currently represented by the above 1 x 1 matrix[0X
    [4X------------v------------[0X
    [4Xat homology degree: 4[0X
    [4XZ/( 256 )/< |[ 8 ]| > [0X
    [4X-------------------------[0X
    [4X[ [  6 ] ][0X
    [4X[0X
    [4Xmodulo [ 256 ][0X
    [4X[0X
    [4Xthe map is currently represented by the above 1 x 1 matrix[0X
    [4X------------v------------[0X
    [4Xat homology degree: 3[0X
    [4XZ/( 256 )/< |[ 8 ]| > [0X
    [4X-------------------------[0X
    [4X[ [  2 ] ][0X
    [4X[0X
    [4Xmodulo [ 256 ][0X
    [4X[0X
    [4Xthe map is currently represented by the above 1 x 1 matrix[0X
    [4X------------v------------[0X
    [4Xat homology degree: 2[0X
    [4XZ/( 256 )/< |[ 4 ]| > [0X
    [4X-------------------------[0X
    [4X[ [  8 ] ][0X
    [4X[0X
    [4Xmodulo [ 256 ][0X
    [4X[0X
    [4Xthe map is currently represented by the above 1 x 1 matrix[0X
    [4X------------v------------[0X
    [4Xat homology degree: 1[0X
    [4XZ/( 256 )/< |[ 16 ]| > [0X
    [4X-------------------------[0X
    [4X[ [  1 ] ][0X
    [4X[0X
    [4Xmodulo [ 256 ][0X
    [4X[0X
    [4Xthe map is currently represented by the above 1 x 1 matrix[0X
    [4X------------v------------[0X
    [4Xat homology degree: 0[0X
    [4XZ/( 256 )/< |[ 8 ]| > [0X
    [4X-------------------------[0X
  [4X------------------------------------------------------------------[0X
  
