Goto Chapter: Top 1 2 Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

2 Examples and Tests
 2.1 Annihilator
 2.2 Intersection of Submodules
 2.3 Koszul Complex
 2.4 Closed Monoidal Structure
 2.5 Projectivity test

2 Examples and Tests

2.1 Annihilator

gap> ZZZ := HomalgRingOfIntegersInSingular();;
gap> M1 := AsLeftPresentation( HomalgMatrix( [ [ "2" ] ], ZZZ ) );;
gap> M2 := AsLeftPresentation( HomalgMatrix( [ [ "3" ] ], ZZZ ) );;
gap> M3 := AsLeftPresentation( HomalgMatrix( [ [ "4" ] ], ZZZ ) );;
gap> M := DirectSum( M1, M2, M3 );;
gap> Display( Annihilator( M ) );
12

A monomorphism in Category of left presentations of Z
gap> M1 := AsRightPresentation( HomalgMatrix( [ [ "2" ] ], ZZZ ) );;
gap> M2 := AsRightPresentation( HomalgMatrix( [ [ "3" ] ], ZZZ ) );;
gap> M3 := AsRightPresentation( HomalgMatrix( [ [ "4" ] ], ZZZ ) );;
gap> M := DirectSum( M1, M2, M3 );;
gap> Display( Annihilator( M ) );
12

A monomorphism in Category of right presentations of Z

2.2 Intersection of Submodules

gap> Q := HomalgFieldOfRationalsInSingular();;
gap> R := Q * "x,y";
Q[x,y]
gap> F := AsLeftPresentation( HomalgMatrix( [ [ 0 ] ], R ) );
<An object in Category of left presentations of Q[x,y]>
gap> I1 := AsLeftPresentation( HomalgMatrix( [ [ "x" ] ], R ) );;
gap> I2 := AsLeftPresentation( HomalgMatrix( [ [ "y" ] ], R ) );;
gap> Display( I1 );
x

An object in Category of left presentations of Q[x,y]
gap> Display( I2 );
y

An object in Category of left presentations of Q[x,y]
gap> eps1 := PresentationMorphism( F, HomalgMatrix( [ [ 1 ] ], R ), I1 );
<A morphism in Category of left presentations of Q[x,y]>
gap> eps2 := PresentationMorphism( F, HomalgMatrix( [ [ 1 ] ], R ), I2 );
<A morphism in Category of left presentations of Q[x,y]>
gap> kernelemb1 := KernelEmbedding( eps1 );
<A monomorphism in Category of left presentations of Q[x,y]>
gap> kernelemb2 := KernelEmbedding( eps2 );
<A monomorphism in Category of left presentations of Q[x,y]>
gap> P := FiberProduct( kernelemb1, kernelemb2 );;
gap> Display( P );
(an empty 0 x 1 matrix)

An object in Category of left presentations of Q[x,y]
gap> pi1 := ProjectionInFactorOfFiberProduct( [ kernelemb1, kernelemb2 ], 1 );
<A monomorphism in Category of left presentations of Q[x,y]>
gap> composite := PreCompose( pi1, kernelemb1 );
<A monomorphism in Category of left presentations of Q[x,y]>
gap> Display( composite );
x*y

A monomorphism in Category of left presentations of Q[x,y]

2.3 Koszul Complex

gap> Q := HomalgFieldOfRationalsInSingular();;
gap> R := Q * "x,y,z";;
gap> M := HomalgMatrix( [ [ "x" ], [ "y" ], [ "z" ] ], 3, 1, R );;
gap> Ml := AsLeftPresentation( M );;
gap> eps := CoverByFreeModule( Ml );;
gap> iota1 := KernelEmbedding( eps );;
gap> Display( iota1 );
x,
y,
z 

A monomorphism in Category of left presentations of Q[x,y,z]
gap> Display( Source( iota1 ) );
0, -z,y,
-z,0, x,
-y,x, 0 

An object in Category of left presentations of Q[x,y,z]
gap> pi1 := CoverByFreeModule( Source( iota1 ) );;
gap> d1 := PreCompose( pi1, iota1 );;
gap> Display( d1 );
x,
y,
z 

A morphism in Category of left presentations of Q[x,y,z]
gap> iota2 := KernelEmbedding( d1 );;
gap> Display( iota2 );
0, -z,y,
-z,0, x,
-y,x, 0 

