Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 Ind

### 12 Examples and Tests

gap> LoadPackage( "Algebroids", false );
true
true
gap> quiver := RightQuiver( "Q(8)[a:1->2,b:2->3,c:3->4,d:3->5,e:4->6,f:5->6,g:6->7,h:7->8]" );;
gap> QQ := HomalgFieldOfRationals();;
gap> A := PathAlgebra( QQ, quiver );;
gap> B := QuotientOfPathAlgebra( A,
> [
>     A.ce - A.df,
>     A.abd,
>     A.egh,
>     A.bc,
>     A.fg,
>     A.ab #since d is supposed to be a mono
> ] );;
gap> QRowsB := QuiverRowsDescentToZDefinedByBasisPaths( B );;
gap> l := CokernelProjection( a );;
gap> k := CokernelColift( a, PreCompose( b, d ) );;
gap> i := KernelEmbedding( h );;
gap> j := KernelLift( h, PreCompose( e, g ) );;
gap> Kd := KernelObject( d );;
gap> Hbc := HomologyObject( b, c );;
gap> Hcj := HomologyObject( c, j );;
gap> Hkf := HomologyObject( k, f );;
gap> Hfg := HomologyObject( f, g );;
gap> L := [ Kd, Hbc, Hcj, Hkf, Hfg ];;
gap> K := KernelObject( e );;
gap> test_func := MembershipFunctionSerreSubcategoryGeneratedByObjects( L, Adel );;
Warning: the provided function returns either true or fail!
gap> C := FullSubcategoryByMembershipFunction( Adel, test_func );;
gap> K := K/Serre;;
gap> IsZero( K );
true


#### 12.2 Basics of additive closure

gap> LoadPackage( "Algebroids", false );
true
true
true
gap> snake_quiver := RightQuiver( "Q(6)[a:1->2,b:2->3,c:1->4,d:2->5,e:3->6,f:4->5,g:5->6]" );;
gap> kQ := PathAlgebra( HomalgFieldOfRationalsInSingular(), snake_quiver );;
gap> A := kQ / [ kQ.ad - kQ.cf, kQ.dg - kQ.be, kQ.ab, kQ.fg ];;
gap> Aoid := Algebroid( kQ, [ kQ.ad - kQ.cf, kQ.dg - kQ.be, kQ.ab, kQ.fg ] );;
gap> s := SetOfObjects( Aoid );;
gap> m := SetOfGeneratingMorphisms( Aoid );;
gap> interpretation := InterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructure( -m[3] );;
gap> InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism( Source( m[3] ), Target( m[3] ), interpretation );;
gap> mor := AdditiveClosureMorphism( obj1, [ [ IdentityMorphism( s[1] ), ZeroMorphism( s[1], s[2] ) ], [ ZeroMorphism( s[2], s[1] ), -IdentityMorphism( s[2] ) ] ], obj1 );;
gap> IsWellDefined( mor );;
gap> IsCongruentForMorphisms( PreCompose( mor, mor ), IdentityMorphism( obj1 ) );;
gap> id := IdentityMorphism( obj2 );;
gap> ids1 := IdentityMorphism( objs1 );;
gap> ids2 := IdentityMorphism( objs2 );;
gap> HomomorphismStructureOnMorphisms( DirectSumFunctorial( [ ids1, ids2 ] ), ids1 );;
gap> interpretation := InterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructure( mor );;
gap> IsCongruentForMorphisms(
>   InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism( Source( mor ), Target( mor ), interpretation ),
>   mor );;
gap> a := AsAdditiveClosureMorphism( m[1] );;
gap> b := AsAdditiveClosureMorphism( m[2] );;
gap> c := AsAdditiveClosureMorphism( m[3] );;
gap> d := AsAdditiveClosureMorphism( m[4] );;
gap> e := AsAdditiveClosureMorphism( m[5] );;
gap> f := AsAdditiveClosureMorphism( m[6] );;
gap> g := AsAdditiveClosureMorphism( m[7] );;
gap> l := Lift( PreCompose( a, d ), f );;
gap> IsCongruentForMorphisms( PreCompose( l, f ), PreCompose( a, d ) );
true
gap> l := Colift( c, PreCompose( a, d ) );;
gap> IsCongruentForMorphisms( PreCompose( c, l ), PreCompose( a, d ) );
true


