3 Examples 3.1 Spectral Filtrations 3.1-1 ExtExt This is Example B.2 in [Bar].  Example  gap> Qxyz := HomalgFieldOfRationalsInDefaultCAS( ) * "x,y,z"; Q[x,y,z] gap> wmat := HomalgMatrix( "[ \ > x*y, y*z, z, 0, 0, \ > x^3*z,x^2*z^2,0, x*z^2, -z^2, \ > x^4, x^3*z, 0, x^2*z, -x*z, \ > 0, 0, x*y, -y^2, x^2-1,\ > 0, 0, x^2*z, -x*y*z, y*z, \ > 0, 0, x^2*y-x^2,-x*y^2+x*y,y^2-y \ > ]", 6, 5, Qxyz );  gap> W := LeftPresentation( wmat );  gap> Y := Hom( Qxyz, W );  gap> F := InsertObjectInMultiFunctor( Functor_Hom_for_fp_modules, 2, Y, "TensorY" );  gap> G := LeftDualizingFunctor( Qxyz );; gap> II_E := GrothendieckSpectralSequence( F, G, W );  gap> Display( II_E ); The associated transposed spectral sequence:  a homological spectral sequence at bidegrees [ [ 0 .. 3 ], [ -3 .. 0 ] ] --------- Level 0:   * * * *  * * * *  . * * *  . . * * --------- Level 1:   * * * *  . . . .  . . . .  . . . . --------- Level 2:   s s s s  . . . .  . . . .  . . . .  Now the spectral sequence of the bicomplex:  a homological spectral sequence at bidegrees [ [ -3 .. 0 ], [ 0 .. 3 ] ] --------- Level 0:   * * * *  * * * *  . * * *  . . * * --------- Level 1:   * * * *  * * * *  . * * *  . . . * --------- Level 2:   * * s s  * * * *  . * * *  . . . * --------- Level 3:   * s s s  * s s s  . . s *  . . . * --------- Level 4:   s s s s  . s s s  . . s s  . . . s gap> filt := FiltrationBySpectralSequence( II_E, 0 );   -1:   -2:   -3:  of > gap> ByASmallerPresentation( filt );   -1:   -2:   -3:  of > gap> m := IsomorphismOfFiltration( filt );   3.1-2 Purity This is Example B.3 in [Bar].  Example  gap> Qxyz := HomalgFieldOfRationalsInDefaultCAS( ) * "x,y,z"; Q[x,y,z] gap> wmat := HomalgMatrix( "[ \ > x*y, y*z, z, 0, 0, \ > x^3*z,x^2*z^2,0, x*z^2, -z^2, \ > x^4, x^3*z, 0, x^2*z, -x*z, \ > 0, 0, x*y, -y^2, x^2-1,\ > 0, 0, x^2*z, -x*y*z, y*z, \ > 0, 0, x^2*y-x^2,-x*y^2+x*y,y^2-y \ > ]", 6, 5, Qxyz );  gap> W := LeftPresentation( wmat );  gap> filt := PurityFiltration( W );   -1:   -2:   -3:  of > gap> W;  gap> II_E := SpectralSequence( filt );  gap> Display( II_E ); The associated transposed spectral sequence:  a homological spectral sequence at bidegrees [ [ 0 .. 3 ], [ -3 .. 0 ] ] --------- Level 0:   * * * *  * * * *  . * * *  . . * * --------- Level 1:   * * * *  . . . .  . . . .  . . . . --------- Level 2:   s . . .  . . . .  . . . .  . . . .  Now the spectral sequence of the bicomplex:  a homological spectral sequence at bidegrees [ [ -3 .. 0 ], [ 0 .. 3 ] ] --------- Level 0:   * * * *  * * * *  . * * *  . . * * --------- Level 1:   * * * *  * * * *  . * * *  . . . * --------- Level 2:   s . . .  * s . .  . * * .  . . . * --------- Level 3:   s . . .  * s . .  . . s .  . . . * --------- Level 4:   s . . .  . s . .  . . s .  . . . s  gap> m := IsomorphismOfFiltration( filt );  gap> IsIdenticalObj( Range( m ), W ); true gap> Source( m );  gap> Display( last ); 0, 0, x, -y,0,1, 0, 0, 0, x*y,-y*z,-z,0, 0,0, 0, 0, 0, x^2,-x*z,0, -z,1,0, 0, 0, 0, 0, 0, 0, 0, y,-z,0, 0, 0, 0, 0, 0, 0, x,0, -z, 0, -1, 0, 0, 0, 0, 0,x, -y, -1, 0, 0, 0, 0, 0, 0,-y,x^2-1,0, 0, 0, 0, 0, 0, 0,0, 0, z, 0, 0, 0, 0, 0, 0,0, 0, y-1,0, 0, 0, 0, 0, 0,0, 0, 0, z, 0, 0, 0, 0, 0,0, 0, 0, y, 0, 0, 0, 0, 0,0, 0, 0, x  Cokernel of the map  Q[x,y,z]^(1x12) --> Q[x,y,z]^(1x9),  currently represented by the above matrix gap> Display( filt ); Degree 0:  0, 0, x, -y, x*y,-y*z,-z,0,  x^2,-x*z,0, -z   Cokernel of the map  Q[x,y,z]^(1x3) --> Q[x,y,z]^(1x4),  currently represented by the above matrix ---------- Degree -1:  y,-z,0,  x,0, -z,  0,x, -y,  0,-y,x^2-1  Cokernel of the map  Q[x,y,z]^(1x4) --> Q[x,y,z]^(1x3),  currently represented by the above matrix ---------- Degree -2:  Q[x,y,z]/< z, y-1 > ---------- Degree -3:  Q[x,y,z]/< z, y, x > gap> Display( m ); 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, -x^2,-x*z, 0, -z, 0, 0, 0, x, -y, 0, 0, 0, 0, 0, -1, 0, 0, x^2,-x*y,y, -x^3,-x^2*z,0, -x*z,z  the map is currently represented by the above 9 x 5 matrix  3.1-3 A3_Purity This is Example B.4 in [Bar].  Example  gap> Qxyz := HomalgFieldOfRationalsInDefaultCAS( ) * "x,y,z"; Q[x,y,z] gap> A3 := RingOfDerivations( Qxyz, "Dx,Dy,Dz" ); Q[x,y,z] gap> nmat := HomalgMatrix( "[ \ > 3*Dy*Dz-Dz^2+Dx+3*Dy-Dz, 3*Dy*Dz-Dz^2, \ > Dx*Dz+Dz^2+Dz, Dx*Dz+Dz^2, \ > Dx*Dy, 0, \ > Dz^2-Dx+Dz, 3*Dx*Dy+Dz^2, \ > Dx^2, 0, \ > -Dz^2+Dx-Dz, 3*Dx^2-Dz^2, \ > Dz^3-Dx*Dz+Dz^2, Dz^3, \ > 2*x*Dz^2-2*x*Dx+2*x*Dz+3*Dx+3*Dz+3,2*x*Dz^2+3*Dx+3*Dz\ > ]", 8, 2, A3 );  gap> N := LeftPresentation( nmat );  gap> filt := PurityFiltration( N );   -1:   -2:   -3:  of > gap> II_E := SpectralSequence( filt );  gap> Display( II_E ); The associated transposed spectral sequence:  a homological spectral sequence at bidegrees [ [ 0 .. 3 ], [ -3 .. 0 ] ] --------- Level 0:   * * * *  . * * *  . . * *  . . . * --------- Level 1:   * * * *  . . . .  . . . .  . . . . --------- Level 2:   s . . .  . . . .  . . . .  . . . .  Now the spectral sequence of the bicomplex:  a homological spectral sequence at bidegrees [ [ -3 .. 0 ], [ 0 .. 3 ] ] --------- Level 0:   * * * *  . * * *  . . * *  . . . * --------- Level 1:   * * * *  . * * *  . . * *  . . . . --------- Level 2:   s . . .  . s . .  . . s .  . . . . gap> m := IsomorphismOfFiltration( filt );  gap> IsIdenticalObj( Range( m ), N ); true gap> Source( m );  gap> Display( last ); Dx,1/3,-1/9*x, 0, Dy, 1/6,  0, Dx, -1/2,  0, 0, Dz,  0, 0, Dy,  0, 0, Dx   Cokernel of the map  R^(1x6) --> R^(1x3), ( for R := Q[x,y,z] )  currently represented by the above matrix gap> Display( filt ); Degree 0:  0 ---------- Degree -1:  Q[x,y,z]/< Dx >  ---------- Degree -2:  Q[x,y,z]/< Dy, Dx > ---------- Degree -3:  Q[x,y,z]/< Dz, Dy, Dx > gap> Display( m ); 1, 1,  3*Dz+3, 3*Dz,  -6*Dz^2+6*Dx-6*Dz,-6*Dz^2  the map is currently represented by the above 3 x 2 matrix  3.1-4 TorExt-Grothendieck This is Example B.5 in [Bar].  Example  gap> Qxyz := HomalgFieldOfRationalsInDefaultCAS( ) * "x,y,z"; Q[x,y,z] gap> wmat := HomalgMatrix( "[ \ > x*y, y*z, z, 0, 0, \ > x^3*z,x^2*z^2,0, x*z^2, -z^2, \ > x^4, x^3*z, 0, x^2*z, -x*z, \ > 0, 0, x*y, -y^2, x^2-1,\ > 0, 0, x^2*z, -x*y*z, y*z, \ > 0, 0, x^2*y-x^2,-x*y^2+x*y,y^2-y \ > ]", 6, 5, Qxyz );  gap> W := LeftPresentation( wmat );  gap> F := InsertObjectInMultiFunctor( Functor_TensorProduct_for_fp_modules, 2, W, "TensorW" );  gap> G := LeftDualizingFunctor( Qxyz );; gap> II_E := GrothendieckSpectralSequence( F, G, W );  gap> Display( II_E ); The associated transposed spectral sequence:  a cohomological spectral sequence at bidegrees [ [ 0 .. 3 ], [ -3 .. 0 ] ] --------- Level 0:   * * * *  * * * *  . * * *  . . * * --------- Level 1:   * * * *  . . . .  . . . .  . . . . --------- Level 2:   s s s s  . . . .  . . . .  . . . .  Now the spectral sequence of the bicomplex:  a cohomological spectral sequence at bidegrees [ [ -3 .. 0 ], [ 0 .. 3 ] ] --------- Level 0:   * * * *  * * * *  . * * *  . . * * --------- Level 1:   * * * *  * * * *  . * * *  . . . * --------- Level 2:   * * s s  * * * *  . * * *  . . . * --------- Level 3:   * s s s  . s s s  . . s *  . . . s --------- Level 4:   s s s s  . s s s  . . s s  . . . s gap> filt := FiltrationBySpectralSequence( II_E, 0 );   -2:   -1:   0:  of > gap> ByASmallerPresentation( filt );   -2:   -1:   0:  of > gap> m := IsomorphismOfFiltration( filt );   3.1-5 TorExt This is Example B.6 in [Bar].  Example  gap> Qxyz := HomalgFieldOfRationalsInDefaultCAS( ) * "x,y,z"; Q[x,y,z] gap> wmat := HomalgMatrix( "[ \ > x*y, y*z, z, 0, 0, \ > x^3*z,x^2*z^2,0, x*z^2, -z^2, \ > x^4, x^3*z, 0, x^2*z, -x*z, \ > 0, 0, x*y, -y^2, x^2-1,\ > 0, 0, x^2*z, -x*y*z, y*z, \ > 0, 0, x^2*y-x^2,-x*y^2+x*y,y^2-y \ > ]", 6, 5, Qxyz );  gap> W := LeftPresentation( wmat );  gap> P := Resolution( W );  gap> GP := Hom( P );  gap> FGP := GP * P;  gap> BC := HomalgBicomplex( FGP );  gap> p_degrees := ObjectDegreesOfBicomplex( BC )[1]; [ 0 .. 3 ] gap> II_E := SecondSpectralSequenceWithFiltration( BC, p_degrees );  gap> Display( II_E ); The associated transposed spectral sequence:  a cohomological spectral sequence at bidegrees [ [ 0 .. 3 ], [ -3 .. 0 ] ] --------- Level 0:   * * * *  * * * *  * * * *  * * * * --------- Level 1:   * * * *  . . . .  . . . .  . . . . --------- Level 2:   s s s s  . . . .  . . . .  . . . .  Now the spectral sequence of the bicomplex:  a cohomological spectral sequence at bidegrees [ [ -3 .. 0 ], [ 0 .. 3 ] ] --------- Level 0:   * * * *  * * * *  * * * *  * * * * --------- Level 1:   * * * *  * * * *  * * * *  * * * * --------- Level 2:   * * s s  * * * *  . * * *  . . . * --------- Level 3:   * s s s  . s s s  . . s *  . . . s --------- Level 4:   s s s s  . s s s  . . s s  . . . s gap> filt := FiltrationBySpectralSequence( II_E, 0 );   -2:   -1:   0:  of > gap> ByASmallerPresentation( filt );   -2:   -1:   0:  of > gap> m := IsomorphismOfFiltration( filt );   3.1-6 CodegreeOfPurity This is Example B.7 in [Bar].  Example  gap> Qxyz := HomalgFieldOfRationalsInDefaultCAS( ) * "x,y,z"; Q[x,y,z] gap> vmat := HomalgMatrix( "[ \ > 0, 0, x,-z, \ > x*z,z^2,y,0, \ > x^2,x*z,0,y \ > ]", 3, 4, Qxyz );  gap> V := LeftPresentation( vmat );  gap> wmat := HomalgMatrix( "[ \ > 0, 0, x,-y, \ > x*y,y*z,z,0, \ > x^2,x*z,0,z \ > ]", 3, 4, Qxyz );  gap> W := LeftPresentation( wmat );  gap> Rank( V ); 2 gap> Rank( W ); 2 gap> ProjectiveDimension( V ); 2 gap> ProjectiveDimension( W ); 2 gap> DegreeOfTorsionFreeness( V ); 1 gap> DegreeOfTorsionFreeness( W ); 1 gap> CodegreeOfPurity( V ); [ 2 ] gap> CodegreeOfPurity( W ); [ 1, 1 ] gap> filtV := PurityFiltration( V );   -1:   -2:  of > gap> filtW := PurityFiltration( W );   -1:   -2:  of > gap> II_EV := SpectralSequence( filtV );  gap> Display( II_EV ); The associated transposed spectral sequence:  a homological spectral sequence at bidegrees [ [ 0 .. 2 ], [ -3 .. 0 ] ] --------- Level 0:   * * *  * * *  * * *  . * * --------- Level 1:   * * *  . . .  . . .  . . . --------- Level 2:   s . .  . . .  . . .  . . .  Now the spectral sequence of the bicomplex:  a homological spectral sequence at bidegrees [ [ -3 .. 0 ], [ 0 .. 2 ] ] --------- Level 0:   * * * *  * * * *  . * * * --------- Level 1:   * * * *  * * * *  . . * * --------- Level 2:   * . . .  * . . .  . . * * --------- Level 3:   * . . .  . . . .  . . . * --------- Level 4:   . . . .  . . . .  . . . s gap> II_EW := SpectralSequence( filtW );  gap> Display( II_EW );  The associated transposed spectral sequence:  a homological spectral sequence at bidegrees [ [ 0 .. 2 ], [ -3 .. 0 ] ] --------- Level 0:   * * *  * * *  . * *  . . * --------- Level 1:   * * *  . . .  . . .  . . . --------- Level 2:   s . .  . . .  . . .  . . .  Now the spectral sequence of the bicomplex:  a homological spectral sequence at bidegrees [ [ -3 .. 0 ], [ 0 .. 2 ] ] --------- Level 0:   * * * *  . * * *  . . * * --------- Level 1:   * * * *  . * * *  . . . * --------- Level 2:   * . . .  . * . .  . . . * --------- Level 3:   * . . .  . . . .  . . . * --------- Level 4:   . . . .  . . . .  . . . s  3.1-7 HomHom This corresponds to the example of Section 2 in [BR06].  Example  gap> R := HomalgRingOfIntegersInExternalGAP( ) / 2^8; Z/( 256 ) gap> Display( R );  gap> M := LeftPresentation( [ 2^5 ], R );  gap> Display( M ); Z/( 256 )/< |[ 32 ]| >  gap> M;  gap> _M := LeftPresentation( [ 2^3 ], R );  gap> Display( _M ); Z/( 256 )/< |[ 8 ]| >  gap> _M;  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 ]| >  -------------------------  3.2 Commutative Algebra 3.2-1 Eliminate  Example  gap> R := HomalgFieldOfRationalsInDefaultCAS( ) * "x,y,z,l,m"; Q[x,y,z,l,m] gap> var := Indeterminates( R ); [ x, y, z, l, m ] gap> x := var[1];; y := var[2];; z := var[3];; l := var[4];; m := var[5];; gap> L := [ x*m+l-4, y*m+l-2, z*m-l+1, x^2+y^2+z^2-1, x+y-z ]; [ x*m+l-4, y*m+l-2, z*m-l+1, x^2+y^2+z^2-1, x+y-z ] gap> e := Eliminate( L, [ l, m ] );  gap> Display( e ); 4*y+z,  4*x-5*z, 21*z^2-8 gap> I := LeftSubmodule( e );  gap> Display( I ); 4*y+z,  4*x-5*z, 21*z^2-8  A (left) ideal generated by the 3 entries of the above matrix gap> J := LeftSubmodule( "x+y-z, -2*z-3*y+x, x^2+y^2+z^2-1", R );  gap> I = J; true