A monomorphism in Category of left presentations of Q[x,y,z]
gap> Display( Source( iota2 ) );;
x,-y,z

An object in Category of left presentations of Q[x,y,z]
gap> pi2 := CoverByFreeModule( Source( iota2 ) );;
gap> d2 := PreCompose( pi2, iota2 );;
gap> Display( d2 );
0, -z,y,
-z,0, x,
-y,x, 0 

A morphism in Category of left presentations of Q[x,y,z]
gap> iota3 := KernelEmbedding( d2 );;
gap> Display( iota3 );
x,-y,z

A monomorphism in Category of left presentations of Q[x,y,z]
gap> Display( Source( iota3 ) );
(an empty 0 x 1 matrix)

An object in Category of left presentations of Q[x,y,z]
gap> pi3 := CoverByFreeModule( Source( iota3 ) );;
gap> d3 := PreCompose( pi3, iota3 );;
gap> Display( d3 );
x,-y,z

A morphism in Category of left presentations of Q[x,y,z]
gap> N := HomalgMatrix( [ [ "x" ] ], 1, 1, R );;
gap> Nl := AsLeftPresentation( N );;
gap> d2Nl := TensorProductOnMorphisms( d2, IdentityMorphism( Nl ) );;
gap> d1Nl := TensorProductOnMorphisms( d1, IdentityMorphism( Nl ) );;
gap> IsZero( PreCompose( d2Nl, d1Nl ) );
true
gap> cycles := KernelEmbedding( d1Nl );;
gap> boundaries := ImageEmbedding( d2Nl );;
gap> boundaries_in_cyles := LiftAlongMonomorphism( cycles, boundaries );;
gap> homology := CokernelObject( boundaries_in_cyles );;
gap> LessGenFunctor := FunctorLessGeneratorsLeft( R );;
gap> homology := ApplyFunctor( LessGenFunctor, homology );;
gap> StdBasisFunctor := FunctorStandardModuleLeft( R );;
gap> homology := ApplyFunctor( StdBasisFunctor, homology );;
gap> Display( homology );
z,
y,
x 

An object in Category of left presentations of Q[x,y,z]

2.4 Closed Monoidal Structure

gap> R := HomalgRingOfIntegers( );;
gap> M := AsLeftPresentation( HomalgMatrix( [ [ 2 ] ], 1, 1, R ) );
<An object in Category of left presentations of Z>
gap> N := AsLeftPresentation( HomalgMatrix( [ [ 3 ] ], 1, 1, R ) );
<An object in Category of left presentations of Z>
gap> T := TensorProductOnObjects( M, N );
<An object in Category of left presentations of Z>
gap> Display( T );
[ [  3 ],
  [  2 ] ]

An object in Category of left presentations of Z
gap> IsZero( T );
true
gap> H := InternalHomOnObjects( DirectSum( M, M ), DirectSum( M, N ) );
<An object in Category of left presentations of Z>
gap> Display( H );
[ [   0,   0,   0,  -2 ],
  [   1,   2,   0,   0 ],
  [   0,   2,   2,   0 ],
  [   2,   3,   0,   2 ] ]

An object in Category of left presentations of Z
gap> alpha := StandardGeneratorMorphism( H, 3 );
<A morphism in Category of left presentations of Z>
gap> l := LambdaElimination( DirectSum( M, M ), DirectSum( M, N ), alpha );
<A morphism in Category of left presentations of Z>
gap> IsZero( l );
false
gap> Display( l );
[ [  -2,   6 ],
  [  -1,  -3 ] ]

A morphism in Category of left presentations of Z

2.5 Projectivity test

gap> Q := HomalgFieldOfRationalsInSingular();;
gap> R := Q * "x";;
gap> F := FreeLeftPresentation( 2, Q );;
gap> HasIsProjective( F ) and IsProjective( F );
true
gap> G := FreeRightPresentation( 2, Q );;
gap> HasIsProjective( G ) and IsProjective( G );
true
gap> M := AsLeftPresentation( HomalgMatrix( "[ x, x ]", 1, 2, R ) );;
gap> IsProjective( M );
false
gap> N := AsLeftPresentation( HomalgMatrix( "[ 1, x ]", 1, 2, R ) );;
gap> IsProjective( N );
true
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 Ind

generated by GAPDoc2HTML