gap> LoadPackage( "Algebroids", false );
true
true
gap> quiver := RightQuiver( "Q(9)[a:1->2,b:2->3,c:1->4,d:2->5,e:3->6,f:4->5,g:5->6,h:4->7,i:5->8,j:6->9,k:7->8,l:8->9,m:2->7,n:3->8]" );;
gap> kQ := PathAlgebra( HomalgFieldOfRationals(), quiver );;
gap> Aoid := Algebroid( kQ, [ kQ.ad - kQ.cf,
>                          kQ.dg - kQ.be,
>                          kQ.("fi") - kQ.hk,
>                          kQ.gj - kQ.il,
>                          kQ.mk + kQ.bn - kQ.di ] );;
gap> mm := SetOfGeneratingMorphisms( Aoid );;
gap> CapCategorySwitchLogicOff( Aoid );;
gap> Acat := AdditiveClosure( Aoid );;
gap> a := AsAdditiveClosureMorphism( mm[1] );;
gap> b := AsAdditiveClosureMorphism( mm[2] );;
gap> c := AsAdditiveClosureMorphism( mm[3] );;
gap> d := AsAdditiveClosureMorphism( mm[4] );;
gap> e := AsAdditiveClosureMorphism( mm[5] );;
gap> f := AsAdditiveClosureMorphism( mm[6] );;
gap> g := AsAdditiveClosureMorphism( mm[7] );;
gap> h := AsAdditiveClosureMorphism( mm[8] );;
gap> i := AsAdditiveClosureMorphism( mm[9] );;
gap> j := AsAdditiveClosureMorphism( mm[10] );;
gap> k := AsAdditiveClosureMorphism( mm[11] );;
gap> l := AsAdditiveClosureMorphism( mm[12] );;
gap> m := AsAdditiveClosureMorphism( mm[13] );;
gap> n := AsAdditiveClosureMorphism( mm[14] );;
gap> A := AdelmanCategoryObject( a, b );;
gap> B := AdelmanCategoryObject( f, g );;
gap> alpha := AdelmanCategoryMorphism( A, d, B );;
gap> IsWellDefined( alpha );
true
gap> IsWellDefined( KernelEmbedding( alpha ) );
true
gap> IsWellDefined( CokernelProjection( alpha ) );
true
gap> T := AdelmanCategoryObject( k, l );;
gap> tau := AdelmanCategoryMorphism( B, i, T );;
gap> IsZeroForMorphisms( PreCompose( alpha, tau ) );
true
gap> colift := CokernelColift( alpha, tau );;
gap> IsWellDefined( colift );
true
gap> IsCongruentForMorphisms( PreCompose( CokernelProjection( alpha ), colift ), tau );
true
gap> lift := KernelLift( tau, alpha );;
gap> IsWellDefined( lift );
true
gap> IsCongruentForMorphisms( PreCompose( lift, KernelEmbedding( tau ) ), alpha );
true
gap> IsCongruentForMorphisms( ColiftAlongEpimorphism( CokernelProjection( alpha ), tau ), colift );
true
gap> IsCongruentForMorphisms( LiftAlongMonomorphism( KernelEmbedding( tau ), alpha ), lift );
true


#@if ValueOption( "no_precompiled_code" ) <> true
true
true
true
gap> quiver := RightQuiver( "Q(5)[a:1->2,b:2->3,c:1->4,d:4->5]" );;
gap> QQ := HomalgFieldOfRationals();;
gap> B := PathAlgebra( QQ, quiver );;
gap> aoid := Algebroid( B, true : overhead := false );;
gap> QuiverRowsB := QuiverRowsDescentToZDefinedByBasisPaths( B : overhead := false );;
gap> x := KernelEmbedding( a );;
gap> y := KernelEmbedding( PreCompose( a, b ) );;
gap> z := KernelEmbedding( c );;
gap> w := KernelEmbedding(  PreCompose( c, d ) );;
gap> gens := [ x, y, z, w ];;
gap> start := Runtime( );;
gap> Display( Size( GenerateSubobjects( gens ) ) );
18
gap> runtime := Runtime( ) - start;;
gap> x := KernelEmbedding( a );;
gap> y := KernelEmbedding( PreCompose( a, b ) );;
gap> z := KernelEmbedding( c );;
gap> w := KernelEmbedding(  PreCompose( c, d ) );;
gap> gens := [ x, y, z, w ];;
gap> start := Runtime( );;
gap> Display( Size( GenerateSubobjects( gens ) ) );
18
gap> runtime_quiver := Runtime( ) - start;;
gap> if runtime >= runtime_quiver * 1 / 20 then Display( true ); else Display( runtime ); Display( runtime_quiver ); fi;
true
gap> if runtime <= runtime_quiver * 2 / 10 then Display( true ); else Display( runtime ); Display( runtime_quiver ); fi;
true
#@fi


gap> LoadPackage( "Algebroids", false );
true
gap> quiver := RightQuiver( "Q(3)[a:1->2,b:1->2,c:2->3]" );;
gap> kQ := PathAlgebra( HomalgFieldOfRationals(), quiver );;
gap> # without precompiled code, CategoryOfRowsAsAdditiveClosureOfRingAsCategory is
> # used as range of the homomorphism structure which does not have enough
> # operations for the hom strucutre of AdelmanCategory
> Aoid := Algebroid( kQ : no_precompiled_code := false );;
gap> SetIsProjective( DistinguishedObjectOfHomomorphismStructure( Aoid ), true );;
gap> mm := SetOfGeneratingMorphisms( Aoid );;
gap> CapCategorySwitchLogicOff( Aoid );;
gap> Acat := AdditiveClosure( Aoid );;
gap> a := AsAdditiveClosureMorphism( mm[1] );;
gap> b := AsAdditiveClosureMorphism( mm[2] );;
gap> c := AsAdditiveClosureMorphism( mm[3] );;
gap> a := AsAdelmanCategoryMorphism( a );;
gap> b := AsAdelmanCategoryMorphism( b );;
gap> c := AsAdelmanCategoryMorphism( c );;
gap> A := Source( a );;
gap> B := Target( a );;
gap> C := Target( c );;
gap> HomomorphismStructureOnObjects( A, C );;
gap> HomomorphismStructureOnMorphisms( IdentityMorphism( A ), c );;
gap> mor := InterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructure( a );;
gap> int := InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism( A, B, mor );;
gap> IsCongruentForMorphisms( int, a );
true


gap> LoadPackage( "Algebroids", false );
true
true
gap> DeactivateDefaultCaching();
gap> SwitchGeneralizedMorphismStandard( "span" );;
gap> snake_quiver := RightQuiver( "Q(6)[a:1->2,b:2->3,c:3->4]" );;
gap> kQ := PathAlgebra( HomalgFieldOfRationals(), snake_quiver );;
gap> Aoid := Algebroid( kQ, [ kQ.abc ] );;
gap> CapCategorySwitchLogicOff( Aoid );;
gap> m := SetOfGeneratingMorphisms( Aoid );;
gap> a := m[1];;
gap> b := m[2];;
gap> c := m[3];;
gap> a := AsAdditiveClosureMorphism( a );;
gap> b := AsAdditiveClosureMorphism( b );;
gap> c := AsAdditiveClosureMorphism( c );;
gap> aa := AsAdelmanCategoryMorphism( a );;
gap> bb := AsAdelmanCategoryMorphism( b );;
gap> cc := AsAdelmanCategoryMorphism( c );;
gap> dd := CokernelProjection( aa );;
gap> ee := CokernelColift( aa, PreCompose( bb, cc ) );;
gap> ff := KernelEmbedding( ee );;
gap> gg := KernelEmbedding( cc );;
gap> hh := KernelLift( cc, PreCompose( aa, bb ) );;
gap> ii := CokernelProjection( hh );;
gap> fff := AsGeneralizedMorphism( ff );;
gap> ddd := AsGeneralizedMorphism( dd );;
gap> bbb := AsGeneralizedMorphism( bb );;
gap> ggg := AsGeneralizedMorphism( gg );;
gap> iii := AsGeneralizedMorphism( ii );;
gap> p := PreCompose( [ fff, PseudoInverse( ddd ), bbb, PseudoInverse( ggg ), iii ] );;
gap> IsHonest( p );
true
gap> jj := KernelObjectFunctorial( bb, dd, ee );;
gap> pp := HonestRepresentative( p );;
gap> comp := PreCompose( jj, pp );;
gap> IsZero( comp );
true

gap> LoadPackage( "Algebroids", false );
true
true
gap> SwitchGeneralizedMorphismStandard( "cospan" );;
gap> snake_quiver := RightQuiver( "Q(6)[a:1->2,b:2->3,c:3->4]" );;
gap> QQ := HomalgFieldOfRationals();;
gap> A := PathAlgebra( QQ, snake_quiver );;
gap> A := QuotientOfPathAlgebra( A, [ A.abc ] );;
gap> QRowsA := QuiverRows( A );;
gap> SetIsProjective( DistinguishedObjectOfHomomorphismStructure( QRowsA ), true );;
gap> a := AsQuiverRowsMorphism( A.a, QRowsA );;
gap> b := AsQuiverRowsMorphism( A.b, QRowsA );;
gap> c := AsQuiverRowsMorphism( A.c, QRowsA );;
gap> aa := AsAdelmanCategoryMorphism( a );;
gap> bb := AsAdelmanCategoryMorphism( b );;
gap> cc := AsAdelmanCategoryMorphism( c );;
gap> dd := CokernelProjection( aa );;
gap> ee := CokernelColift( aa, PreCompose( bb, cc ) );;
gap> ff := KernelEmbedding( ee );;
gap> gg := KernelEmbedding( cc );;
gap> hh := KernelLift( cc, PreCompose( aa, bb ) );;
gap> ii := CokernelProjection( hh );;
gap> fff := AsGeneralizedMorphism( ff );;
gap> ddd := AsGeneralizedMorphism( dd );;
gap> bbb := AsGeneralizedMorphism( bb );;
gap> ggg := AsGeneralizedMorphism( gg );;
gap> iii := AsGeneralizedMorphism( ii );;
gap> p := PreCompose( [ fff, PseudoInverse( ddd ), bbb, PseudoInverse( ggg ), iii ] );;
gap> IsHonest( p );
true
gap> jj := KernelObjectFunctorial( bb, dd, ee );;
gap> kk := CokernelObjectFunctorial( hh, gg, bb );;
gap> pp := HonestRepresentative( p );;
gap> comp := PreCompose( jj, pp );;
gap> IsZero( comp );
true
gap> comp := PreCompose( pp, kk );;
gap> IsZero( comp );
true
gap> homology := function( alpha, beta ) return CokernelObject( LiftAlongMonomorphism( KernelEmbedding( beta ), ImageEmbedding( alpha ) ) ); end;;
gap> IsZero( homology( jj, pp ) );
true
gap> IsZero( homology( pp, kk ) );
true


#### 12.7 Exactness conditions

gap> LoadPackage( "Algebroids", false );
true
true
gap> quiver := RightQuiver( "Q(4)[a:1->2,b:2->3,c:3->4]" );;
gap> QQ := HomalgFieldOfRationals();;
gap> A := PathAlgebra( QQ, quiver );;
gap> B := QuotientOfPathAlgebra( A, [ A.ab, A.bc ] );;
gap> RowsB := QuiverRowsDescentToZDefinedByBasisPaths( B : overhead := false );;
gap> F := CokernelObject( a );;
gap> G := KernelObject( c );;
gap> eta := AdelmanCategoryMorphism( F, B.b/RowsB, G );;
gap> C := CokernelObject( eta );;
gap> I := ImageObject( eta );;
gap> K := KernelObject( eta );;
gap> IsImagePreserving( I );
true
gap> IsLeftExact( I );
false
gap> IsRightExact( I );
false
gap> IsMonoPreserving( K );
false
gap> IsEpiPreserving( K );
false
gap> IsMonoPreserving( C );
false
gap> IsEpiPreserving( C );
false


#### 12.8 Quiver rows bascis

gap> LoadPackage( "Algebroids", false );
true
true
gap> ## quiver without relations
> QQ := HomalgFieldOfRationals();;
gap> quiver := RightQuiver( "Q(3)[a:1->2,b:1->2,c:2->3]" );;
gap> Av := Vertices( quiver );;
gap> A := PathAlgebra( QQ, quiver );;
gap> a := BasisPaths( CanonicalBasis( A ) );;
gap> a := List( a, p -> PathAsAlgebraElement( A, p ) );;
gap> zA := Zero( A );;
gap> QRowsA := QuiverRows( A );;
gap> mat := [ [ a[1], zA ], [ zA, a[6] ], [ a[1], zA ] ];;
gap> obj1 := QuiverRowsObject( [ [ Av[1], 1 ], [ Av[2], 1 ], [ Av[1], 1 ] ], QRowsA );;
gap> obj2 := QuiverRowsObject( [ [ Av[1], 1 ], [ Av[3], 1 ] ], QRowsA );;
gap> alpha := QuiverRowsMorphism( obj1, mat, obj2 );;
gap> obj3 := QuiverRowsObject( [ [ Av[2], 1 ] ], QRowsA );;
gap> mat := [ [ a[4] ], [ zA ] ];;
gap> beta := QuiverRowsMorphism( obj2, mat, obj3 );;
gap> pre := PreCompose( alpha, beta );;
gap> IsWellDefined( PreCompose( alpha, beta ) );
true
gap> IsZeroForMorphisms( pre );
false
gap> ze := ZeroMorphism( Source( pre ), Target( pre ) );;
gap> IsCongruentForMorphisms( pre + ze, pre );
true
gap> IsCongruentForMorphisms( pre + pre, pre );
false
gap> IsZeroForMorphisms( pre - pre );
true
gap> IsCongruentForMorphisms(
>     PreCompose(
>         UniversalMorphismFromZeroObject( obj1 ),
>         UniversalMorphismIntoZeroObject( obj1 )
>     ),
>     IdentityMorphism( ZeroObject( QRowsA ) )
> );
true
gap> NrSummands( DirectSum( List( [ 1 .. 1000 ], i -> obj1 ) ) ) = 1000 * NrSummands( obj1 );
true
gap> L := [ obj1, obj2, obj3 ];;
gap> pi := List( [ 1,2,3 ], i -> ProjectionInFactorOfDirectSum( L, i ) );;
gap> iota := List( [ 1,2,3 ], i -> InjectionOfCofactorOfDirectSum( L, i ) );;
gap> ForAll( [1,2,3], i ->
>     IsCongruentForMorphisms(
>         PreCompose( iota[i], pi[i] ),
>         IdentityMorphism( L[i] )
>     )
> );
true
gap> IsZeroForMorphisms( PreCompose( iota[2], pi[1] ) );
true
gap> IsCongruentForMorphisms(
>     UniversalMorphismIntoDirectSum( L, pi ),
>     IdentityMorphism( DirectSum( L ) )
> );
true
gap> IsCongruentForMorphisms(
>     UniversalMorphismFromDirectSum( L, iota ),
>     IdentityMorphism( DirectSum( L ) )
> );
true
gap> IsCongruentForMorphisms(
>     InterpretMorphismFromDistinguishedObjectToHomomorphismStructureAsMorphism( obj1, obj2,
>         InterpretMorphismAsMorphismFromDistinguishedObjectToHomomorphismStructure( alpha )
>     ),
>     alpha
> );
true
gap> ## quiver with relations
> quiver := RightQuiver(
> "Q(8)[a:1->5,b:2->6,c:3->7,d:4->8,e:1->2,f:2->3,g:3->4,h:5->6,i:6->7,j:7->8]"
> );;
gap> Bv := Vertices( quiver );;
gap> QQ := HomalgFieldOfRationals();;
gap> kQ := PathAlgebra( QQ, quiver );;
gap> B := QuotientOfPathAlgebra( kQ,
> [
>     kQ.e * kQ.f, kQ.f * kQ.g,
>     kQ.h * kQ.i, kQ.i * kQ.j,
>     kQ.e * kQ.b - kQ.a * kQ.h,
>     kQ.f * kQ.c - kQ.b * kQ.i,
>     kQ.g * kQ.d - kQ.c * kQ.j ]
> );;
gap> b := BasisPaths( CanonicalBasis( B ) );;
gap> QRowsB := QuiverRows( B );;
gap> obj := QuiverRowsObject( [ [ Bv[1], 2 ], [ Bv[1], 4 ], [ Bv[1], 4 ], [ Bv[1], 6 ] ], QRowsB );;
gap> IsWellDefined( obj );
true
gap> IdentityMorphism( obj );;


#### 12.9 Quiver rows over the integers

Well-defined morphisms

gap> LoadPackage( "Algebroids", false );
true
gap> QQ := HomalgFieldOfRationals();;
gap> snake_quiver := RightQuiver( "Q(4)[a:1->2,b:2->3,c:3->4]" );;
gap> vertices := Vertices( snake_quiver );;
gap> A := PathAlgebra( QQ, snake_quiver );;
gap> A := QuotientOfPathAlgebra( A, [ A.abc ] );;
gap> QRowsA := QuiverRowsDescentToZDefinedByBasisPaths( A );;
gap> v1 := AsQuiverRowsObject( vertices[1], QRowsA );;
gap> v2 := AsQuiverRowsObject( vertices[2], QRowsA );;
gap> mat := [ [ 1/2*A.a ] ];;
gap> x := QuiverRowsMorphism( v1, mat, v2 );;
gap> IsWellDefined( x );
false
gap> mat := [ [ 2*A.a ] ];;
gap> x := QuiverRowsMorphism( v1, mat, v2 );;
gap> IsWellDefined( x );
true


Snake lemma over the integers

gap> LoadPackage( "Algebroids", false );
true
gap> a := AsQuiverRowsMorphism( A.a, QRowsA );;
gap> b := AsQuiverRowsMorphism( A.b, QRowsA );;
gap> c := AsQuiverRowsMorphism( A.c, QRowsA );;
gap> aa := AsAdelmanCategoryMorphism( a );;
gap> bb := AsAdelmanCategoryMorphism( b );;
gap> cc := AsAdelmanCategoryMorphism( c );;
gap> dd := CokernelProjection( aa );;
gap> ee := CokernelColift( aa, PreCompose( bb, cc ) );;
gap> ff := KernelEmbedding( ee );;
gap> gg := KernelEmbedding( cc );;
gap> hh := KernelLift( cc, PreCompose( aa, bb ) );;
gap> ii := CokernelProjection( hh );;
gap> fff := AsGeneralizedMorphism( ff );;
gap> ddd := AsGeneralizedMorphism( dd );;
gap> bbb := AsGeneralizedMorphism( bb );;
gap> ggg := AsGeneralizedMorphism( gg );;
gap> iii := AsGeneralizedMorphism( ii );;
gap> p := PreCompose( [ fff, PseudoInverse( ddd ), bbb, PseudoInverse( ggg ), iii ] );;
gap> IsHonest( p );
true
gap> jj := KernelObjectFunctorial( bb, dd, ee );;
gap> kk := CokernelObjectFunctorial( hh, gg, bb );;
gap> pp := HonestRepresentative( p );;
gap> comp := PreCompose( jj, pp );;
gap> IsZero( comp );
true
gap> comp := PreCompose( pp, kk );;
gap> IsZero( comp );
true
gap> homology := function( alpha, beta ) return CokernelObject( LiftAlongMonomorphism( KernelEmbedding( beta ), ImageEmbedding( alpha ) ) ); end;;
gap> IsZero( homology( jj, pp ) );
true
gap> IsZero( homology( pp, kk ) );
true


Phenomena over the integers

gap> LoadPackage( "Algebroids", false );
true
gap> quiver := RightQuiver( "Q(2)[a:1->2]" );;
gap> vertices := Vertices( quiver );;
gap> B := PathAlgebra( QQ, quiver );;
gap> QRowsB := QuiverRows( B );;
gap> QRowsB_overZ := QuiverRowsDescentToZDefinedByBasisPaths( B );;
gap> a := AsQuiverRowsMorphism( B.a, QRowsB );;
gap> a_Z := AsQuiverRowsMorphism( B.a, QRowsB_overZ );;
gap> aa := AsAdelmanCategoryMorphism( a );;
gap> aa_Z := AsAdelmanCategoryMorphism( a_Z );;
gap> bb := aa + aa;;
gap> bb_Z := aa_Z + aa_Z;;
gap> K1 := KernelEmbedding( bb );;
gap> K2 := KernelEmbedding( aa );;
gap> IsEqualAsSubobjects( K1, K2 );
true
gap> K1_Z := KernelEmbedding( bb_Z );;
gap> K2_Z := KernelEmbedding( aa_Z );;
gap> IsEqualAsSubobjects( K1_Z, K2_Z );
false


#### 12.10 Snake lemma first proof

gap> LoadPackage( "Algebroids", false );
true
true
gap> DeactivateDefaultCaching();
gap> SwitchGeneralizedMorphismStandard( "cospan" );;
gap> snake_quiver := RightQuiver( "Q(6)[a:1->2,b:2->3,c:1->4,d:2->5,e:3->6,f:4->5,g:5->6]" );;
gap> kQ := PathAlgebra( HomalgFieldOfRationals(), snake_quiver );;
gap> Aoid := Algebroid( kQ, [ kQ.ad - kQ.cf, kQ.dg - kQ.be, kQ.ab, kQ.fg ] );;
gap> m := SetOfGeneratingMorphisms( Aoid );;
gap> a := m[1];;
gap> b := m[2];;
gap> c := m[3];;
gap> d := m[4];;
gap> e := m[5];;
gap> f := m[6];;
gap> g := m[7];;
gap> cat := Aoid;;
gap> CapCategorySwitchLogicOff( cat );;
gap> DisableInputSanityChecks( cat );;
gap> cat := AdditiveClosure( cat );;
gap> DisableInputSanityChecks( cat );;
gap> cat := Opposite( cat );;
gap> DisableInputSanityChecks( cat );;
gap> CapCategorySwitchLogicOff( cat );;
gap> CapCategorySwitchLogicOff( Opposite( cat ) );;
gap> cat := FreydCategory( cat );;
gap> CapCategorySwitchLogicOff( cat );;
gap> cat := Opposite( cat );;
gap> CapCategorySwitchLogicOff( cat );;
gap> af := AsMorphismInFreeAbelianCategory( m[1] );;
gap> bf := AsMorphismInFreeAbelianCategory( m[2] );;
gap> cf := AsMorphismInFreeAbelianCategory( m[3] );;
gap> df := AsMorphismInFreeAbelianCategory( m[4] );;
gap> ef := AsMorphismInFreeAbelianCategory( m[5] );;
gap> ff := AsMorphismInFreeAbelianCategory( m[6] );;
gap> gf := AsMorphismInFreeAbelianCategory( m[7] );;
gap> bn := CokernelProjection( af );;
gap> en := CokernelColift( af, PreCompose( df, gf ) );;
gap> fn := KernelEmbedding( gf );;
gap> cn := KernelLift( gf, PreCompose( af, df ) );;
gap> ke := KernelEmbedding( en );;
gap> co := CokernelProjection( cn );;
gap> gk := AsGeneralizedMorphism( ke );;
gap> gb := AsGeneralizedMorphism( bn );;
gap> gd := AsGeneralizedMorphism( df );;
gap> gf := AsGeneralizedMorphism( fn );;
gap> gc := AsGeneralizedMorphism( co );;
gap> DirectSumFunctorial( [ af, af ] );;
gap> IsZero( PreCompose( ke, en ));;
gap> timestart := Runtimes().user_time;;
gap> p := PreCompose( [ gk, PseudoInverse( gb ) ] );;
gap> p2 := PreCompose( p, gd );;
gap> p3:= PreCompose( p2, PseudoInverse( gf ) );;
gap> p4:= PreCompose( p3, gc );;
gap> IsHonest( p );
false
gap> IsHonest( p2 );
false
gap> IsHonest( p3 );
false
gap> IsHonest( p4 );
true
gap> timeend := Runtimes().user_time - timestart;;
gap> h := HonestRepresentative( p4 );;


#### 12.11 Snake lemma second proof

gap> LoadPackage( "Algebroids", false );
true
true
gap> DeactivateDefaultCaching();
gap> SwitchGeneralizedMorphismStandard( "cospan" );;
gap> snake_quiver := RightQuiver( "Q(6)[a:1->2,b:2->3,c:3->4]" );;
gap> kQ := PathAlgebra( HomalgFieldOfRationals(), snake_quiver );;
gap> Aoid := Algebroid( kQ, [ kQ.abc ] );;
gap> m := SetOfGeneratingMorphisms( Aoid );;
gap> a := m[1];;
gap> b := m[2];;
gap> c := m[3];;
gap> cat := Aoid;;
gap> CapCategorySwitchLogicOff( cat );;
gap> DisableInputSanityChecks( cat );;
gap> cat := AdditiveClosure( cat );;
gap> DisableInputSanityChecks( cat );;
gap> cat := Opposite( cat );;
gap> DisableInputSanityChecks( cat );;
gap> CapCategorySwitchLogicOff( cat );;
gap> CapCategorySwitchLogicOff( Opposite( cat ) );;
gap> cat := FreydCategory( cat );;
gap> CapCategorySwitchLogicOff( cat );;
gap> cat := Opposite( cat );;
gap> CapCategorySwitchLogicOff( cat );;
gap> a := AsMorphismInFreeAbelianCategory( a );;
gap> b := AsMorphismInFreeAbelianCategory( b );;
gap> c := AsMorphismInFreeAbelianCategory( c );;
gap> coker_a := CokernelProjection( a );;
gap> colift := CokernelColift( a, PreCompose( b, c ) );;
gap> ker_c := KernelEmbedding( c );;
gap> lift := KernelLift( c, PreCompose( a, b ) );;
gap> p := PreCompose( [
>   AsGeneralizedMorphism( KernelEmbedding( colift ) ),
>   GeneralizedInverse( coker_a ),
>   AsGeneralizedMorphism( b ),
>   GeneralizedInverse( ker_c ),
>   AsGeneralizedMorphism( CokernelProjection( lift ) )
> ] );;
gap> IsHonest( p );
true


#### 12.12 Subobject lattice

We compute the number of the generic subobject lattice generated by 2 independent subobjects y,z and one subobject x of y.

gap> LoadPackage( "Algebroids", false );
true
true
gap> quiver := RightQuiver( "Q(4)[a:1->2,b:2->3,c:1->4]" );;
gap> QQ := HomalgFieldOfRationals();;
gap> B := PathAlgebra( QQ, quiver );;
gap> RowsB := QuiverRowsDescentToZDefinedByBasisPaths( B : overhead := false );;
gap> x := KernelEmbedding( a );;
gap> y := KernelEmbedding( PreCompose( a, b ) );;
gap> z := KernelEmbedding( c );;
gap> gens := [ x, y, z ];;
gap> Size( GenerateSubobjects( gens ) );
8


gap> LoadPackage( "Algebroids", false );
true
true
gap> quiver := RightQuiver( "Q(9)[a:1->2,b:3->2]" );;
gap> kQ := PathAlgebra( HomalgFieldOfRationals(), quiver );;
gap> Aoid := Algebroid( kQ );;
gap> mm := SetOfGeneratingMorphisms( Aoid );;
gap> CapCategorySwitchLogicOff( Aoid );;
gap> Acat := AdditiveClosure( Aoid );;
gap> a := AsAdditiveClosureMorphism( mm[1] );;
gap> b := AsAdditiveClosureMorphism( mm[2] );;
gap> a := AsAdelmanCategoryMorphism( a );;
gap> b := AsAdelmanCategoryMorphism( b );;
gap> pi1 := ProjectionInFactorOfFiberProduct( [ a, b ], 1 );;
gap> pi2 := ProjectionInFactorOfFiberProduct( [ a, b ], 1 );;
gap> c := CokernelColift( pi1, PreCompose( a, CokernelProjection( b ) ) );;
gap> IsMonomorphism( c );
true

Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 Ind

generated by GAPDoc2HTML